1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#[macro_export]
#[cfg(__hyper_impl_trait_available)]
macro_rules! impl_trait {
    (ty: $($t:tt)+) => {
        impl $($t)+
    };
    (e: $e:expr) => {
        $e
    }
}

#[macro_export]
#[cfg(not(__hyper_impl_trait_available))]
macro_rules! impl_trait {
    (ty: $($t:tt)+) => {
        Box<$($t)+>
    };
    (e: $e:expr) => {
        Box::new($e)
    }
}