mirror of
https://github.com/Chaoscaot/schemsearch.git
synced 2025-11-27 05:27:07 +01:00
Add CPU matching option and improve default behavior handling
This commit is contained in:
@@ -169,7 +169,7 @@ fn main() {
|
|||||||
.value_parser(|s: &str| s.parse::<usize>().map_err(|e| e.to_string())),
|
.value_parser(|s: &str| s.parse::<usize>().map_err(|e| e.to_string())),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("cpu")
|
Arg::new("force-cpu")
|
||||||
.help("Force CPU Matching, skip OpenCL checks")
|
.help("Force CPU Matching, skip OpenCL checks")
|
||||||
.short('c')
|
.short('c')
|
||||||
.long("force-cpu")
|
.long("force-cpu")
|
||||||
@@ -221,7 +221,7 @@ fn main() {
|
|||||||
ignore_entities: matches.get_flag("ignore-entities"),
|
ignore_entities: matches.get_flag("ignore-entities"),
|
||||||
threshold: *matches.get_one::<f32>("threshold").expect("Couldn't get threshold"),
|
threshold: *matches.get_one::<f32>("threshold").expect("Couldn't get threshold"),
|
||||||
invalid_nbt: matches.get_flag("invalid-nbt"),
|
invalid_nbt: matches.get_flag("invalid-nbt"),
|
||||||
use_cpu: matches.get_flag("use-cpu"),
|
use_cpu: matches.get_flag("force-cpu"),
|
||||||
};
|
};
|
||||||
|
|
||||||
let pattern = match matches.get_one::<String>("pattern") {
|
let pattern = match matches.get_one::<String>("pattern") {
|
||||||
|
|||||||
Reference in New Issue
Block a user