Fix no_closure build.
This commit is contained in:
parent
2707b887c6
commit
22c392d796
@ -944,6 +944,7 @@ impl Dynamic {
|
||||
pub fn try_cast<T: Variant>(self) -> Option<T> {
|
||||
// Coded this way in order to maximally leverage potentials for dead-code removal.
|
||||
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
if let Union::Shared(_, _) = self.0 {
|
||||
return self.flatten().try_cast::<T>();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user