[INFO] fetching crate webkitten 0.1.0... [INFO] linting webkitten-0.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate webkitten 0.1.0 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate webkitten 0.1.0 [INFO] finished tweaking crates.io crate webkitten 0.1.0 [INFO] tweaked toml for crates.io crate webkitten 0.1.0 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate webkitten 0.1.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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 19 packages to latest compatible versions [INFO] [stderr] Adding hlua v0.1.9 (available: v0.4.3) [INFO] [stderr] Adding log v0.3.9 (available: v0.4.29) [INFO] [stderr] Adding toml v0.1.30 (available: v1.0.7+spec-1.1.0) [INFO] [stderr] Adding url v1.7.2 (available: v2.5.8) [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: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded toml v0.1.30 [INFO] [stderr] Downloaded hlua v0.1.9 [INFO] [stderr] Downloaded lua52-sys v0.0.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 5cc89ed532e5983a23e61037e707f7f88bac05298c5672d165fa7099f2f76600 [INFO] running `Command { std: "docker" "start" "-a" "5cc89ed532e5983a23e61037e707f7f88bac05298c5672d165fa7099f2f76600", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5cc89ed532e5983a23e61037e707f7f88bac05298c5672d165fa7099f2f76600", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5cc89ed532e5983a23e61037e707f7f88bac05298c5672d165fa7099f2f76600", kill_on_drop: false }` [INFO] [stdout] 5cc89ed532e5983a23e61037e707f7f88bac05298c5672d165fa7099f2f76600 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 9eb27e616be164ac4dc216821c8c9a2cc2a5b1b921b6750fc1b968d6e4cf8a96 [INFO] running `Command { std: "docker" "start" "-a" "9eb27e616be164ac4dc216821c8c9a2cc2a5b1b921b6750fc1b968d6e4cf8a96", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Compiling gcc v0.3.55 [INFO] [stderr] Checking unicode-bidi v0.3.18 [INFO] [stderr] Checking percent-encoding v1.0.1 [INFO] [stderr] Compiling webkitten v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking toml v0.1.30 [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> build.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | / match env::var("CFLAGS") { [INFO] [stdout] 5 | | Ok(cflags) => println!("cargo:rustc-flags={}", cflags), [INFO] [stdout] 6 | | _ => {} [INFO] [stdout] 7 | | } [INFO] [stdout] | |_____^ help: try: `if let Ok(cflags) = env::var("CFLAGS") { println!("cargo:rustc-flags={}", cflags) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking idna v0.1.5 [INFO] [stderr] Compiling lua52-sys v0.0.4 [INFO] [stderr] Checking url v1.7.2 [INFO] [stderr] Checking hlua v0.1.9 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/command.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | path: path, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | pub const DEFAULT_CONFIG: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | const CONFIG_DIR: &'static str = "CONFIG_DIR"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | const HOME: &'static str = "HOME"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/config.rs:117:40 [INFO] [stdout] | [INFO] [stdout] 117 | Ok(value) => Some(Config { value: value }), [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/ui.rs:384:27 [INFO] [stdout] | [INFO] [stdout] 384 | const URI_DELIMITER: &'static str = "://"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/ui.rs:385:27 [INFO] [stdout] | [INFO] [stdout] 385 | const HTTP_PROTOCOL: &'static str = "http"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/optparse.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | path: path, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/optparse.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | exit_status: exit_status [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `exit_status` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/script/lua.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | const FILE_EXTENSION: &'static str = "lua"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | const SHIFT_CODES: [&'static str; 1] = ["shift"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | const CONTROL_CODES: [&'static str; 2] = ["control", "ctrl"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:14:20 [INFO] [stdout] | [INFO] [stdout] 14 | const ALT_CODES: [&'static str; 3] = ["alt", "option", "opt"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | const SUPER_CODES: [&'static str; 3] = ["super", "cmd", "command"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:16:19 [INFO] [stdout] | [INFO] [stdout] 16 | const FN_CODES: [&'static str; 2] = ["fn", "function"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:17:20 [INFO] [stdout] | [INFO] [stdout] 17 | const SPACE_CODE: &'static str = "space"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/keybinding.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | ParseError { reason: reason, message: message } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `reason` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/keybinding.rs:55:38 [INFO] [stdout] | [INFO] [stdout] 55 | ParseError { reason: reason, message: message } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib.rs:18:30 [INFO] [stdout] | [INFO] [stdout] 18 | pub const WEBKITTEN_APP_ID: &'static str = "me.delisa.Webkitten"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | pub const WEBKITTEN_TITLE: &'static str = "Webkitten"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/command.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | path: path, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | pub const DEFAULT_CONFIG: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | const CONFIG_DIR: &'static str = "CONFIG_DIR"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | const HOME: &'static str = "HOME"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/config.rs:117:40 [INFO] [stdout] | [INFO] [stdout] 117 | Ok(value) => Some(Config { value: value }), [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/ui.rs:384:27 [INFO] [stdout] | [INFO] [stdout] 384 | const URI_DELIMITER: &'static str = "://"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/ui.rs:385:27 [INFO] [stdout] | [INFO] [stdout] 385 | const HTTP_PROTOCOL: &'static str = "http"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/optparse.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | path: path, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/optparse.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | exit_status: exit_status [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `exit_status` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/script/lua.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | const FILE_EXTENSION: &'static str = "lua"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | const SHIFT_CODES: [&'static str; 1] = ["shift"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | const CONTROL_CODES: [&'static str; 2] = ["control", "ctrl"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:14:20 [INFO] [stdout] | [INFO] [stdout] 14 | const ALT_CODES: [&'static str; 3] = ["alt", "option", "opt"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | const SUPER_CODES: [&'static str; 3] = ["super", "cmd", "command"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:16:19 [INFO] [stdout] | [INFO] [stdout] 16 | const FN_CODES: [&'static str; 2] = ["fn", "function"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/keybinding.rs:17:20 [INFO] [stdout] | [INFO] [stdout] 17 | const SPACE_CODE: &'static str = "space"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/keybinding.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | ParseError { reason: reason, message: message } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `reason` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/keybinding.rs:55:38 [INFO] [stdout] | [INFO] [stdout] 55 | ParseError { reason: reason, message: message } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib.rs:18:30 [INFO] [stdout] | [INFO] [stdout] 18 | pub const WEBKITTEN_APP_ID: &'static str = "me.delisa.Webkitten"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/script/mod.rs:28:32 [INFO] [stdout] | [INFO] [stdout] 28 | fn cause(&self) -> Option<&Error> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 28 | fn cause(&self) -> Option<&dyn Error> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | pub const WEBKITTEN_TITLE: &'static str = "Webkitten"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/script/mod.rs:28:32 [INFO] [stdout] | [INFO] [stdout] 28 | fn cause(&self) -> Option<&Error> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 28 | fn cause(&self) -> Option<&dyn Error> { [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/script/lua.rs:115:71 [INFO] [stdout] | [INFO] [stdout] 115 | LuaError::ReadError(err) => full_description.push_str(err.description()), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` 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/script/lua.rs:115:71 [INFO] [stdout] | [INFO] [stdout] 115 | LuaError::ReadError(err) => full_description.push_str(err.description()), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/command.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / components.next() [INFO] [stdout] 21 | | .and_then(|name| config.resolved_command_name(name)) [INFO] [stdout] 22 | | .and_then(|name| resolve_command(config.command_search_paths(), &name, suffix)) [INFO] [stdout] 23 | | .and_then(|path| { [INFO] [stdout] ... | [INFO] [stdout] 27 | | }) [INFO] [stdout] 28 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 20 ~ components.next() [INFO] [stdout] 21 + .and_then(|name| config.resolved_command_name(name)) [INFO] [stdout] 22 + .and_then(|name| resolve_command(config.command_search_paths(), &name, suffix)).map(|path| Command { [INFO] [stdout] 23 + path: path, [INFO] [stdout] 24 + arguments: components.map(|arg| String::from(arg)).collect(), [INFO] [stdout] 25 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/command.rs:26:47 [INFO] [stdout] | [INFO] [stdout] 26 | arguments: components.map(|arg| String::from(arg)).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/command.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | / for entry in contents { [INFO] [stdout] 36 | | if let Ok(entry) = entry { [INFO] [stdout] 37 | | let path = entry.path(); [INFO] [stdout] 38 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/command.rs:36:21 [INFO] [stdout] | [INFO] [stdout] 36 | / if let Ok(entry) = entry { [INFO] [stdout] 37 | | let path = entry.path(); [INFO] [stdout] 38 | | if path.is_file() { [INFO] [stdout] 39 | | if let Some(stem) = path.file_stem().and_then(|p| p.to_str()) { [INFO] [stdout] ... | [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 35 ~ for entry in contents.flatten() { [INFO] [stdout] 36 + let path = entry.path(); [INFO] [stdout] 37 + if path.is_file() { [INFO] [stdout] 38 + if let Some(stem) = path.file_stem().and_then(|p| p.to_str()) { [INFO] [stdout] 39 + if stem.starts_with(prefix) { [INFO] [stdout] 40 + entries.push(String::from(stem)); [INFO] [stdout] 41 + } [INFO] [stdout] 42 + } [INFO] [stdout] 43 + } [INFO] [stdout] 44 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/command.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | return ordered_paths.pop(); [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] 70 - return ordered_paths.pop(); [INFO] [stdout] 70 + ordered_paths.pop() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/command.rs:66:39 [INFO] [stdout] | [INFO] [stdout] 66 | .filter_map(|path| join_paths(&path, &format!("{}.{}", name, suffix))) [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/command.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | .filter(|path| metadata(&path).is_ok()) [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/command.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | buf.to_str().and_then(|path| Some(String::from(path))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `buf.to_str().map(|path| String::from(path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/command.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | return (String::from(file_path.to_str().unwrap()), result); [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] 116 - return (String::from(file_path.to_str().unwrap()), result); [INFO] [stdout] 116 + (String::from(file_path.to_str().unwrap()), result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / self.lookup(key) [INFO] [stdout] 132 | | .and_then(|value| value.as_str()) [INFO] [stdout] 133 | | .and_then(|value| Some(String::from(value))) [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 131 ~ self.lookup(key) [INFO] [stdout] 132 + .and_then(|value| value.as_str()).map(|value| String::from(value)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / self.lookup_raw_str(key) [INFO] [stdout] 138 | | .and_then(|value| Some(self.parse_path(&value))) [INFO] [stdout] | |____________________________________________________________^ help: try: `self.lookup_raw_str(key).map(|value| self.parse_path(&value))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | / self.lookup(key) [INFO] [stdout] 161 | | .and_then(|value| value.as_slice()) [INFO] [stdout] 162 | | .and_then(|values| { [INFO] [stdout] 163 | | let mut str_values: Vec = vec![]; [INFO] [stdout] ... | [INFO] [stdout] 169 | | Some(str_values) [INFO] [stdout] 170 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 162 ~ .map(|values| { [INFO] [stdout] 163 | let mut str_values: Vec = vec![]; [INFO] [stdout] ... [INFO] [stdout] 168 | } [INFO] [stdout] 169 ~ str_values [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/config.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / pub fn default() -> Option { [INFO] [stdout] 178 | | Config::parse(DEFAULT_CONFIG) [INFO] [stdout] 179 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/config.rs:202:27 [INFO] [stdout] | [INFO] [stdout] 202 | self.value.lookup(&key.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `key.clone()` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/config.rs:209:27 [INFO] [stdout] | [INFO] [stdout] 209 | fn replace_config_dir<'a>(&self, value: &'a str) -> String { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 209 - fn replace_config_dir<'a>(&self, value: &'a str) -> String { [INFO] [stdout] 209 + fn replace_config_dir(&self, value: &str) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / self.config_dir() [INFO] [stdout] 211 | | .and_then(|dir| Some(value.replace(CONFIG_DIR, &dir))) [INFO] [stdout] | |__________________________________________________________________^ help: try: `self.config_dir().map(|dir| value.replace(CONFIG_DIR, &dir))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/config.rs:218:44 [INFO] [stdout] | [INFO] [stdout] 218 | return value.replace(HOME, &home) [INFO] [stdout] | ^^^^^ help: change this to: `home` [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 lifetime isn't used in the function definition [INFO] [stdout] --> src/ui.rs:74:21 [INFO] [stdout] | [INFO] [stdout] 74 | fn open_webview<'a, U, B>(&self, window_index: u32, uri: Option, config: Option) [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ui.rs:247:32 [INFO] [stdout] | [INFO] [stdout] 247 | if let Some(_) = table.insert(command.to_owned(), (key, modifier)) { [INFO] [stdout] | -------^^^^^^^---------------------------------------------------- help: try: `if table.insert(command.to_owned(), (key, modifier)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/ui.rs:324:19 [INFO] [stdout] | [INFO] [stdout] 324 | let key = match event { [INFO] [stdout] | ___________________^ [INFO] [stdout] 325 | | &BufferEvent::Load => "commands.on-load-uri", [INFO] [stdout] 326 | | &BufferEvent::Request => "commands.on-request-uri", [INFO] [stdout] 327 | | &BufferEvent::Focus => "commands.on-focus-uri", [INFO] [stdout] 328 | | &BufferEvent::Fail(_) => "commands.on-fail-uri", [INFO] [stdout] 329 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 324 ~ let key = match *event { [INFO] [stdout] 325 ~ BufferEvent::Load => "commands.on-load-uri", [INFO] [stdout] 326 ~ BufferEvent::Request => "commands.on-request-uri", [INFO] [stdout] 327 ~ BufferEvent::Focus => "commands.on-focus-uri", [INFO] [stdout] 328 ~ BufferEvent::Fail(_) => "commands.on-fail-uri", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/command.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / components.next() [INFO] [stdout] 21 | | .and_then(|name| config.resolved_command_name(name)) [INFO] [stdout] 22 | | .and_then(|name| resolve_command(config.command_search_paths(), &name, suffix)) [INFO] [stdout] 23 | | .and_then(|path| { [INFO] [stdout] ... | [INFO] [stdout] 27 | | }) [INFO] [stdout] 28 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 20 ~ components.next() [INFO] [stdout] 21 + .and_then(|name| config.resolved_command_name(name)) [INFO] [stdout] 22 + .and_then(|name| resolve_command(config.command_search_paths(), &name, suffix)).map(|path| Command { [INFO] [stdout] 23 + path: path, [INFO] [stdout] 24 + arguments: components.map(|arg| String::from(arg)).collect(), [INFO] [stdout] 25 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui.rs:359:34 [INFO] [stdout] | [INFO] [stdout] 359 | .or(self.lookup_bool(&key)) [INFO] [stdout] | ^^^^ help: change this to: `key` [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: redundant closure [INFO] [stdout] --> src/command.rs:26:47 [INFO] [stdout] | [INFO] [stdout] 26 | arguments: components.map(|arg| String::from(arg)).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/command.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | / for entry in contents { [INFO] [stdout] 36 | | if let Ok(entry) = entry { [INFO] [stdout] 37 | | let path = entry.path(); [INFO] [stdout] 38 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/command.rs:36:21 [INFO] [stdout] | [INFO] [stdout] 36 | / if let Ok(entry) = entry { [INFO] [stdout] 37 | | let path = entry.path(); [INFO] [stdout] 38 | | if path.is_file() { [INFO] [stdout] 39 | | if let Some(stem) = path.file_stem().and_then(|p| p.to_str()) { [INFO] [stdout] ... | [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 35 ~ for entry in contents.flatten() { [INFO] [stdout] 36 + let path = entry.path(); [INFO] [stdout] 37 + if path.is_file() { [INFO] [stdout] 38 + if let Some(stem) = path.file_stem().and_then(|p| p.to_str()) { [INFO] [stdout] 39 + if stem.starts_with(prefix) { [INFO] [stdout] 40 + entries.push(String::from(stem)); [INFO] [stdout] 41 + } [INFO] [stdout] 42 + } [INFO] [stdout] 43 + } [INFO] [stdout] 44 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui.rs:368:33 [INFO] [stdout] | [INFO] [stdout] 368 | .or(self.lookup_str(&key)) [INFO] [stdout] | ^^^^ help: change this to: `key` [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/ui.rs:377:37 [INFO] [stdout] | [INFO] [stdout] 377 | .or(self.lookup_str_vec(&key)) [INFO] [stdout] | ^^^^ help: change this to: `key` [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: unneeded `return` statement [INFO] [stdout] --> src/command.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | return ordered_paths.pop(); [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] 70 - return ordered_paths.pop(); [INFO] [stdout] 70 + ordered_paths.pop() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/optparse.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | return opts.usage(&brief); [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] 51 - return opts.usage(&brief); [INFO] [stdout] 51 + opts.usage(&brief) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/command.rs:66:39 [INFO] [stdout] | [INFO] [stdout] 66 | .filter_map(|path| join_paths(&path, &format!("{}.{}", name, suffix))) [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: this boolean expression can be simplified [INFO] [stdout] --> src/optparse.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | if !fs::metadata(config_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(config_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: the borrowed expression implements the required traits [INFO] [stdout] --> src/command.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | .filter(|path| metadata(&path).is_ok()) [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/command.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | buf.to_str().and_then(|path| Some(String::from(path))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `buf.to_str().map(|path| String::from(path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / self.lookup(key) [INFO] [stdout] 132 | | .and_then(|value| value.as_str()) [INFO] [stdout] 133 | | .and_then(|value| Some(String::from(value))) [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 131 ~ self.lookup(key) [INFO] [stdout] 132 + .and_then(|value| value.as_str()).map(|value| String::from(value)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / self.lookup_raw_str(key) [INFO] [stdout] 138 | | .and_then(|value| Some(self.parse_path(&value))) [INFO] [stdout] | |____________________________________________________________^ help: try: `self.lookup_raw_str(key).map(|value| self.parse_path(&value))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/script/lua.rs:69:31 [INFO] [stdout] | [INFO] [stdout] 69 | .and_then(|output| coerce_lua_array(output)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `coerce_lua_array` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | / self.lookup(key) [INFO] [stdout] 161 | | .and_then(|value| value.as_slice()) [INFO] [stdout] 162 | | .and_then(|values| { [INFO] [stdout] 163 | | let mut str_values: Vec = vec![]; [INFO] [stdout] ... | [INFO] [stdout] 169 | | Some(str_values) [INFO] [stdout] 170 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 162 ~ .map(|values| { [INFO] [stdout] 163 | let mut str_values: Vec = vec![]; [INFO] [stdout] ... [INFO] [stdout] 168 | } [INFO] [stdout] 169 ~ str_values [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/config.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / pub fn default() -> Option { [INFO] [stdout] 178 | | Config::parse(DEFAULT_CONFIG) [INFO] [stdout] 179 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/script/lua.rs:90:48 [INFO] [stdout] | [INFO] [stdout] 90 | let func: Option> = match event { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 91 | | &BufferEvent::Load => lua.get("on_load_uri"), [INFO] [stdout] 92 | | &BufferEvent::Focus => lua.get("on_focus"), [INFO] [stdout] 93 | | &BufferEvent::Request => lua.get("on_request_uri"), [INFO] [stdout] ... | [INFO] [stdout] 97 | | }, [INFO] [stdout] 98 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 90 ~ let func: Option> = match *event { [INFO] [stdout] 91 ~ BufferEvent::Load => lua.get("on_load_uri"), [INFO] [stdout] 92 ~ BufferEvent::Focus => lua.get("on_focus"), [INFO] [stdout] 93 ~ BufferEvent::Request => lua.get("on_request_uri"), [INFO] [stdout] 94 ~ BufferEvent::Fail(ref message) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/script/lua.rs:94:17 [INFO] [stdout] | [INFO] [stdout] 94 | &BufferEvent::Fail(ref message) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 94 - &BufferEvent::Fail(ref message) => { [INFO] [stdout] 94 + BufferEvent::Fail(message) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/script/lua.rs:124:12 [INFO] [stdout] | [INFO] [stdout] 124 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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: redundant closure [INFO] [stdout] --> src/script/lua.rs:127:37 [INFO] [stdout] | [INFO] [stdout] 127 | Ok(value.split(",").map(|v| String::from(v)).collect()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/config.rs:202:27 [INFO] [stdout] | [INFO] [stdout] 202 | self.value.lookup(&key.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `key.clone()` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/config.rs:209:27 [INFO] [stdout] | [INFO] [stdout] 209 | fn replace_config_dir<'a>(&self, value: &'a str) -> String { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 209 - fn replace_config_dir<'a>(&self, value: &'a str) -> String { [INFO] [stdout] 209 + fn replace_config_dir(&self, value: &str) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/config.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / self.config_dir() [INFO] [stdout] 211 | | .and_then(|dir| Some(value.replace(CONFIG_DIR, &dir))) [INFO] [stdout] | |__________________________________________________________________^ help: try: `self.config_dir().map(|dir| value.replace(CONFIG_DIR, &dir))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/config.rs:218:44 [INFO] [stdout] | [INFO] [stdout] 218 | return value.replace(HOME, &home) [INFO] [stdout] | ^^^^^ help: change this to: `home` [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 lifetime isn't used in the function definition [INFO] [stdout] --> src/ui.rs:74:21 [INFO] [stdout] | [INFO] [stdout] 74 | fn open_webview<'a, U, B>(&self, window_index: u32, uri: Option, config: Option) [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ui.rs:247:32 [INFO] [stdout] | [INFO] [stdout] 247 | if let Some(_) = table.insert(command.to_owned(), (key, modifier)) { [INFO] [stdout] | -------^^^^^^^---------------------------------------------------- help: try: `if table.insert(command.to_owned(), (key, modifier)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/ui.rs:324:19 [INFO] [stdout] | [INFO] [stdout] 324 | let key = match event { [INFO] [stdout] | ___________________^ [INFO] [stdout] 325 | | &BufferEvent::Load => "commands.on-load-uri", [INFO] [stdout] 326 | | &BufferEvent::Request => "commands.on-request-uri", [INFO] [stdout] 327 | | &BufferEvent::Focus => "commands.on-focus-uri", [INFO] [stdout] 328 | | &BufferEvent::Fail(_) => "commands.on-fail-uri", [INFO] [stdout] 329 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 324 ~ let key = match *event { [INFO] [stdout] 325 ~ BufferEvent::Load => "commands.on-load-uri", [INFO] [stdout] 326 ~ BufferEvent::Request => "commands.on-request-uri", [INFO] [stdout] 327 ~ BufferEvent::Focus => "commands.on-focus-uri", [INFO] [stdout] 328 ~ BufferEvent::Fail(_) => "commands.on-fail-uri", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui.rs:359:34 [INFO] [stdout] | [INFO] [stdout] 359 | .or(self.lookup_bool(&key)) [INFO] [stdout] | ^^^^ help: change this to: `key` [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/ui.rs:368:33 [INFO] [stdout] | [INFO] [stdout] 368 | .or(self.lookup_str(&key)) [INFO] [stdout] | ^^^^ help: change this to: `key` [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/ui.rs:377:37 [INFO] [stdout] | [INFO] [stdout] 377 | .or(self.lookup_str_vec(&key)) [INFO] [stdout] | ^^^^ help: change this to: `key` [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: unneeded `return` statement [INFO] [stdout] --> src/optparse.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | return opts.usage(&brief); [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] 51 - return opts.usage(&brief); [INFO] [stdout] 51 + opts.usage(&brief) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/optparse.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | if !fs::metadata(config_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(config_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: redundant closure [INFO] [stdout] --> src/script/lua.rs:69:31 [INFO] [stdout] | [INFO] [stdout] 69 | .and_then(|output| coerce_lua_array(output)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `coerce_lua_array` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/script/lua.rs:90:48 [INFO] [stdout] | [INFO] [stdout] 90 | let func: Option> = match event { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 91 | | &BufferEvent::Load => lua.get("on_load_uri"), [INFO] [stdout] 92 | | &BufferEvent::Focus => lua.get("on_focus"), [INFO] [stdout] 93 | | &BufferEvent::Request => lua.get("on_request_uri"), [INFO] [stdout] ... | [INFO] [stdout] 97 | | }, [INFO] [stdout] 98 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 90 ~ let func: Option> = match *event { [INFO] [stdout] 91 ~ BufferEvent::Load => lua.get("on_load_uri"), [INFO] [stdout] 92 ~ BufferEvent::Focus => lua.get("on_focus"), [INFO] [stdout] 93 ~ BufferEvent::Request => lua.get("on_request_uri"), [INFO] [stdout] 94 ~ BufferEvent::Fail(ref message) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/script/lua.rs:94:17 [INFO] [stdout] | [INFO] [stdout] 94 | &BufferEvent::Fail(ref message) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 94 - &BufferEvent::Fail(ref message) => { [INFO] [stdout] 94 + BufferEvent::Fail(message) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/script/lua.rs:124:12 [INFO] [stdout] | [INFO] [stdout] 124 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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: redundant closure [INFO] [stdout] --> src/script/lua.rs:127:37 [INFO] [stdout] | [INFO] [stdout] 127 | Ok(value.split(",").map(|v| String::from(v)).collect()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/script/lua.rs:386:18 [INFO] [stdout] | [INFO] [stdout] 386 | dir.push(&format!("{}.lua", name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}.lua", name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/keybinding.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | format!("No key specified in chord"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No key specified in chord".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/keybinding.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | format!("No modifier specified in chord"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No modifier specified in chord".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `key` after checking its variant with `is_some` [INFO] [stdout] --> src/keybinding.rs:73:49 [INFO] [stdout] | [INFO] [stdout] 71 | if key.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = key` [INFO] [stdout] 72 | return Err(ParseError::new(ParseErrorReason::TooManyKeysSpecified, [INFO] [stdout] 73 | vec![key.unwrap(), component], [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: called `unwrap` on `key` after checking its variant with `is_none` [INFO] [stdout] --> src/keybinding.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 100 | if key.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = key` [INFO] [stdout] ... [INFO] [stdout] 105 | Ok((key.unwrap().chars().next().unwrap(), modifier)) [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] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / config::Config::parse_file(&runtime.path).and_then(|config| { [INFO] [stdout] 34 | | info!("Creating application engine with config path: {}", &runtime.path); [INFO] [stdout] 35 | | Some(Engine { [INFO] [stdout] 36 | | config: config, [INFO] [stdout] 37 | | run_config: runtime [INFO] [stdout] 38 | | }) [INFO] [stdout] 39 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 33 ~ config::Config::parse_file(&runtime.path).map(|config| { [INFO] [stdout] 34 | info!("Creating application engine with config path: {}", &runtime.path); [INFO] [stdout] 35 ~ Engine { [INFO] [stdout] 36 + config: config, [INFO] [stdout] 37 + run_config: runtime [INFO] [stdout] 38 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/lib.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn initial_pages<'a>(&'a self) -> &'a Vec { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 43 - pub fn initial_pages<'a>(&'a self) -> &'a Vec { [INFO] [stdout] 43 + pub fn initial_pages(&self) -> &Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | return self.execute_command(ui, window_index, &text); [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] 73 - return self.execute_command(ui, window_index, &text); [INFO] [stdout] 73 + self.execute_command(ui, window_index, &text) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:90:17 [INFO] [stdout] | [INFO] [stdout] 90 | return self.execute_command(ui, window_index, &command); [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] 90 - return self.execute_command(ui, window_index, &command); [INFO] [stdout] 90 + self.execute_command(ui, window_index, &command) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/lib.rs:86:35 [INFO] [stdout] | [INFO] [stdout] 86 | let mut command = String::from(default); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | command.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `command.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/keybinding.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | format!("No key specified in chord"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No key specified in chord".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/keybinding.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | format!("No modifier specified in chord"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No modifier specified in chord".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `key` after checking its variant with `is_some` [INFO] [stdout] --> src/keybinding.rs:73:49 [INFO] [stdout] | [INFO] [stdout] 71 | if key.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = key` [INFO] [stdout] 72 | return Err(ParseError::new(ParseErrorReason::TooManyKeysSpecified, [INFO] [stdout] 73 | vec![key.unwrap(), component], [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: called `unwrap` on `key` after checking its variant with `is_none` [INFO] [stdout] --> src/keybinding.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 100 | if key.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = key` [INFO] [stdout] ... [INFO] [stdout] 105 | Ok((key.unwrap().chars().next().unwrap(), modifier)) [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] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:126:21 [INFO] [stdout] | [INFO] [stdout] 126 | / match S::on_buffer_event::(file, ui, &self.run_config.path, window_index, webview_index, uri, &event) { [INFO] [stdout] 127 | | Err(err) => warn!("{}", err), [INFO] [stdout] 128 | | Ok(_) => (), [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Err(err) = S::on_buffer_event::(file, ui, &self.run_config.path, window_index, webview_index, uri, &event) { warn!("{}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/command.rs:95:44 [INFO] [stdout] | [INFO] [stdout] 95 | remove_file(Path::new(path.as_str().clone())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/config.rs:201:53 [INFO] [stdout] | [INFO] [stdout] 201 | fn lookup<'a>(&'a self, key: &'a str) -> Option<&Value> { [INFO] [stdout] | -- -- ^^^^^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | | the lifetime is named here [INFO] [stdout] | the lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 201 | fn lookup<'a>(&'a self, key: &'a str) -> Option<&'a Value> { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/config.rs:202:31 [INFO] [stdout] | [INFO] [stdout] 202 | self.value.lookup(&key.clone()) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / config::Config::parse_file(&runtime.path).and_then(|config| { [INFO] [stdout] 34 | | info!("Creating application engine with config path: {}", &runtime.path); [INFO] [stdout] 35 | | Some(Engine { [INFO] [stdout] 36 | | config: config, [INFO] [stdout] 37 | | run_config: runtime [INFO] [stdout] 38 | | }) [INFO] [stdout] 39 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 33 ~ config::Config::parse_file(&runtime.path).map(|config| { [INFO] [stdout] 34 | info!("Creating application engine with config path: {}", &runtime.path); [INFO] [stdout] 35 ~ Engine { [INFO] [stdout] 36 + config: config, [INFO] [stdout] 37 + run_config: runtime [INFO] [stdout] 38 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/lib.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn initial_pages<'a>(&'a self) -> &'a Vec { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 43 - pub fn initial_pages<'a>(&'a self) -> &'a Vec { [INFO] [stdout] 43 + pub fn initial_pages(&self) -> &Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/script/lua.rs:138:29 [INFO] [stdout] | [INFO] [stdout] 138 | fn create_runtime(ui: &T, config_path: String) -> Lua [INFO] [stdout] | ^^ ^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 138 | fn create_runtime(ui: &T, config_path: String) -> Lua<'_> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | return self.execute_command(ui, window_index, &text); [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] 73 - return self.execute_command(ui, window_index, &text); [INFO] [stdout] 73 + self.execute_command(ui, window_index, &text) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:90:17 [INFO] [stdout] | [INFO] [stdout] 90 | return self.execute_command(ui, window_index, &command); [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] 90 - return self.execute_command(ui, window_index, &command); [INFO] [stdout] 90 + self.execute_command(ui, window_index, &command) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/lib.rs:86:35 [INFO] [stdout] | [INFO] [stdout] 86 | let mut command = String::from(default); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | command.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `command.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:126:21 [INFO] [stdout] | [INFO] [stdout] 126 | / match S::on_buffer_event::(file, ui, &self.run_config.path, window_index, webview_index, uri, &event) { [INFO] [stdout] 127 | | Err(err) => warn!("{}", err), [INFO] [stdout] 128 | | Ok(_) => (), [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Err(err) = S::on_buffer_event::(file, ui, &self.run_config.path, window_index, webview_index, uri, &event) { warn!("{}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/config.rs:201:53 [INFO] [stdout] | [INFO] [stdout] 201 | fn lookup<'a>(&'a self, key: &'a str) -> Option<&Value> { [INFO] [stdout] | -- -- ^^^^^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | | the lifetime is named here [INFO] [stdout] | the lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 201 | fn lookup<'a>(&'a self, key: &'a str) -> Option<&'a Value> { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/config.rs:202:31 [INFO] [stdout] | [INFO] [stdout] 202 | self.value.lookup(&key.clone()) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/script/lua.rs:138:29 [INFO] [stdout] | [INFO] [stdout] 138 | fn create_runtime(ui: &T, config_path: String) -> Lua [INFO] [stdout] | ^^ ^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 138 | fn create_runtime(ui: &T, config_path: String) -> Lua<'_> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.26s [INFO] running `Command { std: "docker" "inspect" "9eb27e616be164ac4dc216821c8c9a2cc2a5b1b921b6750fc1b968d6e4cf8a96", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9eb27e616be164ac4dc216821c8c9a2cc2a5b1b921b6750fc1b968d6e4cf8a96", kill_on_drop: false }` [INFO] [stdout] 9eb27e616be164ac4dc216821c8c9a2cc2a5b1b921b6750fc1b968d6e4cf8a96