1 2 3 4 5 6 7
#![no_std] pub trait Pipe: Sized { fn pipe<R, F: FnOnce(Self) -> R>(self, f: F) -> R { f(self) } } impl<T> Pipe for T {}
1 2 3 4 5 6 7
#![no_std] pub trait Pipe: Sized { fn pipe<R, F: FnOnce(Self) -> R>(self, f: F) -> R { f(self) } } impl<T> Pipe for T {}