Implement Dynamic::From<Instant>

This commit is contained in:
Stephen Chung 2020-09-26 19:41:04 +08:00
parent 03dce86328
commit e0483f2a50

View File

@ -1256,3 +1256,9 @@ impl From<Box<FnPtr>> for Dynamic {
Self(Union::FnPtr(value)) Self(Union::FnPtr(value))
} }
} }
impl From<Instant> for Dynamic {
#[inline(always)]
fn from(value: Instant) -> Self {
Self(Union::Variant(Box::new(Box::new(value))))
}
}