Skip to content

Commit 31a1271

Browse files
committed
Fix some clippy and doc lints
1 parent fcde76b commit 31a1271

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

src/collections/map/iterators/into_iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,15 @@ mod tests {
241241
[u8::MAX, u8::MAX, u8::MAX],
242242
]
243243
.into_iter()
244-
.map(|arr| DropCounter::new(&drop_counter, arr))
244+
.map(|arr| DropCounter::new(drop_counter, arr))
245245
.enumerate()
246246
.map(swap)
247247
.collect()
248248
}
249249

250250
fn check_will_deallocate_unconsumed_iter_values(
251251
drop_counter: &Arc<AtomicUsize>,
252-
mut iter: impl Iterator + DoubleEndedIterator + ExactSizeIterator,
252+
mut iter: impl DoubleEndedIterator + ExactSizeIterator,
253253
) {
254254
assert_eq!(drop_counter.load(Ordering::Relaxed), 8);
255255

src/collections/map/iterators/range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! This module contains types and functions relating to iterating over a
2-
//! range of the [`TreeMap`][crate::TreeMap].
2+
//! range of the [`TreeMap`].
33
44
use std::{
55
cmp::Ordering,

src/nodes/representation.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,7 @@ impl<K, V, const PREFIX_LEN: usize> Copy for ConcreteNodePtr<K, V, PREFIX_LEN> {
273273

274274
impl<K, V, const PREFIX_LEN: usize> Clone for ConcreteNodePtr<K, V, PREFIX_LEN> {
275275
fn clone(&self) -> Self {
276-
match self {
277-
Self::Node4(arg0) => Self::Node4(arg0.clone()),
278-
Self::Node16(arg0) => Self::Node16(arg0.clone()),
279-
Self::Node48(arg0) => Self::Node48(arg0.clone()),
280-
Self::Node256(arg0) => Self::Node256(arg0.clone()),
281-
Self::LeafNode(arg0) => Self::LeafNode(arg0.clone()),
282-
}
276+
*self
283277
}
284278
}
285279

@@ -341,12 +335,7 @@ impl<K, V, const PREFIX_LEN: usize> Copy for ConcreteInnerNodePtr<K, V, PREFIX_L
341335

342336
impl<K, V, const PREFIX_LEN: usize> Clone for ConcreteInnerNodePtr<K, V, PREFIX_LEN> {
343337
fn clone(&self) -> Self {
344-
match self {
345-
Self::Node4(arg0) => Self::Node4(arg0.clone()),
346-
Self::Node16(arg0) => Self::Node16(arg0.clone()),
347-
Self::Node48(arg0) => Self::Node48(arg0.clone()),
348-
Self::Node256(arg0) => Self::Node256(arg0.clone()),
349-
}
338+
*self
350339
}
351340
}
352341

0 commit comments

Comments
 (0)