[INFO] fetching crate cllog 0.2.0... [INFO] linting cllog-0.2.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate cllog 0.2.0 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate cllog 0.2.0 [INFO] finished tweaking crates.io crate cllog 0.2.0 [INFO] tweaked toml for crates.io crate cllog 0.2.0 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate cllog 0.2.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate cllog 0.2.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: file `/workspace/builds/worker-1-tc1/source/src/main.rs` found to be present in multiple build targets: [INFO] [stderr] * `bin` target `cl` [INFO] [stderr] * `bin` target `cllog` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cc v1.0.68 [INFO] [stderr] Downloaded indexmap v1.6.2 [INFO] [stderr] Downloaded redox_users v0.4.0 [INFO] [stderr] Downloaded cli-table v0.4.6 [INFO] [stderr] Downloaded autojson v0.1.0 [INFO] [stderr] Downloaded adif v0.1.0 [INFO] [stderr] Downloaded cli-table-derive v0.4.4 [INFO] [stderr] Downloaded lexical v5.2.2 [INFO] [stderr] Downloaded backtrace v0.3.60 [INFO] [stderr] Downloaded dirs-sys v0.3.6 [INFO] [stderr] Downloaded addr2line v0.15.2 [INFO] [stderr] Downloaded hambands v0.1.2 [INFO] [stderr] Downloaded syn v1.0.73 [INFO] [stderr] Downloaded bstr v0.2.16 [INFO] [stderr] Downloaded libc v0.2.97 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 486d339a61d8066a9398fcfd48326e12fb1d5a4b9ab86ec5f1802ee8022d6ced [INFO] running `Command { std: "docker" "start" "-a" "486d339a61d8066a9398fcfd48326e12fb1d5a4b9ab86ec5f1802ee8022d6ced", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "486d339a61d8066a9398fcfd48326e12fb1d5a4b9ab86ec5f1802ee8022d6ced", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "486d339a61d8066a9398fcfd48326e12fb1d5a4b9ab86ec5f1802ee8022d6ced", kill_on_drop: false }` [INFO] [stdout] 486d339a61d8066a9398fcfd48326e12fb1d5a4b9ab86ec5f1802ee8022d6ced [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ed06aab99cd9bfac38d9dab9a53a962602f3a0e32176552759d8b8e668007e7e [INFO] running `Command { std: "docker" "start" "-a" "ed06aab99cd9bfac38d9dab9a53a962602f3a0e32176552759d8b8e668007e7e", kill_on_drop: false }` [INFO] [stderr] warning: file `/opt/rustwide/workdir/src/main.rs` found to be present in multiple build targets: [INFO] [stderr] * `bin` target `cl` [INFO] [stderr] * `bin` target `cllog` [INFO] [stderr] Compiling libc v0.2.97 [INFO] [stderr] Compiling proc-macro2 v1.0.27 [INFO] [stderr] Compiling syn v1.0.73 [INFO] [stderr] Compiling memchr v2.4.0 [INFO] [stderr] Compiling serde_derive v1.0.126 [INFO] [stderr] Compiling serde v1.0.126 [INFO] [stderr] Checking ryu v1.0.5 [INFO] [stderr] Compiling miniz_oxide v0.4.4 [INFO] [stderr] Compiling cc v1.0.68 [INFO] [stderr] Checking itoa v0.4.7 [INFO] [stderr] Checking gimli v0.24.0 [INFO] [stderr] Compiling lexical-core v0.7.6 [INFO] [stderr] Compiling indexmap v1.6.2 [INFO] [stderr] Checking arrayvec v0.5.2 [INFO] [stderr] Compiling serde_json v1.0.64 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Checking ppv-lite86 v0.2.10 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking regex-automata v0.1.10 [INFO] [stderr] Checking object v0.25.3 [INFO] [stderr] Compiling backtrace v0.3.60 [INFO] [stderr] Checking rustc-demangle v0.1.19 [INFO] [stderr] Checking csv-core v0.1.10 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking aho-corasick v0.7.18 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Checking hashbrown v0.9.1 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Checking dirs-sys v0.3.6 [INFO] [stderr] Checking clap v2.33.3 [INFO] [stderr] Checking regex v1.5.4 [INFO] [stderr] Checking tempfile v3.2.0 [INFO] [stderr] Checking dirs v3.0.2 [INFO] [stderr] Checking colored v2.0.0 [INFO] [stderr] Checking lexical v5.2.2 [INFO] [stderr] Checking hambands v0.1.2 [INFO] [stderr] Checking addr2line v0.15.2 [INFO] [stderr] Compiling synstructure v0.12.4 [INFO] [stderr] Compiling cli-table-derive v0.4.4 [INFO] [stderr] Compiling failure_derive v0.1.8 [INFO] [stderr] Checking failure v0.1.8 [INFO] [stderr] Checking bstr v0.2.16 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking csv v1.1.6 [INFO] [stderr] Checking autojson v0.1.0 [INFO] [stderr] Checking cli-table v0.4.6 [INFO] [stderr] Checking adif v0.1.0 [INFO] [stderr] Checking cllog v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `value_t` [INFO] [stdout] --> src/cli.rs:1:105 [INFO] [stdout] | [INFO] [stdout] 1 | use clap::{App, AppSettings, Arg, ArgMatches, SubCommand, crate_authors, crate_description, crate_name, value_t}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Border`, `ColorChoice`, and `HorizontalLine` [INFO] [stdout] --> src/commands/book/dump.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/log/new.rs:8:58 [INFO] [stdout] | [INFO] [stdout] 8 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TimeZone` [INFO] [stdout] --> src/commands/log/edit.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | use chrono::{DateTime, Local, TimeZone}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/query.rs:7:58 [INFO] [stdout] | [INFO] [stdout] 7 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `value_t` [INFO] [stdout] --> src/cli.rs:1:105 [INFO] [stdout] | [INFO] [stdout] 1 | use clap::{App, AppSettings, Arg, ArgMatches, SubCommand, crate_authors, crate_description, crate_name, value_t}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Border`, `ColorChoice`, and `HorizontalLine` [INFO] [stdout] --> src/commands/book/dump.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/log/new.rs:8:58 [INFO] [stdout] | [INFO] [stdout] 8 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TimeZone` [INFO] [stdout] --> src/commands/log/edit.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | use chrono::{DateTime, Local, TimeZone}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/query.rs:7:58 [INFO] [stdout] | [INFO] [stdout] 7 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Style` [INFO] [stdout] --> src/commands/book/dump.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `value_t` [INFO] [stdout] --> src/cli.rs:1:105 [INFO] [stdout] | [INFO] [stdout] 1 | use clap::{App, AppSettings, Arg, ArgMatches, SubCommand, crate_authors, crate_description, crate_name, value_t}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Border`, `ColorChoice`, and `HorizontalLine` [INFO] [stdout] --> src/commands/book/dump.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/log/new.rs:8:58 [INFO] [stdout] | [INFO] [stdout] 8 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TimeZone` [INFO] [stdout] --> src/commands/log/edit.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | use chrono::{DateTime, Local, TimeZone}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/query.rs:7:58 [INFO] [stdout] | [INFO] [stdout] 7 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/commands/book/publish.rs:3:26 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn exec_publish_book(name: &str, outfile: &str) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let mut split_index = id.split(':').collect::>(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let mut entry = entry.unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | / match record.get("RST_SENT") { [INFO] [stdout] 74 | | Some(s) => Some(match s { [INFO] [stdout] 75 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 76 | | _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 77 | | }), [INFO] [stdout] 78 | | None => None, [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ record.get("RST_SENT").map(|s| match s { [INFO] [stdout] 74 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 75 + _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 76 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | / match record.get("RST_RCVD") { [INFO] [stdout] 82 | | Some(s) => Some(match s { [INFO] [stdout] 83 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 84 | | _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 85 | | }), [INFO] [stdout] 86 | | None => None, [INFO] [stdout] 87 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ record.get("RST_RCVD").map(|s| match s { [INFO] [stdout] 82 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 83 + _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 84 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:121:21 [INFO] [stdout] | [INFO] [stdout] 121 | / match record.get("GRIDSQUARE") { [INFO] [stdout] 122 | | Some(s) => Some(match s { [INFO] [stdout] 123 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 124 | | _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 125 | | }), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ record.get("GRIDSQUARE").map(|s| match s { [INFO] [stdout] 122 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 123 + _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 124 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | / match record.get("NAME") { [INFO] [stdout] 130 | | Some(s) => Some(match s { [INFO] [stdout] 131 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 132 | | _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 133 | | }), [INFO] [stdout] 134 | | None => None, [INFO] [stdout] 135 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 129 ~ record.get("NAME").map(|s| match s { [INFO] [stdout] 130 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 131 + _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 132 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | / match record.get("TX_PWR") { [INFO] [stdout] 140 | | Some(s) => Some(match s { [INFO] [stdout] 141 | | adif::AdifType::Str(val) => { [INFO] [stdout] 142 | | lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] ... | [INFO] [stdout] 147 | | None => None, [INFO] [stdout] 148 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 139 ~ record.get("TX_PWR").map(|s| match s { [INFO] [stdout] 140 + adif::AdifType::Str(val) => { [INFO] [stdout] 141 + lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] 142 + } [INFO] [stdout] 143 + adif::AdifType::Number(val) => *val as f32, [INFO] [stdout] 144 + _ => panic!("Found a TX power that is not a string or number!"), [INFO] [stdout] 145 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/edit.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/dump.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/export.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commands/book/export.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | / return indexmap! { [INFO] [stdout] 40 | | "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 | | "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 | | "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] ... | [INFO] [stdout] 51 | | "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 | | }.into(); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 ~ indexmap! { [INFO] [stdout] 40 + "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 + "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 + "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] 43 + "FREQ" => AdifType::Number(((entry.frequency_khz as f64 * 1000.0).round() / 1000.0) / 1000.0 ), [INFO] [stdout] 44 + "QSO_DATE" => AdifType::Date(entry.time.date()), [INFO] [stdout] 45 + "TIME_ON" => AdifType::Time(entry.time.time()), [INFO] [stdout] 46 + "TIME_OFF" => AdifType::Time(entry.time.time() + Duration::minutes(5)), [INFO] [stdout] 47 + "RST_RECVD" => AdifType::Str(entry.recv_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 48 + "RST_SENT" => AdifType::Str(entry.sent_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 49 + "GRIDSQUARE" => AdifType::Str(entry.grid.clone().unwrap_or("".to_string())), [INFO] [stdout] 50 + "NAME" => AdifType::Str(entry.name.clone().unwrap_or("".to_string())), [INFO] [stdout] 51 + "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 ~ }.into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/new.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/new.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub fn exec_new_log( [INFO] [stdout] 12 | | callsign: &str, [INFO] [stdout] 13 | | frequency: f32, [INFO] [stdout] 14 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 23 | | tx_pwr: Option, [INFO] [stdout] 24 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/edit.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/edit.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub fn exec_edit_log( [INFO] [stdout] 7 | | id: &str, [INFO] [stdout] 8 | | callsign: Option<&str>, [INFO] [stdout] 9 | | frequency: Option, [INFO] [stdout] ... | [INFO] [stdout] 18 | | tx_pwr: Option, [INFO] [stdout] 19 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | let logbook = split_index.iter() [INFO] [stdout] | ___________________^ [INFO] [stdout] 26 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 25 - let logbook = split_index.iter() [INFO] [stdout] 26 - .nth(0) [INFO] [stdout] 25 + let logbook = split_index.get(0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | let index: usize = split_index.iter() [INFO] [stdout] | ________________________^ [INFO] [stdout] 29 | | .nth(1) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 28 - let index: usize = split_index.iter() [INFO] [stdout] 29 - .nth(1) [INFO] [stdout] 28 + let index: usize = split_index.get(1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter_mut().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get_mut` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 46 - let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] 46 + let entry = book.entries.get_mut(index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:30 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.get(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:65 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.get(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/query.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.iter().next()` on an array [INFO] [stdout] --> src/commands/query.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / file.unwrap() [INFO] [stdout] 22 | | .file_name() [INFO] [stdout] 23 | | .to_str() [INFO] [stdout] 24 | | .unwrap() [INFO] [stdout] ... | [INFO] [stdout] 27 | | .iter() [INFO] [stdout] 28 | | .next() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice [INFO] [stdout] = note: `#[warn(clippy::iter_next_slice)]` on by default [INFO] [stdout] help: try calling [INFO] [stdout] | [INFO] [stdout] 21 ~ file.unwrap() [INFO] [stdout] 22 + .file_name() [INFO] [stdout] 23 + .to_str() [INFO] [stdout] 24 + .unwrap() [INFO] [stdout] 25 + .split('.') [INFO] [stdout] 26 + .collect::>().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `value_t` [INFO] [stdout] --> src/cli.rs:1:105 [INFO] [stdout] | [INFO] [stdout] 1 | use clap::{App, AppSettings, Arg, ArgMatches, SubCommand, crate_authors, crate_description, crate_name, value_t}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new( [INFO] [stdout] 44 | | callsign: &str, [INFO] [stdout] 45 | | frequency: f32, [INFO] [stdout] 46 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 55 | | tx_pwr: Option [INFO] [stdout] 56 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn new_strings( [INFO] [stdout] 75 | | callsign: String, [INFO] [stdout] 76 | | frequency: f32, [INFO] [stdout] 77 | | mode: String, [INFO] [stdout] ... | [INFO] [stdout] 86 | | tx_pwr: Option [INFO] [stdout] 87 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib/mod.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if !std::fs::metadata(get_data_books_path()).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(get_data_books_path()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:79:22 [INFO] [stdout] | [INFO] [stdout] 79 | .expect(&format!( [INFO] [stdout] | ______________________^ [INFO] [stdout] 80 | | "{} is not a valid number!", [INFO] [stdout] 81 | | "Frequency".bright_blue() [INFO] [stdout] 82 | | )), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ .unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 80 ~ "Frequency".bright_blue())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 93 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] 97 | | None => None, [INFO] [stdout] 98 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 93 + "{} is not a valid number!", [INFO] [stdout] 94 + "Frequency".bright_blue() [INFO] [stdout] 95 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:93:51 [INFO] [stdout] | [INFO] [stdout] 93 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 93 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 94 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / match sub_matches.value_of("frequency") { [INFO] [stdout] 105 | | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] 109 | | None => None, [INFO] [stdout] 110 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ sub_matches.value_of("frequency").map(|freq| freq.parse().expect(&format!( [INFO] [stdout] 105 + "{} is not a valid number!", [INFO] [stdout] 106 + "Frequency".bright_blue() [INFO] [stdout] 107 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:105:53 [INFO] [stdout] | [INFO] [stdout] 105 | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 ~ Some(freq) => Some(freq.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 106 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 120 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] 124 | | None => None, [INFO] [stdout] 125 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 120 + "{} is not a valid number!", [INFO] [stdout] 121 + "Frequency".bright_blue() [INFO] [stdout] 122 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Border`, `ColorChoice`, and `HorizontalLine` [INFO] [stdout] --> src/commands/book/dump.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:120:51 [INFO] [stdout] | [INFO] [stdout] 120 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 121 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/log/new.rs:8:58 [INFO] [stdout] | [INFO] [stdout] 8 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TimeZone` [INFO] [stdout] --> src/commands/log/edit.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | use chrono::{DateTime, Local, TimeZone}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_data_default_book_path` [INFO] [stdout] --> src/commands/query.rs:7:58 [INFO] [stdout] | [INFO] [stdout] 7 | ensure_storage_location_exists, get_data_books_path, get_data_default_book_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Style` [INFO] [stdout] --> src/commands/book/dump.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Style` [INFO] [stdout] --> src/commands/book/dump.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/commands/book/publish.rs:3:26 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn exec_publish_book(name: &str, outfile: &str) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let mut split_index = id.split(':').collect::>(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let mut entry = entry.unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/commands/book/publish.rs:3:26 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn exec_publish_book(name: &str, outfile: &str) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let mut split_index = id.split(':').collect::>(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let mut entry = entry.unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | / match record.get("RST_SENT") { [INFO] [stdout] 74 | | Some(s) => Some(match s { [INFO] [stdout] 75 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 76 | | _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 77 | | }), [INFO] [stdout] 78 | | None => None, [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ record.get("RST_SENT").map(|s| match s { [INFO] [stdout] 74 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 75 + _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 76 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | / match record.get("RST_RCVD") { [INFO] [stdout] 82 | | Some(s) => Some(match s { [INFO] [stdout] 83 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 84 | | _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 85 | | }), [INFO] [stdout] 86 | | None => None, [INFO] [stdout] 87 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ record.get("RST_RCVD").map(|s| match s { [INFO] [stdout] 82 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 83 + _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 84 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:121:21 [INFO] [stdout] | [INFO] [stdout] 121 | / match record.get("GRIDSQUARE") { [INFO] [stdout] 122 | | Some(s) => Some(match s { [INFO] [stdout] 123 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 124 | | _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 125 | | }), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ record.get("GRIDSQUARE").map(|s| match s { [INFO] [stdout] 122 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 123 + _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 124 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | / match record.get("NAME") { [INFO] [stdout] 130 | | Some(s) => Some(match s { [INFO] [stdout] 131 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 132 | | _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 133 | | }), [INFO] [stdout] 134 | | None => None, [INFO] [stdout] 135 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 129 ~ record.get("NAME").map(|s| match s { [INFO] [stdout] 130 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 131 + _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 132 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | / match record.get("TX_PWR") { [INFO] [stdout] 140 | | Some(s) => Some(match s { [INFO] [stdout] 141 | | adif::AdifType::Str(val) => { [INFO] [stdout] 142 | | lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] ... | [INFO] [stdout] 147 | | None => None, [INFO] [stdout] 148 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 139 ~ record.get("TX_PWR").map(|s| match s { [INFO] [stdout] 140 + adif::AdifType::Str(val) => { [INFO] [stdout] 141 + lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] 142 + } [INFO] [stdout] 143 + adif::AdifType::Number(val) => *val as f32, [INFO] [stdout] 144 + _ => panic!("Found a TX power that is not a string or number!"), [INFO] [stdout] 145 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/edit.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/dump.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/export.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commands/book/export.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | / return indexmap! { [INFO] [stdout] 40 | | "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 | | "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 | | "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] ... | [INFO] [stdout] 51 | | "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 | | }.into(); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 ~ indexmap! { [INFO] [stdout] 40 + "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 + "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 + "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] 43 + "FREQ" => AdifType::Number(((entry.frequency_khz as f64 * 1000.0).round() / 1000.0) / 1000.0 ), [INFO] [stdout] 44 + "QSO_DATE" => AdifType::Date(entry.time.date()), [INFO] [stdout] 45 + "TIME_ON" => AdifType::Time(entry.time.time()), [INFO] [stdout] 46 + "TIME_OFF" => AdifType::Time(entry.time.time() + Duration::minutes(5)), [INFO] [stdout] 47 + "RST_RECVD" => AdifType::Str(entry.recv_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 48 + "RST_SENT" => AdifType::Str(entry.sent_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 49 + "GRIDSQUARE" => AdifType::Str(entry.grid.clone().unwrap_or("".to_string())), [INFO] [stdout] 50 + "NAME" => AdifType::Str(entry.name.clone().unwrap_or("".to_string())), [INFO] [stdout] 51 + "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 ~ }.into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/new.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/new.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub fn exec_new_log( [INFO] [stdout] 12 | | callsign: &str, [INFO] [stdout] 13 | | frequency: f32, [INFO] [stdout] 14 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 23 | | tx_pwr: Option, [INFO] [stdout] 24 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | / match record.get("RST_SENT") { [INFO] [stdout] 74 | | Some(s) => Some(match s { [INFO] [stdout] 75 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 76 | | _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 77 | | }), [INFO] [stdout] 78 | | None => None, [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ record.get("RST_SENT").map(|s| match s { [INFO] [stdout] 74 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 75 + _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 76 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | / match record.get("RST_RCVD") { [INFO] [stdout] 82 | | Some(s) => Some(match s { [INFO] [stdout] 83 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 84 | | _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 85 | | }), [INFO] [stdout] 86 | | None => None, [INFO] [stdout] 87 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ record.get("RST_RCVD").map(|s| match s { [INFO] [stdout] 82 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 83 + _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 84 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/edit.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/edit.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub fn exec_edit_log( [INFO] [stdout] 7 | | id: &str, [INFO] [stdout] 8 | | callsign: Option<&str>, [INFO] [stdout] 9 | | frequency: Option, [INFO] [stdout] ... | [INFO] [stdout] 18 | | tx_pwr: Option, [INFO] [stdout] 19 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | let logbook = split_index.iter() [INFO] [stdout] | ___________________^ [INFO] [stdout] 26 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 25 - let logbook = split_index.iter() [INFO] [stdout] 26 - .nth(0) [INFO] [stdout] 25 + let logbook = split_index.get(0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | let index: usize = split_index.iter() [INFO] [stdout] | ________________________^ [INFO] [stdout] 29 | | .nth(1) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 28 - let index: usize = split_index.iter() [INFO] [stdout] 29 - .nth(1) [INFO] [stdout] 28 + let index: usize = split_index.get(1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter_mut().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get_mut` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 46 - let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] 46 + let entry = book.entries.get_mut(index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:121:21 [INFO] [stdout] | [INFO] [stdout] 121 | / match record.get("GRIDSQUARE") { [INFO] [stdout] 122 | | Some(s) => Some(match s { [INFO] [stdout] 123 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 124 | | _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 125 | | }), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ record.get("GRIDSQUARE").map(|s| match s { [INFO] [stdout] 122 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 123 + _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 124 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:30 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.get(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | / match record.get("NAME") { [INFO] [stdout] 130 | | Some(s) => Some(match s { [INFO] [stdout] 131 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 132 | | _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 133 | | }), [INFO] [stdout] 134 | | None => None, [INFO] [stdout] 135 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 129 ~ record.get("NAME").map(|s| match s { [INFO] [stdout] 130 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 131 + _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 132 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:65 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.get(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | / match record.get("TX_PWR") { [INFO] [stdout] 140 | | Some(s) => Some(match s { [INFO] [stdout] 141 | | adif::AdifType::Str(val) => { [INFO] [stdout] 142 | | lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] ... | [INFO] [stdout] 147 | | None => None, [INFO] [stdout] 148 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 139 ~ record.get("TX_PWR").map(|s| match s { [INFO] [stdout] 140 + adif::AdifType::Str(val) => { [INFO] [stdout] 141 + lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] 142 + } [INFO] [stdout] 143 + adif::AdifType::Number(val) => *val as f32, [INFO] [stdout] 144 + _ => panic!("Found a TX power that is not a string or number!"), [INFO] [stdout] 145 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/query.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/edit.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.iter().next()` on an array [INFO] [stdout] --> src/commands/query.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / file.unwrap() [INFO] [stdout] 22 | | .file_name() [INFO] [stdout] 23 | | .to_str() [INFO] [stdout] 24 | | .unwrap() [INFO] [stdout] ... | [INFO] [stdout] 27 | | .iter() [INFO] [stdout] 28 | | .next() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice [INFO] [stdout] = note: `#[warn(clippy::iter_next_slice)]` on by default [INFO] [stdout] help: try calling [INFO] [stdout] | [INFO] [stdout] 21 ~ file.unwrap() [INFO] [stdout] 22 + .file_name() [INFO] [stdout] 23 + .to_str() [INFO] [stdout] 24 + .unwrap() [INFO] [stdout] 25 + .split('.') [INFO] [stdout] 26 + .collect::>().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/dump.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/export.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commands/book/export.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | / return indexmap! { [INFO] [stdout] 40 | | "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 | | "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 | | "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] ... | [INFO] [stdout] 51 | | "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 | | }.into(); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 ~ indexmap! { [INFO] [stdout] 40 + "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 + "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 + "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] 43 + "FREQ" => AdifType::Number(((entry.frequency_khz as f64 * 1000.0).round() / 1000.0) / 1000.0 ), [INFO] [stdout] 44 + "QSO_DATE" => AdifType::Date(entry.time.date()), [INFO] [stdout] 45 + "TIME_ON" => AdifType::Time(entry.time.time()), [INFO] [stdout] 46 + "TIME_OFF" => AdifType::Time(entry.time.time() + Duration::minutes(5)), [INFO] [stdout] 47 + "RST_RECVD" => AdifType::Str(entry.recv_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 48 + "RST_SENT" => AdifType::Str(entry.sent_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 49 + "GRIDSQUARE" => AdifType::Str(entry.grid.clone().unwrap_or("".to_string())), [INFO] [stdout] 50 + "NAME" => AdifType::Str(entry.name.clone().unwrap_or("".to_string())), [INFO] [stdout] 51 + "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 ~ }.into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/new.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/new.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub fn exec_new_log( [INFO] [stdout] 12 | | callsign: &str, [INFO] [stdout] 13 | | frequency: f32, [INFO] [stdout] 14 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 23 | | tx_pwr: Option, [INFO] [stdout] 24 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/edit.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/edit.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub fn exec_edit_log( [INFO] [stdout] 7 | | id: &str, [INFO] [stdout] 8 | | callsign: Option<&str>, [INFO] [stdout] 9 | | frequency: Option, [INFO] [stdout] ... | [INFO] [stdout] 18 | | tx_pwr: Option, [INFO] [stdout] 19 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | let logbook = split_index.iter() [INFO] [stdout] | ___________________^ [INFO] [stdout] 26 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 25 - let logbook = split_index.iter() [INFO] [stdout] 26 - .nth(0) [INFO] [stdout] 25 + let logbook = split_index.get(0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | let index: usize = split_index.iter() [INFO] [stdout] | ________________________^ [INFO] [stdout] 29 | | .nth(1) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 28 - let index: usize = split_index.iter() [INFO] [stdout] 29 - .nth(1) [INFO] [stdout] 28 + let index: usize = split_index.get(1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter_mut().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get_mut` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 46 - let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] 46 + let entry = book.entries.get_mut(index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:30 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.get(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:65 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.get(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/query.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.iter().next()` on an array [INFO] [stdout] --> src/commands/query.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / file.unwrap() [INFO] [stdout] 22 | | .file_name() [INFO] [stdout] 23 | | .to_str() [INFO] [stdout] 24 | | .unwrap() [INFO] [stdout] ... | [INFO] [stdout] 27 | | .iter() [INFO] [stdout] 28 | | .next() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice [INFO] [stdout] = note: `#[warn(clippy::iter_next_slice)]` on by default [INFO] [stdout] help: try calling [INFO] [stdout] | [INFO] [stdout] 21 ~ file.unwrap() [INFO] [stdout] 22 + .file_name() [INFO] [stdout] 23 + .to_str() [INFO] [stdout] 24 + .unwrap() [INFO] [stdout] 25 + .split('.') [INFO] [stdout] 26 + .collect::>().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new( [INFO] [stdout] 44 | | callsign: &str, [INFO] [stdout] 45 | | frequency: f32, [INFO] [stdout] 46 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 55 | | tx_pwr: Option [INFO] [stdout] 56 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn new_strings( [INFO] [stdout] 75 | | callsign: String, [INFO] [stdout] 76 | | frequency: f32, [INFO] [stdout] 77 | | mode: String, [INFO] [stdout] ... | [INFO] [stdout] 86 | | tx_pwr: Option [INFO] [stdout] 87 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib/mod.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if !std::fs::metadata(get_data_books_path()).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(get_data_books_path()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:79:22 [INFO] [stdout] | [INFO] [stdout] 79 | .expect(&format!( [INFO] [stdout] | ______________________^ [INFO] [stdout] 80 | | "{} is not a valid number!", [INFO] [stdout] 81 | | "Frequency".bright_blue() [INFO] [stdout] 82 | | )), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ .unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 80 ~ "Frequency".bright_blue())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 93 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] 97 | | None => None, [INFO] [stdout] 98 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 93 + "{} is not a valid number!", [INFO] [stdout] 94 + "Frequency".bright_blue() [INFO] [stdout] 95 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:93:51 [INFO] [stdout] | [INFO] [stdout] 93 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 93 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 94 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / match sub_matches.value_of("frequency") { [INFO] [stdout] 105 | | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] 109 | | None => None, [INFO] [stdout] 110 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ sub_matches.value_of("frequency").map(|freq| freq.parse().expect(&format!( [INFO] [stdout] 105 + "{} is not a valid number!", [INFO] [stdout] 106 + "Frequency".bright_blue() [INFO] [stdout] 107 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:105:53 [INFO] [stdout] | [INFO] [stdout] 105 | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 ~ Some(freq) => Some(freq.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 106 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 120 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] 124 | | None => None, [INFO] [stdout] 125 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 120 + "{} is not a valid number!", [INFO] [stdout] 121 + "Frequency".bright_blue() [INFO] [stdout] 122 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:120:51 [INFO] [stdout] | [INFO] [stdout] 120 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 121 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Style` [INFO] [stdout] --> src/commands/book/dump.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use cli_table::{ColorChoice, Style, Table, format::{Border, HorizontalLine}}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new( [INFO] [stdout] 44 | | callsign: &str, [INFO] [stdout] 45 | | frequency: f32, [INFO] [stdout] 46 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 55 | | tx_pwr: Option [INFO] [stdout] 56 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn new_strings( [INFO] [stdout] 75 | | callsign: String, [INFO] [stdout] 76 | | frequency: f32, [INFO] [stdout] 77 | | mode: String, [INFO] [stdout] ... | [INFO] [stdout] 86 | | tx_pwr: Option [INFO] [stdout] 87 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib/mod.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if !std::fs::metadata(get_data_books_path()).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(get_data_books_path()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:79:22 [INFO] [stdout] | [INFO] [stdout] 79 | .expect(&format!( [INFO] [stdout] | ______________________^ [INFO] [stdout] 80 | | "{} is not a valid number!", [INFO] [stdout] 81 | | "Frequency".bright_blue() [INFO] [stdout] 82 | | )), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ .unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 80 ~ "Frequency".bright_blue())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 93 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] 97 | | None => None, [INFO] [stdout] 98 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 93 + "{} is not a valid number!", [INFO] [stdout] 94 + "Frequency".bright_blue() [INFO] [stdout] 95 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:93:51 [INFO] [stdout] | [INFO] [stdout] 93 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 93 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 94 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / match sub_matches.value_of("frequency") { [INFO] [stdout] 105 | | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] 109 | | None => None, [INFO] [stdout] 110 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ sub_matches.value_of("frequency").map(|freq| freq.parse().expect(&format!( [INFO] [stdout] 105 + "{} is not a valid number!", [INFO] [stdout] 106 + "Frequency".bright_blue() [INFO] [stdout] 107 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:105:53 [INFO] [stdout] | [INFO] [stdout] 105 | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 ~ Some(freq) => Some(freq.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 106 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 120 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] 124 | | None => None, [INFO] [stdout] 125 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 120 + "{} is not a valid number!", [INFO] [stdout] 121 + "Frequency".bright_blue() [INFO] [stdout] 122 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:120:51 [INFO] [stdout] | [INFO] [stdout] 120 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 121 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/commands/book/publish.rs:3:26 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn exec_publish_book(name: &str, outfile: &str) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let mut split_index = id.split(':').collect::>(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands/log/edit.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let mut entry = entry.unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | / match record.get("RST_SENT") { [INFO] [stdout] 74 | | Some(s) => Some(match s { [INFO] [stdout] 75 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 76 | | _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 77 | | }), [INFO] [stdout] 78 | | None => None, [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ record.get("RST_SENT").map(|s| match s { [INFO] [stdout] 74 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 75 + _ => panic!("Found an RST that is not a string!"), [INFO] [stdout] 76 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | / match record.get("RST_RCVD") { [INFO] [stdout] 82 | | Some(s) => Some(match s { [INFO] [stdout] 83 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 84 | | _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 85 | | }), [INFO] [stdout] 86 | | None => None, [INFO] [stdout] 87 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ record.get("RST_RCVD").map(|s| match s { [INFO] [stdout] 82 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 83 + _ => panic!("Found a RST that is not a string!"), [INFO] [stdout] 84 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:121:21 [INFO] [stdout] | [INFO] [stdout] 121 | / match record.get("GRIDSQUARE") { [INFO] [stdout] 122 | | Some(s) => Some(match s { [INFO] [stdout] 123 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 124 | | _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 125 | | }), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ record.get("GRIDSQUARE").map(|s| match s { [INFO] [stdout] 122 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 123 + _ => panic!("Found a gridsquare that is not a string!"), [INFO] [stdout] 124 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | / match record.get("NAME") { [INFO] [stdout] 130 | | Some(s) => Some(match s { [INFO] [stdout] 131 | | adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 132 | | _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 133 | | }), [INFO] [stdout] 134 | | None => None, [INFO] [stdout] 135 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 129 ~ record.get("NAME").map(|s| match s { [INFO] [stdout] 130 + adif::AdifType::Str(val) => val.to_string(), [INFO] [stdout] 131 + _ => panic!("Found a name that is not a string!"), [INFO] [stdout] 132 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/book/new.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | / match record.get("TX_PWR") { [INFO] [stdout] 140 | | Some(s) => Some(match s { [INFO] [stdout] 141 | | adif::AdifType::Str(val) => { [INFO] [stdout] 142 | | lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] ... | [INFO] [stdout] 147 | | None => None, [INFO] [stdout] 148 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 139 ~ record.get("TX_PWR").map(|s| match s { [INFO] [stdout] 140 + adif::AdifType::Str(val) => { [INFO] [stdout] 141 + lexical::parse::(val).expect("TX power is not a number!") [INFO] [stdout] 142 + } [INFO] [stdout] 143 + adif::AdifType::Number(val) => *val as f32, [INFO] [stdout] 144 + _ => panic!("Found a TX power that is not a string or number!"), [INFO] [stdout] 145 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/edit.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/dump.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/book/export.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commands/book/export.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | / return indexmap! { [INFO] [stdout] 40 | | "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 | | "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 | | "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] ... | [INFO] [stdout] 51 | | "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 | | }.into(); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 ~ indexmap! { [INFO] [stdout] 40 + "CALL" => AdifType::Str(entry.callsign.clone()), [INFO] [stdout] 41 + "BAND" => AdifType::Str(entry.band.clone()), [INFO] [stdout] 42 + "MODE" => AdifType::Str(entry.mode.clone()), [INFO] [stdout] 43 + "FREQ" => AdifType::Number(((entry.frequency_khz as f64 * 1000.0).round() / 1000.0) / 1000.0 ), [INFO] [stdout] 44 + "QSO_DATE" => AdifType::Date(entry.time.date()), [INFO] [stdout] 45 + "TIME_ON" => AdifType::Time(entry.time.time()), [INFO] [stdout] 46 + "TIME_OFF" => AdifType::Time(entry.time.time() + Duration::minutes(5)), [INFO] [stdout] 47 + "RST_RECVD" => AdifType::Str(entry.recv_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 48 + "RST_SENT" => AdifType::Str(entry.sent_rst.clone().unwrap_or("".to_string())), [INFO] [stdout] 49 + "GRIDSQUARE" => AdifType::Str(entry.grid.clone().unwrap_or("".to_string())), [INFO] [stdout] 50 + "NAME" => AdifType::Str(entry.name.clone().unwrap_or("".to_string())), [INFO] [stdout] 51 + "TX_PWR" => AdifType::Number(entry.tx_pwr.unwrap_or(0.0) as f64), [INFO] [stdout] 52 ~ }.into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/new.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/new.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub fn exec_new_log( [INFO] [stdout] 12 | | callsign: &str, [INFO] [stdout] 13 | | frequency: f32, [INFO] [stdout] 14 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 23 | | tx_pwr: Option, [INFO] [stdout] 24 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/log/edit.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/commands/log/edit.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub fn exec_edit_log( [INFO] [stdout] 7 | | id: &str, [INFO] [stdout] 8 | | callsign: Option<&str>, [INFO] [stdout] 9 | | frequency: Option, [INFO] [stdout] ... | [INFO] [stdout] 18 | | tx_pwr: Option, [INFO] [stdout] 19 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | let logbook = split_index.iter() [INFO] [stdout] | ___________________^ [INFO] [stdout] 26 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 25 - let logbook = split_index.iter() [INFO] [stdout] 26 - .nth(0) [INFO] [stdout] 25 + let logbook = split_index.get(0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | let index: usize = split_index.iter() [INFO] [stdout] | ________________________^ [INFO] [stdout] 29 | | .nth(1) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 28 - let index: usize = split_index.iter() [INFO] [stdout] 29 - .nth(1) [INFO] [stdout] 28 + let index: usize = split_index.get(1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter_mut().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get_mut` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 46 - let entry = book.entries.iter_mut().nth(index); [INFO] [stdout] 46 + let entry = book.entries.get_mut(index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:30 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.get(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/commands/log/edit.rs:94:65 [INFO] [stdout] | [INFO] [stdout] 94 | format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 94 - format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.iter().nth(1).unwrap()) [INFO] [stdout] 94 + format!("{}:{}", split_time.iter().nth(0).unwrap(), split_time.get(1).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/query.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !std::fs::metadata(&book_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(&book_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.iter().next()` on an array [INFO] [stdout] --> src/commands/query.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / file.unwrap() [INFO] [stdout] 22 | | .file_name() [INFO] [stdout] 23 | | .to_str() [INFO] [stdout] 24 | | .unwrap() [INFO] [stdout] ... | [INFO] [stdout] 27 | | .iter() [INFO] [stdout] 28 | | .next() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice [INFO] [stdout] = note: `#[warn(clippy::iter_next_slice)]` on by default [INFO] [stdout] help: try calling [INFO] [stdout] | [INFO] [stdout] 21 ~ file.unwrap() [INFO] [stdout] 22 + .file_name() [INFO] [stdout] 23 + .to_str() [INFO] [stdout] 24 + .unwrap() [INFO] [stdout] 25 + .split('.') [INFO] [stdout] 26 + .collect::>().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new( [INFO] [stdout] 44 | | callsign: &str, [INFO] [stdout] 45 | | frequency: f32, [INFO] [stdout] 46 | | mode: &str, [INFO] [stdout] ... | [INFO] [stdout] 55 | | tx_pwr: Option [INFO] [stdout] 56 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib/data/logentry.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn new_strings( [INFO] [stdout] 75 | | callsign: String, [INFO] [stdout] 76 | | frequency: f32, [INFO] [stdout] 77 | | mode: String, [INFO] [stdout] ... | [INFO] [stdout] 86 | | tx_pwr: Option [INFO] [stdout] 87 | | ) -> Result { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib/mod.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if !std::fs::metadata(get_data_books_path()).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata(get_data_books_path()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:79:22 [INFO] [stdout] | [INFO] [stdout] 79 | .expect(&format!( [INFO] [stdout] | ______________________^ [INFO] [stdout] 80 | | "{} is not a valid number!", [INFO] [stdout] 81 | | "Frequency".bright_blue() [INFO] [stdout] 82 | | )), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ .unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 80 ~ "Frequency".bright_blue())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 93 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] 97 | | None => None, [INFO] [stdout] 98 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 93 + "{} is not a valid number!", [INFO] [stdout] 94 + "Frequency".bright_blue() [INFO] [stdout] 95 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:93:51 [INFO] [stdout] | [INFO] [stdout] 93 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 94 | | "{} is not a valid number!", [INFO] [stdout] 95 | | "Frequency".bright_blue() [INFO] [stdout] 96 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 93 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 94 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / match sub_matches.value_of("frequency") { [INFO] [stdout] 105 | | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] 109 | | None => None, [INFO] [stdout] 110 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ sub_matches.value_of("frequency").map(|freq| freq.parse().expect(&format!( [INFO] [stdout] 105 + "{} is not a valid number!", [INFO] [stdout] 106 + "Frequency".bright_blue() [INFO] [stdout] 107 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:105:53 [INFO] [stdout] | [INFO] [stdout] 105 | Some(freq) => Some(freq.parse().expect(&format!( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 106 | | "{} is not a valid number!", [INFO] [stdout] 107 | | "Frequency".bright_blue() [INFO] [stdout] 108 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 ~ Some(freq) => Some(freq.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 106 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | / match sub_matches.value_of("tx_pwr") { [INFO] [stdout] 120 | | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] 124 | | None => None, [INFO] [stdout] 125 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 ~ sub_matches.value_of("tx_pwr").map(|val| val.parse().expect(&format!( [INFO] [stdout] 120 + "{} is not a valid number!", [INFO] [stdout] 121 + "Frequency".bright_blue() [INFO] [stdout] 122 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:120:51 [INFO] [stdout] | [INFO] [stdout] 120 | Some(val) => Some(val.parse().expect(&format!( [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 121 | | "{} is not a valid number!", [INFO] [stdout] 122 | | "Frequency".bright_blue() [INFO] [stdout] 123 | | ))), [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 ~ Some(val) => Some(val.parse().unwrap_or_else(|_| panic!("{} is not a valid number!", [INFO] [stdout] 121 ~ "Frequency".bright_blue()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 30.28s [INFO] running `Command { std: "docker" "inspect" "ed06aab99cd9bfac38d9dab9a53a962602f3a0e32176552759d8b8e668007e7e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ed06aab99cd9bfac38d9dab9a53a962602f3a0e32176552759d8b8e668007e7e", kill_on_drop: false }` [INFO] [stdout] ed06aab99cd9bfac38d9dab9a53a962602f3a0e32176552759d8b8e668007e7e