make gui open whenever no args are supplied
This commit is contained in:
parent
e4ff6329ec
commit
1ebc3b4911
3 changed files with 7 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -346,7 +346,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "qft"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
dependencies = [
|
||||
"iui",
|
||||
"rand",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "qft"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
|
@ -258,7 +258,7 @@ impl SafeReadWrite {
|
|||
|
||||
fn main() {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
if args.len() <= 1 {
|
||||
if args.len() == 0 {
|
||||
print_args(&args);
|
||||
}
|
||||
match args
|
||||
|
@ -271,7 +271,10 @@ fn main() {
|
|||
"receiver" => receiver(&args, |_| {}),
|
||||
"gui" => gui::gui().expect("can't use gui"),
|
||||
"version" => println!("QFT version: {}", env!("CARGO_PKG_VERSION")),
|
||||
_ => print_args(&args),
|
||||
_ => match gui::gui() {
|
||||
Ok(_) => {},
|
||||
Err(_) => print_args(&args),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue