Remove Dynamic::downcast_clone

This commit is contained in:
J Henry Waugh
2020-08-11 19:09:49 -05:00
parent 6d11fdcd18
commit 59e3ca0e79
2 changed files with 4 additions and 11 deletions

View File

@@ -1082,13 +1082,6 @@ impl Dynamic {
}
}
/// Copy and return a `Dynamic` if it contains a type that can be trivially copied.
/// Returns `None` if the cast fails.
#[inline(always)]
pub fn downcast_clone<T: Variant + Clone>(&self) -> Option<T> {
self.downcast_ref::<T>().map(|t| t.clone())
}
/// Cast the `Dynamic` as the system integer type `INT` and return it.
/// Returns the name of the actual type if the cast fails.
#[inline(always)]