Diffstat (limited to 'src/any.rs')
| -rw-r--r-- | src/any.rs | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -17,18 +17,12 @@ pub use static_wrapper::*; pub use type_name_id::*; pub trait AnyTrait<'lt> { - fn upcast_by_id( - &self, - id: WithLtTypeId<'lt>, - ) -> Option<RefAnyUnsized<'_, 'lt>> { + fn upcast_by_id(&self, id: WithLtTypeId<'lt>) -> Option<RefAnyUnsized<'_, 'lt>> { let _id = id; None } - fn upcast_by_id_mut( - &mut self, - id: WithLtTypeId<'lt>, - ) -> Option<MutAnyUnsized<'_, 'lt>> { + fn upcast_by_id_mut(&mut self, id: WithLtTypeId<'lt>) -> Option<MutAnyUnsized<'_, 'lt>> { let _id = id; None } @@ -122,10 +116,7 @@ macro_rules! trait_by_id { } => {{ match $id { $( - $id if { - eprintln!("a: {:?}\nb: {:?}", &$id, $crate::any::WithLtTypeId::of::<$trait>()); - $id == $crate::any::WithLtTypeId::of::<$trait>() - }=> { + $id if $id == $crate::any::WithLtTypeId::of::<$trait>() => { return Some($crate::any::MutAnyUnsized::new($this as &mut $trait)) } )* |