rhea/src/utils.rs

16 lines
237 B
Rust

#[inline(always)]
pub fn default<T: Default>() -> T {
Default::default()
}
pub trait Pipe {
fn pipe<R>(self, mut f: impl FnMut(Self) -> R) -> R
where
Self: Sized,
{
f(self)
}
}
impl<T> Pipe for T {}