[INFO] cloning repository https://github.com/ohjames/burning-sanders [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ohjames/burning-sanders" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fohjames%2Fburning-sanders", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fohjames%2Fburning-sanders'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 45e7ff98c7fc8c5321b300d4aaabae81ffe4851b [INFO] linting ohjames/burning-sanders against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fohjames%2Fburning-sanders" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ohjames/burning-sanders [INFO] finished tweaking git repo https://github.com/ohjames/burning-sanders [INFO] tweaked toml for git repo https://github.com/ohjames/burning-sanders written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ohjames/burning-sanders 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 git repo https://github.com/ohjames/burning-sanders 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded toml v0.5.5 [INFO] [stderr] Downloaded termios v0.3.1 [INFO] [stderr] Downloaded sublime_fuzzy v0.6.0 [INFO] [stderr] Downloaded proc-macro2 v1.0.6 [INFO] [stderr] Downloaded syn v1.0.8 [INFO] [stderr] Downloaded serde_derive v1.0.102 [INFO] [stderr] Downloaded serde v1.0.102 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 41a3adf586a32ad5721bfcfb840445b0d8da7a60292dec5cd802f5ac67fbbcea [INFO] running `Command { std: "docker" "start" "-a" "41a3adf586a32ad5721bfcfb840445b0d8da7a60292dec5cd802f5ac67fbbcea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "41a3adf586a32ad5721bfcfb840445b0d8da7a60292dec5cd802f5ac67fbbcea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "41a3adf586a32ad5721bfcfb840445b0d8da7a60292dec5cd802f5ac67fbbcea", kill_on_drop: false }` [INFO] [stdout] 41a3adf586a32ad5721bfcfb840445b0d8da7a60292dec5cd802f5ac67fbbcea [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 50a8e18035fb9239c2bfb4fa9cdf551c65845fde47fc8405985381aa65ff3377 [INFO] running `Command { std: "docker" "start" "-a" "50a8e18035fb9239c2bfb4fa9cdf551c65845fde47fc8405985381aa65ff3377", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.6 [INFO] [stderr] Compiling syn v1.0.8 [INFO] [stderr] Compiling libc v0.2.65 [INFO] [stderr] Compiling serde v1.0.102 [INFO] [stderr] Checking sublime_fuzzy v0.6.0 [INFO] [stderr] Checking termios v0.3.1 [INFO] [stderr] Compiling quote v1.0.2 [INFO] [stderr] Compiling serde_derive v1.0.102 [INFO] [stderr] Checking toml v0.5.5 [INFO] [stderr] Checking naru v0.4.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | #[derive(Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/c_str.rs:18:20 [INFO] [stdout] | [INFO] [stdout] 18 | const $name: crate::c_str::ConstCStr = crate::c_str::ConstCStr { val: concat!($string, "\0") }; [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use toml; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use xdg; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `fputc` [INFO] [stdout] --> src/tty.rs:3:66 [INFO] [stdout] | [INFO] [stdout] 3 | c_int, c_void, close, fclose, fd_set, fflush, fileno, fprintf, fputc, ioctl, pselect, read, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/main.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | #[derive(Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/c_str.rs:18:20 [INFO] [stdout] | [INFO] [stdout] 18 | const $name: crate::c_str::ConstCStr = crate::c_str::ConstCStr { val: concat!($string, "\0") }; [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use toml; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use xdg; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `fputc` [INFO] [stdout] --> src/tty.rs:3:66 [INFO] [stdout] | [INFO] [stdout] 3 | c_int, c_void, close, fclose, fd_set, fflush, fileno, fprintf, fputc, ioctl, pselect, read, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/main.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:65:25 [INFO] [stdout] | [INFO] [stdout] 65 | eprintln!("{}", e.description()); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `max_width` is never read [INFO] [stdout] --> src/tty.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 39 | pub(crate) struct Tty { [INFO] [stdout] | --- field in this struct [INFO] [stdout] ... [INFO] [stdout] 44 | pub max_width: u16, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl Default for WindowConfig { [INFO] [stdout] 14 | | fn default() -> Self { [INFO] [stdout] 15 | | Self { height: 0 } [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub(crate) struct WindowConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | / impl Default for Config { [INFO] [stdout] 30 | | fn default() -> Self { [INFO] [stdout] 31 | | Self { [INFO] [stdout] 32 | | window: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 21 + #[derive(Default)] [INFO] [stdout] 22 | pub(crate) struct Config { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:65:25 [INFO] [stdout] | [INFO] [stdout] 65 | eprintln!("{}", e.description()); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/config.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | return Ok((control_code, action_name.clone())); [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] 57 - return Ok((control_code, action_name.clone())); [INFO] [stdout] 57 + Ok((control_code, action_name.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/config.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | return other_error!("Invalid binding, must start with c-: {}", binding); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 59 - return other_error!("Invalid binding, must start with c-: {}", binding); [INFO] [stdout] 59 + other_error!("Invalid binding, must start with c-: {}", binding) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/config.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | if last_char < b'a' || last_char > b'z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(b'a'..=b'z').contains(&last_char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `action` after checking its variant with `is_some` [INFO] [stdout] --> src/selector.rs:100:15 [INFO] [stdout] | [INFO] [stdout] 99 | if action.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = action` [INFO] [stdout] 100 | action.unwrap()(self)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/selector.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | if self.criteria.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/selector.rs:131:24 [INFO] [stdout] | [INFO] [stdout] 131 | let has_criteria = self.criteria.len() != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/selector.rs:255:8 [INFO] [stdout] | [INFO] [stdout] 255 | .map(|choice| match best_match(&self.criteria, choice) { [INFO] [stdout] | ________^ [INFO] [stdout] 256 | | None => None, [INFO] [stdout] 257 | | Some(v) => Some(Match { [INFO] [stdout] 258 | | ranges: v.continuous_matches(), [INFO] [stdout] ... | [INFO] [stdout] 262 | | }) [INFO] [stdout] 263 | | .flatten() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `filter_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 255 ~ .filter_map(|choice| match best_match(&self.criteria, choice) { [INFO] [stdout] 256 + None => None, [INFO] [stdout] 257 + Some(v) => Some(Match { [INFO] [stdout] 258 + ranges: v.continuous_matches(), [INFO] [stdout] 259 + score: v.score(), [INFO] [stdout] 260 + choice: &choice, [INFO] [stdout] 261 + }), [INFO] [stdout] 262 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/selector.rs:255:21 [INFO] [stdout] | [INFO] [stdout] 255 | .map(|choice| match best_match(&self.criteria, choice) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 256 | | None => None, [INFO] [stdout] 257 | | Some(v) => Some(Match { [INFO] [stdout] 258 | | ranges: v.continuous_matches(), [INFO] [stdout] ... | [INFO] [stdout] 261 | | }), [INFO] [stdout] 262 | | }) [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] 255 ~ .map(|choice| best_match(&self.criteria, choice).map(|v| Match { [INFO] [stdout] 256 + ranges: v.continuous_matches(), [INFO] [stdout] 257 + score: v.score(), [INFO] [stdout] 258 + choice: &choice, [INFO] [stdout] 259 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/selector.rs:260:19 [INFO] [stdout] | [INFO] [stdout] 260 | choice: &choice, [INFO] [stdout] | ^^^^^^^ help: change this to: `choice` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/selector.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 - matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] 266 + matches.sort_by_key(|b| std::cmp::Reverse(b.score)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/selector.rs:274:8 [INFO] [stdout] | [INFO] [stdout] 274 | ) -> io::Result io::Result<()>>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/selector.rs:286:10 [INFO] [stdout] | [INFO] [stdout] 286 | if !action.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `action.is_none()` [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: length comparison to zero [INFO] [stdout] --> src/selector.rs:327:8 [INFO] [stdout] | [INFO] [stdout] 327 | if selector.criteria.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!selector.criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Termios` which implements the `Copy` trait [INFO] [stdout] --> src/tty.rs:60:28 [INFO] [stdout] | [INFO] [stdout] 60 | let mut termios_copy = original_termios.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `original_termios` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | if trimmed.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trimmed.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:38:31 [INFO] [stdout] | [INFO] [stdout] 38 | let mut terminal = Tty::new(&TTY_PATH)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `TTY_PATH` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:42:63 [INFO] [stdout] | [INFO] [stdout] 42 | let mut selector = Selector::new(&mut terminal, &choices, &conf); [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | #[derive(Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_WindowConfig` [INFO] [stdout] 8 | #[serde(deny_unknown_fields)] [INFO] [stdout] 9 | pub(crate) struct WindowConfig { [INFO] [stdout] | ------------ `WindowConfig` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Config` [INFO] [stdout] 20 | #[serde(deny_unknown_fields)] [INFO] [stdout] 21 | pub(crate) struct Config { [INFO] [stdout] | ------ `Config` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `max_width` is never read [INFO] [stdout] --> src/tty.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 39 | pub(crate) struct Tty { [INFO] [stdout] | --- field in this struct [INFO] [stdout] ... [INFO] [stdout] 44 | pub max_width: u16, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/tty.rs:52:45 [INFO] [stdout] | [INFO] [stdout] 52 | unsafe { signal(SIGWINCH, winch_handler as sighandler_t) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(function_casts_as_integer)]` on by default [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 52 | unsafe { signal(SIGWINCH, winch_handler as *const () as sighandler_t) }; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl Default for WindowConfig { [INFO] [stdout] 14 | | fn default() -> Self { [INFO] [stdout] 15 | | Self { height: 0 } [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub(crate) struct WindowConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | / impl Default for Config { [INFO] [stdout] 30 | | fn default() -> Self { [INFO] [stdout] 31 | | Self { [INFO] [stdout] 32 | | window: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 21 + #[derive(Default)] [INFO] [stdout] 22 | pub(crate) struct Config { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/config.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | return Ok((control_code, action_name.clone())); [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] 57 - return Ok((control_code, action_name.clone())); [INFO] [stdout] 57 + Ok((control_code, action_name.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/config.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | return other_error!("Invalid binding, must start with c-: {}", binding); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 59 - return other_error!("Invalid binding, must start with c-: {}", binding); [INFO] [stdout] 59 + other_error!("Invalid binding, must start with c-: {}", binding) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/config.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | if last_char < b'a' || last_char > b'z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(b'a'..=b'z').contains(&last_char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `action` after checking its variant with `is_some` [INFO] [stdout] --> src/selector.rs:100:15 [INFO] [stdout] | [INFO] [stdout] 99 | if action.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = action` [INFO] [stdout] 100 | action.unwrap()(self)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/selector.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | if self.criteria.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/selector.rs:131:24 [INFO] [stdout] | [INFO] [stdout] 131 | let has_criteria = self.criteria.len() != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/selector.rs:255:8 [INFO] [stdout] | [INFO] [stdout] 255 | .map(|choice| match best_match(&self.criteria, choice) { [INFO] [stdout] | ________^ [INFO] [stdout] 256 | | None => None, [INFO] [stdout] 257 | | Some(v) => Some(Match { [INFO] [stdout] 258 | | ranges: v.continuous_matches(), [INFO] [stdout] ... | [INFO] [stdout] 262 | | }) [INFO] [stdout] 263 | | .flatten() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `filter_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 255 ~ .filter_map(|choice| match best_match(&self.criteria, choice) { [INFO] [stdout] 256 + None => None, [INFO] [stdout] 257 + Some(v) => Some(Match { [INFO] [stdout] 258 + ranges: v.continuous_matches(), [INFO] [stdout] 259 + score: v.score(), [INFO] [stdout] 260 + choice: &choice, [INFO] [stdout] 261 + }), [INFO] [stdout] 262 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/selector.rs:255:21 [INFO] [stdout] | [INFO] [stdout] 255 | .map(|choice| match best_match(&self.criteria, choice) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 256 | | None => None, [INFO] [stdout] 257 | | Some(v) => Some(Match { [INFO] [stdout] 258 | | ranges: v.continuous_matches(), [INFO] [stdout] ... | [INFO] [stdout] 261 | | }), [INFO] [stdout] 262 | | }) [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] 255 ~ .map(|choice| best_match(&self.criteria, choice).map(|v| Match { [INFO] [stdout] 256 + ranges: v.continuous_matches(), [INFO] [stdout] 257 + score: v.score(), [INFO] [stdout] 258 + choice: &choice, [INFO] [stdout] 259 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/selector.rs:260:19 [INFO] [stdout] | [INFO] [stdout] 260 | choice: &choice, [INFO] [stdout] | ^^^^^^^ help: change this to: `choice` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/selector.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 - matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] 266 + matches.sort_by_key(|b| std::cmp::Reverse(b.score)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/selector.rs:274:8 [INFO] [stdout] | [INFO] [stdout] 274 | ) -> io::Result io::Result<()>>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/selector.rs:286:10 [INFO] [stdout] | [INFO] [stdout] 286 | if !action.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `action.is_none()` [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: length comparison to zero [INFO] [stdout] --> src/selector.rs:327:8 [INFO] [stdout] | [INFO] [stdout] 327 | if selector.criteria.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!selector.criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Termios` which implements the `Copy` trait [INFO] [stdout] --> src/tty.rs:60:28 [INFO] [stdout] | [INFO] [stdout] 60 | let mut termios_copy = original_termios.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `original_termios` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | if trimmed.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trimmed.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:38:31 [INFO] [stdout] | [INFO] [stdout] 38 | let mut terminal = Tty::new(&TTY_PATH)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `TTY_PATH` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:42:63 [INFO] [stdout] | [INFO] [stdout] 42 | let mut selector = Selector::new(&mut terminal, &choices, &conf); [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | #[derive(Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_WindowConfig` [INFO] [stdout] 8 | #[serde(deny_unknown_fields)] [INFO] [stdout] 9 | pub(crate) struct WindowConfig { [INFO] [stdout] | ------------ `WindowConfig` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Config` [INFO] [stdout] 20 | #[serde(deny_unknown_fields)] [INFO] [stdout] 21 | pub(crate) struct Config { [INFO] [stdout] | ------ `Config` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/tty.rs:52:45 [INFO] [stdout] | [INFO] [stdout] 52 | unsafe { signal(SIGWINCH, winch_handler as sighandler_t) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(function_casts_as_integer)]` on by default [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 52 | unsafe { signal(SIGWINCH, winch_handler as *const () as sighandler_t) }; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.65s [INFO] running `Command { std: "docker" "inspect" "50a8e18035fb9239c2bfb4fa9cdf551c65845fde47fc8405985381aa65ff3377", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "50a8e18035fb9239c2bfb4fa9cdf551c65845fde47fc8405985381aa65ff3377", kill_on_drop: false }` [INFO] [stdout] 50a8e18035fb9239c2bfb4fa9cdf551c65845fde47fc8405985381aa65ff3377