1 2 3 4 5 6 7 8 9 10 11 12 13
//! `FnBox` replacement /// Specialized replacement for unstable `FnBox` from stdlib pub trait FnBox { /// Call a boxed closure fn call_box(self: Box<Self>); } impl<F: FnOnce()> FnBox for F { fn call_box(self: Box<Self>) { self(); } }