Fix even more clippy warnings
This commit is contained in:
parent
bfecb18771
commit
57c6ed0c07
53 changed files with 276 additions and 520 deletions
|
@ -307,10 +307,7 @@ where
|
|||
fn walk_unvisited_node(&mut self, depth: usize, node: G::Node) -> WalkReturn<S> {
|
||||
debug!("walk_unvisited_node(depth = {:?}, node = {:?})", depth, node);
|
||||
|
||||
debug_assert!(match self.node_states[node] {
|
||||
NodeState::NotVisited => true,
|
||||
_ => false,
|
||||
});
|
||||
debug_assert!(matches!(self.node_states[node], NodeState::NotVisited));
|
||||
|
||||
// Push `node` onto the stack.
|
||||
self.node_states[node] = NodeState::BeingVisited { depth };
|
||||
|
|
|
@ -395,7 +395,7 @@ where
|
|||
V: Copy,
|
||||
{
|
||||
fn extend<T: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: T) {
|
||||
self.extend(iter.into_iter().map(|(k, v)| (k.clone(), v.clone())))
|
||||
self.extend(iter.into_iter().map(|(k, v)| (*k, *v)))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -451,7 +451,7 @@ impl<'a, K, V> IntoIterator for &'a SsoHashMap<K, V> {
|
|||
fn into_iter(self) -> Self::IntoIter {
|
||||
match self {
|
||||
SsoHashMap::Array(array) => EitherIter::Left(array.into_iter().map(adapt_array_ref_it)),
|
||||
SsoHashMap::Map(map) => EitherIter::Right(map.into_iter()),
|
||||
SsoHashMap::Map(map) => EitherIter::Right(map.iter()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ impl<'a, K, V> IntoIterator for &'a mut SsoHashMap<K, V> {
|
|||
fn into_iter(self) -> Self::IntoIter {
|
||||
match self {
|
||||
SsoHashMap::Array(array) => EitherIter::Left(array.into_iter().map(adapt_array_mut_it)),
|
||||
SsoHashMap::Map(map) => EitherIter::Right(map.into_iter()),
|
||||
SsoHashMap::Map(map) => EitherIter::Right(map.iter_mut()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue