fix: clippy new lint
This commit is contained in:
1 parent
e3e8128d5b
commit
3e474382c6
1 file changed
+4
-7
@@ -97,11 +97,10 @@ impl ScopeArena {
|
|||||||
|
|
||||||
// Get the height of the scope
|
// Get the height of the scope
|
||||||
let height = parent_scope
|
let height = parent_scope
|
||||||
.map(|id| self.get_scope(id).map(|scope| scope.height + 1))
|
.and_then(|id| self.get_scope(id).map(|scope| scope.height + 1))
|
||||||
.flatten()
|
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
let parent_scope = parent_scope.map(|f| self.get_scope_raw(f)).flatten();
|
let parent_scope = parent_scope.and_then(|f| self.get_scope_raw(f));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This scopearena aggressively reuses old scopes when possible.
|
This scopearena aggressively reuses old scopes when possible.
|
||||||
@@ -659,8 +658,7 @@ impl ScopeState {
|
|||||||
self.shared_contexts
|
self.shared_contexts
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
.insert(TypeId::of::<T>(), value.clone())
|
.insert(TypeId::of::<T>(), value.clone())
|
||||||
.map(|f| f.downcast::<T>().ok())
|
.and_then(|f| f.downcast::<T>().ok());
|
||||||
.flatten();
|
|
||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -690,8 +688,7 @@ impl ScopeState {
|
|||||||
self.shared_contexts
|
self.shared_contexts
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
.insert(TypeId::of::<T>(), value.clone())
|
.insert(TypeId::of::<T>(), value.clone())
|
||||||
.map(|f| f.downcast::<T>().ok())
|
.and_then(|f| f.downcast::<T>().ok());
|
||||||
.flatten();
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user