Skip to content

Commit bcd71e5

Browse files
authored
Merge pull request #588 from zeenix/better-names
Better names for method returning mutable references
2 parents 0c9508d + 267a4d5 commit bcd71e5

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/binary_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl<T, K, S: VecStorage<T>> BinaryHeapInner<T, K, S> {
193193
}
194194
/// Get a mutable reference to the `BinaryHeap`, erasing the `N` const-generic.
195195
pub fn as_mut_view(&mut self) -> &mut BinaryHeapView<T, K> {
196-
S::as_binary_heap_mut_view(self)
196+
S::as_binary_heap_view_mut(self)
197197
}
198198
}
199199

src/deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl<T, S: VecStorage<T> + ?Sized> DequeInner<T, S> {
196196

197197
/// Get a mutable reference to the `Deque`, erasing the `N` const-generic.
198198
pub fn as_mut_view(&mut self) -> &mut DequeView<T> {
199-
S::as_deque_mut_view(self)
199+
S::as_deque_view_mut(self)
200200
}
201201

202202
/// Returns the maximum number of elements the deque can hold.

src/vec/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ mod storage {
6161
fn as_vec_view<LenT: LenType>(this: &VecInner<T, LenT, Self>) -> &VecView<T, LenT>
6262
where
6363
Self: VecStorage<T>;
64-
fn as_vec_mut_view<LenT: LenType>(
64+
fn as_vec_view_mut<LenT: LenType>(
6565
this: &mut VecInner<T, LenT, Self>,
6666
) -> &mut VecView<T, LenT>
6767
where
@@ -70,7 +70,7 @@ mod storage {
7070
fn as_binary_heap_view<K>(this: &BinaryHeapInner<T, K, Self>) -> &BinaryHeapView<T, K>
7171
where
7272
Self: VecStorage<T>;
73-
fn as_binary_heap_mut_view<K>(
73+
fn as_binary_heap_view_mut<K>(
7474
this: &mut BinaryHeapInner<T, K, Self>,
7575
) -> &mut BinaryHeapView<T, K>
7676
where
@@ -79,7 +79,7 @@ mod storage {
7979
fn as_deque_view(this: &DequeInner<T, Self>) -> &DequeView<T>
8080
where
8181
Self: VecStorage<T>;
82-
fn as_deque_mut_view(this: &mut DequeInner<T, Self>) -> &mut DequeView<T>
82+
fn as_deque_view_mut(this: &mut DequeInner<T, Self>) -> &mut DequeView<T>
8383
where
8484
Self: VecStorage<T>;
8585
}
@@ -108,7 +108,7 @@ mod storage {
108108
{
109109
this
110110
}
111-
fn as_vec_mut_view<LenT: LenType>(
111+
fn as_vec_view_mut<LenT: LenType>(
112112
this: &mut VecInner<T, LenT, Self>,
113113
) -> &mut VecView<T, LenT>
114114
where
@@ -123,7 +123,7 @@ mod storage {
123123
{
124124
this
125125
}
126-
fn as_binary_heap_mut_view<K>(
126+
fn as_binary_heap_view_mut<K>(
127127
this: &mut BinaryHeapInner<T, K, Self>,
128128
) -> &mut BinaryHeapView<T, K>
129129
where
@@ -137,7 +137,7 @@ mod storage {
137137
{
138138
this
139139
}
140-
fn as_deque_mut_view(this: &mut DequeInner<T, Self>) -> &mut DequeView<T>
140+
fn as_deque_view_mut(this: &mut DequeInner<T, Self>) -> &mut DequeView<T>
141141
where
142142
Self: VecStorage<T>,
143143
{
@@ -160,7 +160,7 @@ mod storage {
160160
{
161161
this
162162
}
163-
fn as_vec_mut_view<LenT: LenType>(
163+
fn as_vec_view_mut<LenT: LenType>(
164164
this: &mut VecInner<T, LenT, Self>,
165165
) -> &mut VecView<T, LenT>
166166
where
@@ -175,7 +175,7 @@ mod storage {
175175
{
176176
this
177177
}
178-
fn as_binary_heap_mut_view<K>(
178+
fn as_binary_heap_view_mut<K>(
179179
this: &mut BinaryHeapInner<T, K, Self>,
180180
) -> &mut BinaryHeapView<T, K>
181181
where
@@ -189,7 +189,7 @@ mod storage {
189189
{
190190
this
191191
}
192-
fn as_deque_mut_view(this: &mut DequeInner<T, Self>) -> &mut DequeView<T>
192+
fn as_deque_view_mut(this: &mut DequeInner<T, Self>) -> &mut DequeView<T>
193193
where
194194
Self: VecStorage<T>,
195195
{
@@ -528,7 +528,7 @@ impl<T, LenT: LenType, S: VecStorage<T> + ?Sized> VecInner<T, LenT, S> {
528528
/// ```
529529
#[inline]
530530
pub fn as_mut_view(&mut self) -> &mut VecView<T, LenT> {
531-
S::as_vec_mut_view(self)
531+
S::as_vec_view_mut(self)
532532
}
533533

534534
/// Returns a raw pointer to the vector’s buffer.

0 commit comments

Comments
 (0)