Skip to content

Commit

Permalink
Fix some clippy and doc lints
Browse files Browse the repository at this point in the history
  • Loading branch information
declanvk committed Sep 15, 2024
1 parent fcde76b commit 31a1271
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/collections/map/iterators/into_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,15 @@ mod tests {
[u8::MAX, u8::MAX, u8::MAX],
]
.into_iter()
.map(|arr| DropCounter::new(&drop_counter, arr))
.map(|arr| DropCounter::new(drop_counter, arr))
.enumerate()
.map(swap)
.collect()
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/collections/map/iterators/range.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! This module contains types and functions relating to iterating over a
//! range of the [`TreeMap`][crate::TreeMap].
//! range of the [`TreeMap`].
use std::{
cmp::Ordering,
Expand Down
15 changes: 2 additions & 13 deletions src/nodes/representation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,7 @@ impl<K, V, const PREFIX_LEN: usize> Copy for ConcreteNodePtr<K, V, PREFIX_LEN> {

impl<K, V, const PREFIX_LEN: usize> Clone for ConcreteNodePtr<K, V, PREFIX_LEN> {
fn clone(&self) -> Self {
match self {
Self::Node4(arg0) => Self::Node4(arg0.clone()),
Self::Node16(arg0) => Self::Node16(arg0.clone()),
Self::Node48(arg0) => Self::Node48(arg0.clone()),
Self::Node256(arg0) => Self::Node256(arg0.clone()),
Self::LeafNode(arg0) => Self::LeafNode(arg0.clone()),
}
*self
}
}

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

impl<K, V, const PREFIX_LEN: usize> Clone for ConcreteInnerNodePtr<K, V, PREFIX_LEN> {
fn clone(&self) -> Self {
match self {
Self::Node4(arg0) => Self::Node4(arg0.clone()),
Self::Node16(arg0) => Self::Node16(arg0.clone()),
Self::Node48(arg0) => Self::Node48(arg0.clone()),
Self::Node256(arg0) => Self::Node256(arg0.clone()),
}
*self
}
}

Expand Down

0 comments on commit 31a1271

Please sign in to comment.