Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gankra committed Apr 16, 2022
1 parent ba70541 commit 48ba0c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl<K, V, S> LinkedHashMap<K, V, S> {
impl<K: Hash + Eq, V, S: BuildHasher> LinkedHashMap<K, V, S> {
fn with_map(map: HashMap<KeyRef<K>, *mut Node<K, V>, S>) -> Self {
LinkedHashMap {
map: map,
map,
head: ptr::null_mut(),
free: ptr::null_mut(),
}
Expand Down Expand Up @@ -293,7 +293,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> LinkedHashMap<K, V, S> {
};
Entries {
map: self,
head: head,
head,
remaining: self.len(),
marker: marker::PhantomData,
}
Expand Down Expand Up @@ -655,7 +655,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> LinkedHashMap<K, V, S> {
unsafe { (*self.head).prev }
};
Iter {
head: head,
head,
tail: self.head,
remaining: self.len(),
marker: marker::PhantomData,
Expand Down Expand Up @@ -689,7 +689,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> LinkedHashMap<K, V, S> {
unsafe { (*self.head).prev }
};
IterMut {
head: head,
head,
tail: self.head,
remaining: self.len(),
marker: marker::PhantomData,
Expand Down Expand Up @@ -1012,8 +1012,8 @@ where
}

IntoIter {
head: head,
tail: tail,
head,
tail,
remaining: self.remaining,
marker: marker::PhantomData,
}
Expand Down Expand Up @@ -1298,8 +1298,8 @@ impl<K: Hash + Eq, V, S: BuildHasher> IntoIterator for LinkedHashMap<K, V, S> {
mem::forget(self);

IntoIter {
head: head,
tail: tail,
head,
tail,
remaining: len,
marker: marker::PhantomData,
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn test_debug() {
assert_eq!(format!("{:?}", map), "{1: 10, 3: 30, 2: 22}");
map.get(&3);
assert_eq!(format!("{:?}", map), "{1: 10, 3: 30, 2: 22}");
map.get_refresh(&mut 3);
map.get_refresh(&3);
assert_eq!(format!("{:?}", map), "{1: 10, 2: 22, 3: 30}");
map.clear();
assert_eq!(format!("{:?}", map), "{}");
Expand Down

0 comments on commit 48ba0c1

Please sign in to comment.