[INFO] fetching crate detached-shell 0.1.4... [INFO] linting detached-shell-0.1.4 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate detached-shell 0.1.4 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate detached-shell 0.1.4 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate detached-shell 0.1.4 [INFO] tweaked toml for crates.io crate detached-shell 0.1.4 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate detached-shell 0.1.4 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate detached-shell 0.1.4 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] Downloading crates ... [INFO] [stderr] Downloaded predicates v3.1.3 [INFO] [stderr] Downloaded wit-bindgen v0.45.0 [INFO] [stderr] Downloaded predicates-tree v1.0.12 [INFO] [stderr] Downloaded assert_cmd v2.0.17 [INFO] [stderr] Downloaded ctrlc v3.4.7 [INFO] [stderr] Downloaded predicates-core v1.0.9 [INFO] [stderr] Downloaded wasi v0.14.3+wasi-0.2.4 [INFO] [stderr] Downloaded ratatui v0.28.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] bd105c8bc3ce67583b54881ec967f21577711e7d5d4bd351590be2969b7cca5b [INFO] running `Command { std: "docker" "start" "-a" "bd105c8bc3ce67583b54881ec967f21577711e7d5d4bd351590be2969b7cca5b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "bd105c8bc3ce67583b54881ec967f21577711e7d5d4bd351590be2969b7cca5b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bd105c8bc3ce67583b54881ec967f21577711e7d5d4bd351590be2969b7cca5b", kill_on_drop: false }` [INFO] [stdout] bd105c8bc3ce67583b54881ec967f21577711e7d5d4bd351590be2969b7cca5b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 5ad2beb4fb637115b500a00440336521203042c285b7da10bd57216ee8c5bb28 [INFO] running `Command { std: "docker" "start" "-a" "5ad2beb4fb637115b500a00440336521203042c285b7da10bd57216ee8c5bb28", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Compiling nix v0.30.1 [INFO] [stderr] Checking anstyle-query v1.1.4 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking is_terminal_polyfill v1.70.1 [INFO] [stderr] Compiling instability v0.3.9 [INFO] [stderr] Checking regex-automata v0.4.10 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Compiling serde_json v1.0.143 [INFO] [stderr] Compiling indoc v2.0.6 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking iana-time-zone v0.1.63 [INFO] [stderr] Checking predicates-core v1.0.9 [INFO] [stderr] Checking anstream v0.6.20 [INFO] [stderr] Compiling doc-comment v0.3.3 [INFO] [stderr] Compiling rustix v1.0.8 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking float-cmp v0.10.0 [INFO] [stderr] Compiling assert_cmd v2.0.17 [INFO] [stderr] Checking termtree v0.5.1 [INFO] [stderr] Checking clap_builder v4.5.47 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Checking normalize-line-endings v0.3.0 [INFO] [stderr] Checking difflib v0.4.0 [INFO] [stderr] Checking predicates-tree v1.0.12 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking wait-timeout v0.2.1 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking directories v5.0.1 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking regex v1.11.2 [INFO] [stderr] Checking bstr v1.12.0 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Checking tempfile v3.21.0 [INFO] [stderr] Checking ctrlc v3.4.7 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling clap_derive v4.5.47 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking clap v4.5.47 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking ratatui v0.28.1 [INFO] [stderr] Checking uuid v1.18.1 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking detached-shell v0.1.4 (/opt/rustwide/workdir) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SessionHistory` [INFO] [stdout] --> src/history.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | SessionHistory { [INFO] [stdout] 39 | | entries: Vec::new(), [INFO] [stdout] 40 | | } [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 36 + impl Default for SessionHistory { [INFO] [stdout] 37 + fn default() -> Self { [INFO] [stdout] 38 + Self::new() [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/history_v2.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | all_entries.sort_by(|a, b| b.timestamp.cmp(&a.timestamp)); [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] 303 - all_entries.sort_by(|a, b| b.timestamp.cmp(&a.timestamp)); [INFO] [stdout] 303 + all_entries.sort_by_key(|b| std::cmp::Reverse(b.timestamp)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/history_v2.rs:403:22 [INFO] [stdout] | [INFO] [stdout] 403 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/manager.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/manager.rs:44:17 [INFO] [stdout] | [INFO] [stdout] 44 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/pty/session_switcher.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | / println!( [INFO] [stdout] 68 | | "\r [{}] {} {} {}\r", [INFO] [stdout] 69 | | i + 1, [INFO] [stdout] 70 | | status, [INFO] [stdout] 71 | | session.display_name(), [INFO] [stdout] 72 | | format!("[{}]", &session.id[..8]) [INFO] [stdout] 73 | | ); [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/session_switcher.rs:130:41 [INFO] [stdout] | [INFO] [stdout] 130 | let current_termios = tcgetattr(&stdin_borrowed)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `stdin_borrowed` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/session_switcher.rs:133:19 [INFO] [stdout] | [INFO] [stdout] 133 | tcsetattr(&stdin_borrowed, SetArg::TCSAFLUSH, self.original_termios)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `stdin_borrowed` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/session_switcher.rs:158:19 [INFO] [stdout] | [INFO] [stdout] 158 | tcsetattr(&stdin_borrowed, SetArg::TCSANOW, ¤t_termios)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `stdin_borrowed` [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: redundant closure [INFO] [stdout] --> src/pty/session_switcher.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | result.map_err(|e| NdsError::Io(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `NdsError::Io` [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/pty/socket.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | let cols = cols.min(9999).max(1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cols.clamp(1, 9999)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/pty/socket.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 34 | let rows = rows.min(9999).max(1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `rows.clamp(1, 9999)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/pty/socket.rs:57:61 [INFO] [stdout] | [INFO] [stdout] 57 | let parts: Vec = cmd.split(':').map(|s| sanitize_input(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `sanitize_input` [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 `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / if contains_sequence(data, b"\x1b[?25l") { [INFO] [stdout] 81 | | if self.cursor_visible { [INFO] [stdout] 82 | | self.cursor_visible = false; [INFO] [stdout] 83 | | changes.push("?25l"); [INFO] [stdout] 84 | | } [INFO] [stdout] 85 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ if contains_sequence(data, b"\x1b[?25l") [INFO] [stdout] 81 ~ && self.cursor_visible { [INFO] [stdout] 82 | self.cursor_visible = false; [INFO] [stdout] 83 | changes.push("?25l"); [INFO] [stdout] 84 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / if contains_sequence(data, b"\x1b[?25h") { [INFO] [stdout] 87 | | if !self.cursor_visible { [INFO] [stdout] 88 | | self.cursor_visible = true; [INFO] [stdout] 89 | | changes.push("?25h"); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if contains_sequence(data, b"\x1b[?25h") [INFO] [stdout] 87 ~ && !self.cursor_visible { [INFO] [stdout] 88 | self.cursor_visible = true; [INFO] [stdout] 89 | changes.push("?25h"); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | / if contains_sequence(data, b"\x1b[?1h") { [INFO] [stdout] 93 | | if !self.application_cursor_keys { [INFO] [stdout] 94 | | self.application_cursor_keys = true; [INFO] [stdout] 95 | | changes.push("?1h"); [INFO] [stdout] 96 | | } [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ if contains_sequence(data, b"\x1b[?1h") [INFO] [stdout] 93 ~ && !self.application_cursor_keys { [INFO] [stdout] 94 | self.application_cursor_keys = true; [INFO] [stdout] 95 | changes.push("?1h"); [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | / if contains_sequence(data, b"\x1b[?1l") { [INFO] [stdout] 99 | | if self.application_cursor_keys { [INFO] [stdout] 100 | | self.application_cursor_keys = false; [INFO] [stdout] 101 | | changes.push("?1l"); [INFO] [stdout] 102 | | } [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if contains_sequence(data, b"\x1b[?1l") [INFO] [stdout] 99 ~ && self.application_cursor_keys { [INFO] [stdout] 100 | self.application_cursor_keys = false; [INFO] [stdout] 101 | changes.push("?1l"); [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | / if contains_sequence(data, b"\x1b[?1049h") || contains_sequence(data, b"\x1b[?47h") { [INFO] [stdout] 105 | | if !self.alternate_screen { [INFO] [stdout] 106 | | self.alternate_screen = true; [INFO] [stdout] 107 | | changes.push("?1049h"); [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 104 ~ if (contains_sequence(data, b"\x1b[?1049h") || contains_sequence(data, b"\x1b[?47h")) { [INFO] [stdout] 105 ~ && !self.alternate_screen { [INFO] [stdout] 106 | self.alternate_screen = true; [INFO] [stdout] 107 | changes.push("?1049h"); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | / if contains_sequence(data, b"\x1b[?1049l") || contains_sequence(data, b"\x1b[?47l") { [INFO] [stdout] 111 | | if self.alternate_screen { [INFO] [stdout] 112 | | self.alternate_screen = false; [INFO] [stdout] 113 | | changes.push("?1049l"); [INFO] [stdout] 114 | | } [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if (contains_sequence(data, b"\x1b[?1049l") || contains_sequence(data, b"\x1b[?47l")) { [INFO] [stdout] 111 ~ && self.alternate_screen { [INFO] [stdout] 112 | self.alternate_screen = false; [INFO] [stdout] 113 | changes.push("?1049l"); [INFO] [stdout] 114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / if contains_sequence(data, b"\x1b[?2004h") { [INFO] [stdout] 117 | | if !self.bracketed_paste { [INFO] [stdout] 118 | | self.bracketed_paste = true; [INFO] [stdout] 119 | | changes.push("?2004h"); [INFO] [stdout] 120 | | } [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ if contains_sequence(data, b"\x1b[?2004h") [INFO] [stdout] 117 ~ && !self.bracketed_paste { [INFO] [stdout] 118 | self.bracketed_paste = true; [INFO] [stdout] 119 | changes.push("?2004h"); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | / if contains_sequence(data, b"\x1b[?2004l") { [INFO] [stdout] 123 | | if self.bracketed_paste { [INFO] [stdout] 124 | | self.bracketed_paste = false; [INFO] [stdout] 125 | | changes.push("?2004l"); [INFO] [stdout] 126 | | } [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 122 ~ if contains_sequence(data, b"\x1b[?2004l") [INFO] [stdout] 123 ~ && self.bracketed_paste { [INFO] [stdout] 124 | self.bracketed_paste = false; [INFO] [stdout] 125 | changes.push("?2004l"); [INFO] [stdout] 126 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SessionHistory` [INFO] [stdout] --> src/history.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | SessionHistory { [INFO] [stdout] 39 | | entries: Vec::new(), [INFO] [stdout] 40 | | } [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 36 + impl Default for SessionHistory { [INFO] [stdout] 37 + fn default() -> Self { [INFO] [stdout] 38 + Self::new() [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/pty/spawn.rs:341:33 [INFO] [stdout] | [INFO] [stdout] 341 | ... b"/dev/null\0".as_ptr() as *const libc::c_char, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use a `c""` literal: `c"/dev/null"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] = note: `#[warn(clippy::manual_c_str_literals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/pty/spawn.rs:441:46 [INFO] [stdout] | [INFO] [stdout] 441 | if libc::ioctl(slave_fd, libc::TIOCSCTTY as u64, 0) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCSCTTY` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/pty/spawn.rs:731:45 [INFO] [stdout] | [INFO] [stdout] 731 | return Err(NdsError::Io(io::Error::new( [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 732 | | io::ErrorKind::Other, [INFO] [stdout] 733 | | format!("Poll error: {:?}", e), [INFO] [stdout] 734 | | ))); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 731 ~ return Err(NdsError::Io(io::Error::other( [INFO] [stdout] 732 ~ format!("Poll error: {:?}", e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pty/spawn.rs:810:33 [INFO] [stdout] | [INFO] [stdout] 810 | ... byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + !(byte != b'\r' && byte != b'\n'); [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + byte == b'\r' || byte == b'\n'; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pty/spawn.rs:810:33 [INFO] [stdout] | [INFO] [stdout] 810 | ... byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + !(byte != b'\r' && byte != b'\n') || byte == 13; [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + byte == b'\r' || byte == b'\n' || byte == 13; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/spawn.rs:841:56 [INFO] [stdout] | [INFO] [stdout] 841 | let raw_termios = nix::sys::termios::tcgetattr(&stdin)?; [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/spawn.rs:844:19 [INFO] [stdout] | [INFO] [stdout] 844 | tcsetattr(&stdin, SetArg::TCSANOW, original_termios)?; [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/spawn.rs:851:19 [INFO] [stdout] | [INFO] [stdout] 851 | tcsetattr(&stdin, SetArg::TCSANOW, &raw_termios)?; [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pty/spawn.rs:1371:18 [INFO] [stdout] | [INFO] [stdout] 1371 | clients: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1371 - clients: &mut Vec, [INFO] [stdout] 1371 + clients: &mut [ClientInfo], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | tcgetattr(&stdin) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:35:15 [INFO] [stdout] | [INFO] [stdout] 35 | tcsetattr(&stdin, SetArg::TCSANOW, &raw) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | tcflush(&stdin, FlushArg::TCIFLUSH) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:54:15 [INFO] [stdout] | [INFO] [stdout] 54 | tcsetattr(&stdin, SetArg::TCSANOW, original) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | tcflush(&stdin, FlushArg::TCIFLUSH).map_err(|e| { [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/pty/terminal.rs:104:28 [INFO] [stdout] | [INFO] [stdout] 104 | if libc::ioctl(fd, libc::TIOCSWINSZ as u64, &winsize) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCSWINSZ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/history_v2.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | all_entries.sort_by(|a, b| b.timestamp.cmp(&a.timestamp)); [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] 303 - all_entries.sort_by(|a, b| b.timestamp.cmp(&a.timestamp)); [INFO] [stdout] 303 + all_entries.sort_by_key(|b| std::cmp::Reverse(b.timestamp)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/scrollback.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | / if self.viewport_start > 0 { [INFO] [stdout] 77 | | self.viewport_start -= 1; [INFO] [stdout] 78 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 76 ~ if self.viewport_start > 0 => { [INFO] [stdout] 77 | self.viewport_start -= 1; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/scrollback.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | / if self.viewport_start + self.viewport_height < self.total_lines { [INFO] [stdout] 82 | | self.viewport_start += 1; [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ KeyCode::Down | KeyCode::Char('j') [INFO] [stdout] 81 ~ if self.viewport_start + self.viewport_height < self.total_lines => { [INFO] [stdout] 82 | self.viewport_start += 1; [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/scrollback.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | / if self.total_lines > self.viewport_height { [INFO] [stdout] 101 | | self.viewport_start = self.total_lines - self.viewport_height; [INFO] [stdout] 102 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ KeyCode::End | KeyCode::Char('G') [INFO] [stdout] 100 ~ if self.total_lines > self.viewport_height => { [INFO] [stdout] 101 | self.viewport_start = self.total_lines - self.viewport_height; [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/history_v2.rs:403:22 [INFO] [stdout] | [INFO] [stdout] 403 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/session.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | sessions.sort_by(|a, b| a.created_at.cmp(&b.created_at)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 173 - sessions.sort_by(|a, b| a.created_at.cmp(&b.created_at)); [INFO] [stdout] 173 + sessions.sort_by_key(|a| a.created_at); [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/session.rs:277:27 [INFO] [stdout] | [INFO] [stdout] 277 | let status_path = Self::session_dir() [INFO] [stdout] | ___________________________^ [INFO] [stdout] 278 | | .ok() [INFO] [stdout] 279 | | .and_then(|dir| Some(dir.join(format!("{}.status", self.id)))); [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] 277 ~ let status_path = Self::session_dir() [INFO] [stdout] 278 ~ .ok().map(|dir| dir.join(format!("{}.status", self.id))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/manager.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/manager.rs:44:17 [INFO] [stdout] | [INFO] [stdout] 44 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/terminal_state.rs:23:33 [INFO] [stdout] | [INFO] [stdout] 23 | let termios = tcgetattr(&borrowed_fd).ok(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `borrowed_fd` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/terminal_state.rs:39:23 [INFO] [stdout] | [INFO] [stdout] 39 | tcsetattr(&borrowed_fd, SetArg::TCSANOW, termios).map_err(|e| { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `borrowed_fd` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/terminal_state.rs:56:32 [INFO] [stdout] | [INFO] [stdout] 56 | if libc::ioctl(fd, libc::TIOCGWINSZ as u64, &mut winsize) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCGWINSZ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/terminal_state.rs:75:32 [INFO] [stdout] | [INFO] [stdout] 75 | if libc::ioctl(fd, libc::TIOCSWINSZ as u64, &winsize) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCSWINSZ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/pty/session_switcher.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | / println!( [INFO] [stdout] 68 | | "\r [{}] {} {} {}\r", [INFO] [stdout] 69 | | i + 1, [INFO] [stdout] 70 | | status, [INFO] [stdout] 71 | | session.display_name(), [INFO] [stdout] 72 | | format!("[{}]", &session.id[..8]) [INFO] [stdout] 73 | | ); [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/session_switcher.rs:130:41 [INFO] [stdout] | [INFO] [stdout] 130 | let current_termios = tcgetattr(&stdin_borrowed)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `stdin_borrowed` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/session_switcher.rs:133:19 [INFO] [stdout] | [INFO] [stdout] 133 | tcsetattr(&stdin_borrowed, SetArg::TCSAFLUSH, self.original_termios)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `stdin_borrowed` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/session_switcher.rs:158:19 [INFO] [stdout] | [INFO] [stdout] 158 | tcsetattr(&stdin_borrowed, SetArg::TCSANOW, ¤t_termios)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `stdin_borrowed` [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: redundant closure [INFO] [stdout] --> src/pty/session_switcher.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | result.map_err(|e| NdsError::Io(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `NdsError::Io` [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/pty/socket.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | let cols = cols.min(9999).max(1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cols.clamp(1, 9999)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/pty/socket.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 34 | let rows = rows.min(9999).max(1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `rows.clamp(1, 9999)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/pty/socket.rs:57:61 [INFO] [stdout] | [INFO] [stdout] 57 | let parts: Vec = cmd.split(':').map(|s| sanitize_input(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `sanitize_input` [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 `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / if contains_sequence(data, b"\x1b[?25l") { [INFO] [stdout] 81 | | if self.cursor_visible { [INFO] [stdout] 82 | | self.cursor_visible = false; [INFO] [stdout] 83 | | changes.push("?25l"); [INFO] [stdout] 84 | | } [INFO] [stdout] 85 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ if contains_sequence(data, b"\x1b[?25l") [INFO] [stdout] 81 ~ && self.cursor_visible { [INFO] [stdout] 82 | self.cursor_visible = false; [INFO] [stdout] 83 | changes.push("?25l"); [INFO] [stdout] 84 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / if contains_sequence(data, b"\x1b[?25h") { [INFO] [stdout] 87 | | if !self.cursor_visible { [INFO] [stdout] 88 | | self.cursor_visible = true; [INFO] [stdout] 89 | | changes.push("?25h"); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if contains_sequence(data, b"\x1b[?25h") [INFO] [stdout] 87 ~ && !self.cursor_visible { [INFO] [stdout] 88 | self.cursor_visible = true; [INFO] [stdout] 89 | changes.push("?25h"); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | / if contains_sequence(data, b"\x1b[?1h") { [INFO] [stdout] 93 | | if !self.application_cursor_keys { [INFO] [stdout] 94 | | self.application_cursor_keys = true; [INFO] [stdout] 95 | | changes.push("?1h"); [INFO] [stdout] 96 | | } [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ if contains_sequence(data, b"\x1b[?1h") [INFO] [stdout] 93 ~ && !self.application_cursor_keys { [INFO] [stdout] 94 | self.application_cursor_keys = true; [INFO] [stdout] 95 | changes.push("?1h"); [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | / if contains_sequence(data, b"\x1b[?1l") { [INFO] [stdout] 99 | | if self.application_cursor_keys { [INFO] [stdout] 100 | | self.application_cursor_keys = false; [INFO] [stdout] 101 | | changes.push("?1l"); [INFO] [stdout] 102 | | } [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if contains_sequence(data, b"\x1b[?1l") [INFO] [stdout] 99 ~ && self.application_cursor_keys { [INFO] [stdout] 100 | self.application_cursor_keys = false; [INFO] [stdout] 101 | changes.push("?1l"); [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | / if contains_sequence(data, b"\x1b[?1049h") || contains_sequence(data, b"\x1b[?47h") { [INFO] [stdout] 105 | | if !self.alternate_screen { [INFO] [stdout] 106 | | self.alternate_screen = true; [INFO] [stdout] 107 | | changes.push("?1049h"); [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 104 ~ if (contains_sequence(data, b"\x1b[?1049h") || contains_sequence(data, b"\x1b[?47h")) { [INFO] [stdout] 105 ~ && !self.alternate_screen { [INFO] [stdout] 106 | self.alternate_screen = true; [INFO] [stdout] 107 | changes.push("?1049h"); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | / if contains_sequence(data, b"\x1b[?1049l") || contains_sequence(data, b"\x1b[?47l") { [INFO] [stdout] 111 | | if self.alternate_screen { [INFO] [stdout] 112 | | self.alternate_screen = false; [INFO] [stdout] 113 | | changes.push("?1049l"); [INFO] [stdout] 114 | | } [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if (contains_sequence(data, b"\x1b[?1049l") || contains_sequence(data, b"\x1b[?47l")) { [INFO] [stdout] 111 ~ && self.alternate_screen { [INFO] [stdout] 112 | self.alternate_screen = false; [INFO] [stdout] 113 | changes.push("?1049l"); [INFO] [stdout] 114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / if contains_sequence(data, b"\x1b[?2004h") { [INFO] [stdout] 117 | | if !self.bracketed_paste { [INFO] [stdout] 118 | | self.bracketed_paste = true; [INFO] [stdout] 119 | | changes.push("?2004h"); [INFO] [stdout] 120 | | } [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ if contains_sequence(data, b"\x1b[?2004h") [INFO] [stdout] 117 ~ && !self.bracketed_paste { [INFO] [stdout] 118 | self.bracketed_paste = true; [INFO] [stdout] 119 | changes.push("?2004h"); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/pty/spawn.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | / if contains_sequence(data, b"\x1b[?2004l") { [INFO] [stdout] 123 | | if self.bracketed_paste { [INFO] [stdout] 124 | | self.bracketed_paste = false; [INFO] [stdout] 125 | | changes.push("?2004l"); [INFO] [stdout] 126 | | } [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 122 ~ if contains_sequence(data, b"\x1b[?2004l") [INFO] [stdout] 123 ~ && self.bracketed_paste { [INFO] [stdout] 124 | self.bracketed_paste = false; [INFO] [stdout] 125 | changes.push("?2004l"); [INFO] [stdout] 126 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/pty/spawn.rs:341:33 [INFO] [stdout] | [INFO] [stdout] 341 | ... b"/dev/null\0".as_ptr() as *const libc::c_char, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use a `c""` literal: `c"/dev/null"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] = note: `#[warn(clippy::manual_c_str_literals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/pty/spawn.rs:441:46 [INFO] [stdout] | [INFO] [stdout] 441 | if libc::ioctl(slave_fd, libc::TIOCSCTTY as u64, 0) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCSCTTY` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/pty/spawn.rs:731:45 [INFO] [stdout] | [INFO] [stdout] 731 | return Err(NdsError::Io(io::Error::new( [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 732 | | io::ErrorKind::Other, [INFO] [stdout] 733 | | format!("Poll error: {:?}", e), [INFO] [stdout] 734 | | ))); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 731 ~ return Err(NdsError::Io(io::Error::other( [INFO] [stdout] 732 ~ format!("Poll error: {:?}", e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pty/spawn.rs:810:33 [INFO] [stdout] | [INFO] [stdout] 810 | ... byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + !(byte != b'\r' && byte != b'\n'); [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + byte == b'\r' || byte == b'\n'; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pty/spawn.rs:810:33 [INFO] [stdout] | [INFO] [stdout] 810 | ... byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + !(byte != b'\r' && byte != b'\n') || byte == 13; [INFO] [stdout] | [INFO] [stdout] 810 - byte == b'\r' || byte == b'\n' || byte == 10 || byte == 13; [INFO] [stdout] 810 + byte == b'\r' || byte == b'\n' || byte == 13; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/spawn.rs:841:56 [INFO] [stdout] | [INFO] [stdout] 841 | let raw_termios = nix::sys::termios::tcgetattr(&stdin)?; [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/spawn.rs:844:19 [INFO] [stdout] | [INFO] [stdout] 844 | tcsetattr(&stdin, SetArg::TCSANOW, original_termios)?; [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/spawn.rs:851:19 [INFO] [stdout] | [INFO] [stdout] 851 | tcsetattr(&stdin, SetArg::TCSANOW, &raw_termios)?; [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> benches/buffer_benchmark.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | (&mut buffer[..data.len()]).copy_from_slice(&data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `buffer[..data.len()]` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pty/spawn.rs:1371:18 [INFO] [stdout] | [INFO] [stdout] 1371 | clients: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1371 - clients: &mut Vec, [INFO] [stdout] 1371 + clients: &mut [ClientInfo], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | tcgetattr(&stdin) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:35:15 [INFO] [stdout] | [INFO] [stdout] 35 | tcsetattr(&stdin, SetArg::TCSANOW, &raw) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | tcflush(&stdin, FlushArg::TCIFLUSH) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:54:15 [INFO] [stdout] | [INFO] [stdout] 54 | tcsetattr(&stdin, SetArg::TCSANOW, original) [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/pty/terminal.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | tcflush(&stdin, FlushArg::TCIFLUSH).map_err(|e| { [INFO] [stdout] | ^^^^^^ help: change this to: `stdin` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/pty/terminal.rs:104:28 [INFO] [stdout] | [INFO] [stdout] 104 | if libc::ioctl(fd, libc::TIOCSWINSZ as u64, &winsize) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCSWINSZ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/pty/tests.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / mod tests { [INFO] [stdout] 3 | | use std::os::unix::net::UnixStream; [INFO] [stdout] 4 | | use tempfile::TempDir; [INFO] [stdout] ... | [INFO] [stdout] 313 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pty/tests.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | let expected = format!("\x1b]nds:resize:100:50\x07"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\x1b]nds:resize:100:50\x07".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/pty/tests.rs:246:28 [INFO] [stdout] | [INFO] [stdout] 246 | let expected = format!("\x1b]nds:resize:1:1\x07"); // Sanitized to 1:1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\x1b]nds:resize:1:1\x07".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: useless use of `format!` [INFO] [stdout] --> src/pty/tests.rs:264:28 [INFO] [stdout] | [INFO] [stdout] 264 | let expected = format!("\x1b]nds:resize:9999:9999\x07"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\x1b]nds:resize:9999:9999\x07".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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/scrollback.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | / if self.viewport_start > 0 { [INFO] [stdout] 77 | | self.viewport_start -= 1; [INFO] [stdout] 78 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 76 ~ if self.viewport_start > 0 => { [INFO] [stdout] 77 | self.viewport_start -= 1; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/scrollback.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | / if self.viewport_start + self.viewport_height < self.total_lines { [INFO] [stdout] 82 | | self.viewport_start += 1; [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ KeyCode::Down | KeyCode::Char('j') [INFO] [stdout] 81 ~ if self.viewport_start + self.viewport_height < self.total_lines => { [INFO] [stdout] 82 | self.viewport_start += 1; [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/scrollback.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | / if self.total_lines > self.viewport_height { [INFO] [stdout] 101 | | self.viewport_start = self.total_lines - self.viewport_height; [INFO] [stdout] 102 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ KeyCode::End | KeyCode::Char('G') [INFO] [stdout] 100 ~ if self.total_lines > self.viewport_height => { [INFO] [stdout] 101 | self.viewport_start = self.total_lines - self.viewport_height; [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/session_lifecycle_test.rs:37:14 [INFO] [stdout] | [INFO] [stdout] 37 | .arg(&session_id) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `session_id` [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: the borrowed expression implements the required traits [INFO] [stdout] --> tests/session_lifecycle_test.rs:46:14 [INFO] [stdout] | [INFO] [stdout] 46 | .arg(&session_id) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `session_id` [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: the borrowed expression implements the required traits [INFO] [stdout] --> tests/session_lifecycle_test.rs:54:14 [INFO] [stdout] | [INFO] [stdout] 54 | .arg(&session_id) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `session_id` [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: the borrowed expression implements the required traits [INFO] [stdout] --> tests/session_lifecycle_test.rs:62:14 [INFO] [stdout] | [INFO] [stdout] 62 | .arg(&session_id) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `session_id` [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: the borrowed expression implements the required traits [INFO] [stdout] --> tests/session_lifecycle_test.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | cmd.arg("info").arg(&session_id).assert().failure(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `session_id` [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: consider using `sort_by_key` [INFO] [stdout] --> src/session.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | sessions.sort_by(|a, b| a.created_at.cmp(&b.created_at)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 173 - sessions.sort_by(|a, b| a.created_at.cmp(&b.created_at)); [INFO] [stdout] 173 + sessions.sort_by_key(|a| a.created_at); [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/session.rs:277:27 [INFO] [stdout] | [INFO] [stdout] 277 | let status_path = Self::session_dir() [INFO] [stdout] | ___________________________^ [INFO] [stdout] 278 | | .ok() [INFO] [stdout] 279 | | .and_then(|dir| Some(dir.join(format!("{}.status", self.id)))); [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] 277 ~ let status_path = Self::session_dir() [INFO] [stdout] 278 ~ .ok().map(|dir| dir.join(format!("{}.status", self.id))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/terminal_state.rs:23:33 [INFO] [stdout] | [INFO] [stdout] 23 | let termios = tcgetattr(&borrowed_fd).ok(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `borrowed_fd` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/terminal_state.rs:39:23 [INFO] [stdout] | [INFO] [stdout] 39 | tcsetattr(&borrowed_fd, SetArg::TCSANOW, termios).map_err(|e| { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `borrowed_fd` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/terminal_state.rs:56:32 [INFO] [stdout] | [INFO] [stdout] 56 | if libc::ioctl(fd, libc::TIOCGWINSZ as u64, &mut winsize) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCGWINSZ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/terminal_state.rs:75:32 [INFO] [stdout] | [INFO] [stdout] 75 | if libc::ioctl(fd, libc::TIOCSWINSZ as u64, &winsize) < 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `libc::TIOCSWINSZ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/handlers/clients.rs:14:20 [INFO] [stdout] | [INFO] [stdout] 14 | || s.name [INFO] [stdout] | ____________________^ [INFO] [stdout] 15 | | .as_ref() [INFO] [stdout] 16 | | .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 16 - .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] 16 + .is_some_and(|n| n.starts_with(session_id_or_name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/handlers/clients.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | || s.name [INFO] [stdout] | ____________________^ [INFO] [stdout] 65 | | .as_ref() [INFO] [stdout] 66 | | .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 66 - .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] 66 + .is_some_and(|n| n.starts_with(session_id_or_name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/handlers/info.rs:247:22 [INFO] [stdout] | [INFO] [stdout] 247 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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: redundant closure [INFO] [stdout] --> src/handlers/info.rs:253:22 [INFO] [stdout] | [INFO] [stdout] 253 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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: redundant closure [INFO] [stdout] --> src/handlers/info.rs:299:26 [INFO] [stdout] | [INFO] [stdout] 299 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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: redundant closure [INFO] [stdout] --> src/handlers/info.rs:306:26 [INFO] [stdout] | [INFO] [stdout] 306 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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 `map_or` can be simplified [INFO] [stdout] --> src/handlers/clients.rs:14:20 [INFO] [stdout] | [INFO] [stdout] 14 | || s.name [INFO] [stdout] | ____________________^ [INFO] [stdout] 15 | | .as_ref() [INFO] [stdout] 16 | | .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 16 - .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] 16 + .is_some_and(|n| n.starts_with(session_id_or_name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/handlers/clients.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | || s.name [INFO] [stdout] | ____________________^ [INFO] [stdout] 65 | | .as_ref() [INFO] [stdout] 66 | | .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 66 - .map_or(false, |n| n.starts_with(session_id_or_name)) [INFO] [stdout] 66 + .is_some_and(|n| n.starts_with(session_id_or_name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/handlers/info.rs:247:22 [INFO] [stdout] | [INFO] [stdout] 247 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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: redundant closure [INFO] [stdout] --> src/handlers/info.rs:253:22 [INFO] [stdout] | [INFO] [stdout] 253 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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: redundant closure [INFO] [stdout] --> src/handlers/info.rs:299:26 [INFO] [stdout] | [INFO] [stdout] 299 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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: redundant closure [INFO] [stdout] --> src/handlers/info.rs:306:26 [INFO] [stdout] | [INFO] [stdout] 306 | .map(|d| SessionHistory::format_duration(d)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SessionHistory::format_duration` [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 assertion is always `true` [INFO] [stdout] --> src/handlers/test.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | assert!(true); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/handlers/test.rs:159:46 [INFO] [stdout] | [INFO] [stdout] 159 | SessionEvent::Created => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/handlers/test.rs:160:47 [INFO] [stdout] | [INFO] [stdout] 160 | SessionEvent::Attached => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/handlers/test.rs:161:47 [INFO] [stdout] | [INFO] [stdout] 161 | SessionEvent::Detached => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/handlers/test.rs:162:45 [INFO] [stdout] | [INFO] [stdout] 162 | SessionEvent::Killed => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/handlers/test.rs:163:46 [INFO] [stdout] | [INFO] [stdout] 163 | SessionEvent::Crashed => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/handlers/test.rs:164:65 [INFO] [stdout] | [INFO] [stdout] 164 | SessionEvent::Renamed { from: _, to: _ } => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/handlers/test.rs:38:28 [INFO] [stdout] | [INFO] [stdout] 38 | let sessions = vec![ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 39 | | create_mock_session("abc123", None), [INFO] [stdout] 40 | | create_mock_session("def456", Some("test".to_string())), [INFO] [stdout] 41 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 38 ~ let sessions = [create_mock_session("abc123", None), [INFO] [stdout] 39 ~ create_mock_session("def456", Some("test".to_string()))]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/handlers/test.rs:55:28 [INFO] [stdout] | [INFO] [stdout] 55 | let sessions = vec![ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 56 | | create_mock_session("abc123", Some("production".to_string())), [INFO] [stdout] 57 | | create_mock_session("def456", Some("development".to_string())), [INFO] [stdout] 58 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 55 ~ let sessions = [create_mock_session("abc123", Some("production".to_string())), [INFO] [stdout] 56 ~ create_mock_session("def456", Some("development".to_string()))]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/handlers/test.rs:78:28 [INFO] [stdout] | [INFO] [stdout] 78 | let sessions = vec![ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 79 | | create_mock_session("abc123", Some("MySession".to_string())), [INFO] [stdout] 80 | | create_mock_session("def456", Some("OtherSession".to_string())), [INFO] [stdout] 81 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 78 ~ let sessions = [create_mock_session("abc123", Some("MySession".to_string())), [INFO] [stdout] 79 ~ create_mock_session("def456", Some("OtherSession".to_string()))]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/handlers/test.rs:196:28 [INFO] [stdout] | [INFO] [stdout] 196 | let sessions = vec![ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 197 | | create_mock_session("abc123def", None), [INFO] [stdout] 198 | | create_mock_session("abc456ghi", None), [INFO] [stdout] 199 | | create_mock_session("xyz789jkl", None), [INFO] [stdout] 200 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 196 ~ let sessions = [create_mock_session("abc123def", None), [INFO] [stdout] 197 + create_mock_session("abc456ghi", None), [INFO] [stdout] 198 ~ create_mock_session("xyz789jkl", None)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/handlers/test.rs:219:28 [INFO] [stdout] | [INFO] [stdout] 219 | let sessions = vec![ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 220 | | create_mock_session("session1", Some("production".to_string())), [INFO] [stdout] 221 | | create_mock_session("session2", Some("production-backup".to_string())), [INFO] [stdout] 222 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 219 ~ let sessions = [create_mock_session("session1", Some("production".to_string())), [INFO] [stdout] 220 ~ create_mock_session("session2", Some("production-backup".to_string()))]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.43s [INFO] running `Command { std: "docker" "inspect" "5ad2beb4fb637115b500a00440336521203042c285b7da10bd57216ee8c5bb28", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5ad2beb4fb637115b500a00440336521203042c285b7da10bd57216ee8c5bb28", kill_on_drop: false }` [INFO] [stdout] 5ad2beb4fb637115b500a00440336521203042c285b7da10bd57216ee8c5bb28