import Any
This commit is contained in:
parent
f94950afb9
commit
f03e554181
|
|
@ -1,4 +1,5 @@
|
|||
use std::{
|
||||
any::Any,
|
||||
marker::PhantomData,
|
||||
mem::ManuallyDrop,
|
||||
ops::{Deref, DerefMut},
|
||||
|
|
@ -56,7 +57,7 @@ impl<T> OwnRef<'_, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl OwnRef<'_, dyn std::any::Any> {
|
||||
impl OwnRef<'_, dyn Any> {
|
||||
pub fn take<U: 'static>(mut self) -> Result<U, Self> {
|
||||
if !self.is::<U>() {
|
||||
return Err(self);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user