scsys-core 0.2.2

scsys is a collection of primitives and utilities for use throughout the ecosystem.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
    Appellation: macros <module>
    Contrib: FL03 <jo3mccain@icloud.com>
*/

#[allow(unused_macros)]
macro_rules! impl_fmt {
    ($name:ty: $($t:ident($($rest:tt)*)),*) => {
        $(impl_fmt!($name: $t($($rest)*));)*
    };
    (@impl $name:ty: $t:ident($($rest:tt)*)) => {
        impl core::fmt::$t for $name {
            fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
                write!(f, $($rest)*)
            }
        }
    };
}