aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-01-01 17:38:42 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2023-01-01 17:38:42 +0100
commit049b7964ab83e9dd1a008bd3bcb38d7bb351a140 (patch)
tree7770bfc59d45b777fc413b1dee31a1c81568113e
parent00c7e7400d3e0640ba22da824aaeaab0b5e6397a (diff)
downloadfl2k_ampliphase-049b7964ab83e9dd1a008bd3bcb38d7bb351a140.tar.gz
fl2k_ampliphase-049b7964ab83e9dd1a008bd3bcb38d7bb351a140.tar.bz2
fl2k_ampliphase-049b7964ab83e9dd1a008bd3bcb38d7bb351a140.zip
Fix opt usage
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 76808e8..fceb37f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -158,12 +158,12 @@ fn main() {
std::process::exit(1);
}
- if cli_args.opt_str("D").is_some() {
+ if cli_args.opt_present("C") {
eprintln!("FL2K device count {}", fl2k::get_device_count());
return;
}
- let output = if cli_args.opt_str("D").is_some() {
+ let output = if cli_args.opt_present("D") {
Output::Debug
}
else {