make clippy happy
This commit is contained in:
1 parent
87ff41f213
commit
64db1def9f
1 file changed
+2
-7
@@ -1,10 +1,5 @@
|
|||||||
use core::panic;
|
|
||||||
use parking_lot::lock_api::RawMutex as _;
|
|
||||||
use parking_lot::{RawMutex, RwLock};
|
|
||||||
use std::cell::UnsafeCell;
|
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
#[derive(Hash, PartialEq, Eq, Clone, Copy, Debug, PartialOrd, Ord)]
|
#[derive(Hash, PartialEq, Eq, Clone, Copy, Debug, PartialOrd, Ord)]
|
||||||
pub struct NodeId(pub usize);
|
pub struct NodeId(pub usize);
|
||||||
@@ -313,10 +308,10 @@ impl<T> TreeView<T> for Tree<T> {
|
|||||||
println!("parent_child_mut: {:?}\n{:?}", id, children_ids);
|
println!("parent_child_mut: {:?}\n{:?}", id, children_ids);
|
||||||
debug_assert!(!children_ids.iter().any(|child_id| *child_id == id));
|
debug_assert!(!children_ids.iter().any(|child_id| *child_id == id));
|
||||||
let mut borrowed = unsafe {
|
let mut borrowed = unsafe {
|
||||||
|
let as_vec = children_ids.to_vec();
|
||||||
self.nodes
|
self.nodes
|
||||||
.get_many_mut_unchecked(
|
.get_many_mut_unchecked(
|
||||||
children_ids
|
as_vec
|
||||||
.to_vec()
|
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.rev()
|
.rev()
|
||||||
.map(|id| id.0)
|
.map(|id| id.0)
|
||||||
|
|||||||
Reference in new issue
Block a user