cargo-binstall/crates/binstalk
Jiahao XU 83b2de3ea2
Enforce strict strategies parsing rule: Reject duplicate strategy in --strategies (#545)
`cargo-binstall` should reject duplicate strategy in `--strategies` as it is illegal input and it cannot be interpreted reasonably.

* Reject duplicate strategy in `--strategies`
* Optimize `compute_resolvers`: Use `Vec::retain`
   instead of `Iterator::filter` plus collecting into `Vec`.
* Optimize `compute_resolvers`: Reject `strategies.len() > Strategy::COUNT`
* Improve err msg for cases where user disabled all strategies
* Simplify `BinstallError::InvalidStrategies`: Takes `&'static str`
   instead of `&'static &'static str` since other variants are larger than 8B.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-21 12:02:58 +11:00
..
src Enforce strict strategies parsing rule: Reject duplicate strategy in --strategies (#545) 2022-11-21 12:02:58 +11:00
tests Replace use of log with tracing (#527) 2022-11-13 21:45:37 +13:00
Cargo.toml Minor optimization (#544) 2022-11-21 10:32:46 +13:00
LICENSE Rename lib to binstalk (#361) 2022-09-10 16:44:18 +10:00