Don't copy-paste impl_froms into every crate
This commit is contained in:
@@ -6,25 +6,6 @@ macro_rules! eprintln {
|
||||
($($tt:tt)*) => { stdx::eprintln!($($tt)*) };
|
||||
}
|
||||
|
||||
macro_rules! impl_froms {
|
||||
($e:ident: $($v:ident $(($($sv:ident),*))?),*) => {
|
||||
$(
|
||||
impl From<$v> for $e {
|
||||
fn from(it: $v) -> $e {
|
||||
$e::$v(it)
|
||||
}
|
||||
}
|
||||
$($(
|
||||
impl From<$sv> for $e {
|
||||
fn from(it: $sv) -> $e {
|
||||
$e::$v($v::$sv(it))
|
||||
}
|
||||
}
|
||||
)*)?
|
||||
)*
|
||||
}
|
||||
}
|
||||
|
||||
mod autoderef;
|
||||
pub mod primitive;
|
||||
pub mod traits;
|
||||
|
||||
Reference in New Issue
Block a user