Skip to content

Commit 494060d

Browse files
committed
make clippy happy
1 parent 389a74d commit 494060d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

ipld/hamt/src/iter.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl<'a, V> From<std::slice::Iter<'a, V>> for StackItem<'a, V> {
3939
}
4040
}
4141

42-
impl<'a, V> From<std::vec::IntoIter<V>> for StackItem<'a, V> {
42+
impl<V> From<std::vec::IntoIter<V>> for StackItem<'_, V> {
4343
fn from(value: std::vec::IntoIter<V>) -> Self {
4444
Self::IntoIter(value)
4545
}
@@ -81,13 +81,9 @@ impl<V: PartialEq> PartialEq<V> for IterItem<'_, V> {
8181
fn eq(&self, other: &V) -> bool {
8282
self.as_ref().eq(other)
8383
}
84-
85-
fn ne(&self, other: &V) -> bool {
86-
self.as_ref().ne(other)
87-
}
8884
}
8985

90-
impl<'a, V> From<V> for IterItem<'a, V> {
86+
impl<V> From<V> for IterItem<'_, V> {
9187
fn from(value: V) -> Self {
9288
Self::Owned(value)
9389
}
@@ -140,6 +136,7 @@ where
140136
}
141137
IterItem::Owned(node) => {
142138
stack.push(StackItem::from(
139+
#[allow(clippy::unnecessary_to_owned)]
143140
node.pointers[node.index_for_bit_pos(idx)..]
144141
.to_vec()
145142
.into_iter(),
@@ -173,6 +170,7 @@ where
173170
conf,
174171
store,
175172
stack,
173+
#[allow(clippy::unnecessary_to_owned)]
176174
current: values[offset..].to_vec().into_iter().into(),
177175
}),
178176
None => Err(Error::StartKeyNotFound),

ipld/hamt/src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ where
3636
{
3737
fn clone(&self) -> Self {
3838
Self {
39-
bitfield: self.bitfield.clone(),
39+
bitfield: self.bitfield,
4040
pointers: self.pointers.clone(),
4141
hash: Default::default(),
4242
}

0 commit comments

Comments
 (0)