mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 12:38:43 +00:00
![]() If we impl it for `<'f> Fn(&str) -> Option<Cow<'f, str>> + 'f`, then it would somehow imply it to `'static` when using it in `benches/values.rs` and `benches/others.rs`, thus I decided to simplify it back to only implement it for `'static` string. Users who wants more flexibility should implement `Values` themselves. This commit also extracts `benches` as a separate crate in an independent workspace to avoid building criterion and tinytemplate in CI, which makes it much slower as more crates need to be built and criterion actually pulls in clap, and a whole lots of other crates. In additional to that, it: - Impl `leon::Values` for `Arc<T>` & `Rc<T>` where T: `Values` - Enable lto, abort on panic, stripping, set `codege-units` to 1 for `leon/benches` - Move into closure of criterion benchmark loop to reduce indirections which also reduce sizes of the closure since the Fns used in `ValuesFn` are zero-size. This also means that the compiler can now assumes `no-alias`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> |
||
---|---|---|
.. | ||
benches | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml |