diff options
author | gennyble <gen@nyble.dev> | 2024-01-31 00:20:57 -0600 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2024-01-31 00:20:57 -0600 |
commit | 8a131a03374f751e166c454d3d55c8aa88922702 (patch) | |
tree | a8f850cfedf6590c89d570d3fde9e3a916db707d | |
parent | 17af2884f76fb0de1d9ea27ffb2ee966730cb986 (diff) | |
download | colorsquash-8a131a03374f751e166c454d3d55c8aa88922702.tar.gz colorsquash-8a131a03374f751e166c454d3d55c8aa88922702.zip |
rename sort/select to sorsel
-rw-r--r-- | squash/src/cli.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/squash/src/cli.rs b/squash/src/cli.rs index e33015e..d47d26b 100644 --- a/squash/src/cli.rs +++ b/squash/src/cli.rs @@ -161,7 +161,7 @@ pub fn build() -> Cli { eprintln!("scale must be >= 1 and <= 100"); std::process::exit(1); } - Ok(scale) if scale < 1 || scale > 100 => { + Ok(scale) if (1..=100).contains(&scale) => { eprintln!("scale must be >= 1 and <= 100"); std::process::exit(1); } @@ -178,7 +178,7 @@ pub fn build() -> Cli { } }, Some(("selector", sel)) | Some(("sel", sel)) => match sel { - "sort/select" => building.selector = Selector::SortSelect, + "sort/select" | "sorsel" => building.selector = Selector::SortSelect, "kmeans" => building.selector = Selector::Kmeans, _ => { eprintln!("'{sel}' is not recognized as a selector. See help=selectors"); @@ -257,7 +257,7 @@ fn print_help_algorithms() -> ! { fn print_help_selectors() -> ! { println!("SELECTORS:"); - println!("sort/select:"); + println!("sorsel:"); println!(" the original colorsquash algorithm. sorts colors from most to least"); println!(" frequent and then picks the most frequent colors so long as they are"); println!(" sufficiently different (configurable with tolerance=)\n"); |