mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 15:58:11 +08:00
Fix clippy lints (#1327)
* Fix clippy lints * Update formatting * Remove unsafe send impls * New type for Rc<NodeContainer>
This commit is contained in:
committed by
Keavon Chambers
parent
743803ce04
commit
80cc5bee73
@@ -86,7 +86,7 @@ pub fn downcast<'a, V: StaticType + 'a>(i: Box<dyn DynAny<'a> + 'a>) -> Result<B
|
||||
let type_id = DynAny::type_id(i.as_ref());
|
||||
if type_id == core::any::TypeId::of::<<V as StaticType>::Static>() {
|
||||
// SAFETY: caller guarantees that T is the correct type
|
||||
let ptr = Box::into_raw(i) as *mut dyn DynAny<'a> as *mut V;
|
||||
let ptr = Box::into_raw(i) as *mut V;
|
||||
Ok(unsafe { Box::from_raw(ptr) })
|
||||
} else {
|
||||
if type_id == core::any::TypeId::of::<&dyn DynAny<'static>>() {
|
||||
|
||||
Reference in New Issue
Block a user