Repository navigation
0.2.1
-
Add shorthand for the common case of distributed slices containing function pointers (#27, thanks @ubnt-intrepid)
use linkme::distributed_slice; #[distributed_slice] pub static BENCHMARKS: [fn(&mut Bencher)] = [..]; // Equivalent to: // // #[distributed_slice(BENCHMARKS)] // static _: fn(&mut Bencher) = bench_deserialize; // #[distributed_slice(BENCHMARKS)] fn bench_deserialize(b: &mut Bencher) { /* ... */ }