cargo-binstall/crates/bin/src
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
..
args.rs Enforce strict strategies parsing rule: Reject duplicate strategy in --strategies (#545) 2022-11-21 12:02:58 +11:00
bin_util.rs Enable coloring in console log (#528) 2022-11-13 22:45:19 +13:00
entry.rs Enforce strict strategies parsing rule: Reject duplicate strategy in --strategies (#545) 2022-11-21 12:02:58 +11:00
install_path.rs Minor refactor and optimization (#543) 2022-11-19 20:00:27 +13:00
lib.rs Replace simplelog with tracing_subscriber::fmt (#525) 2022-11-11 12:05:09 +13:00
logging.rs Minor refactor and optimization (#543) 2022-11-19 20:00:27 +13:00
main.rs Minor refactor and optimization (#543) 2022-11-19 20:00:27 +13:00
ui.rs Minor refactor and optimization (#543) 2022-11-19 20:00:27 +13:00