mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-21 01:31:09 +00:00
Impl new_from for wrapper types
This commit is contained in:
@@ -52,6 +52,10 @@ macro_rules! define_wrapper_type {
|
||||
Self(value)
|
||||
}
|
||||
|
||||
pub fn new_from<T: Into<$ty>>(value: T) -> Self {
|
||||
Self(value.into())
|
||||
}
|
||||
|
||||
pub fn into_inner(self) -> $ty {
|
||||
self.0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user