Allow filter_speckle to be 0 #47

This commit is contained in:
Chris Tsang
2023-06-30 05:44:26 +08:00
parent 971bffa948
commit 685009bd21

View File

@@ -240,8 +240,8 @@ impl Config {
if let Some(value) = matches.value_of("filter_speckle") {
if value.trim().parse::<usize>().is_ok() { // is numeric
let value = value.trim().parse::<usize>().unwrap();
if value < 1 || value > 16 {
panic!("Out of Range Error: Filter speckle is invalid at {}. It must be within [1,16].", value);
if value > 16 {
panic!("Out of Range Error: Filter speckle is invalid at {}. It must be within [0,16].", value);
}
config.filter_speckle = value;
} else {