[INFO] cloning repository https://github.com/ishworii/sejal-terminal [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ishworii/sejal-terminal" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fishworii%2Fsejal-terminal", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fishworii%2Fsejal-terminal'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c384d9a916b79140bd3a87136f3fcd25fd71dc67 [INFO] linting ishworii/sejal-terminal against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fishworii%2Fsejal-terminal" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ishworii/sejal-terminal [INFO] finished tweaking git repo https://github.com/ishworii/sejal-terminal [INFO] tweaked toml for git repo https://github.com/ishworii/sejal-terminal written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ishworii/sejal-terminal on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/ishworii/sejal-terminal 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 windows-targets v0.53.3 [INFO] [stderr] Downloaded windows-link v0.1.3 [INFO] [stderr] Downloaded signal-hook-registry v1.4.6 [INFO] [stderr] Downloaded bitflags v2.9.4 [INFO] [stderr] Downloaded log v0.4.28 [INFO] [stderr] Downloaded cfg-if v1.0.3 [INFO] [stderr] Downloaded litrs v0.4.2 [INFO] [stderr] Downloaded proc-macro2 v1.0.101 [INFO] [stderr] Downloaded redox_syscall v0.5.17 [INFO] [stderr] Downloaded rustix v1.0.8 [INFO] [stderr] Downloaded syn v2.0.106 [INFO] [stderr] Downloaded libc v0.2.175 [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] 20f80e5e402af9268e3a342f4cf87d84d5f5c616642e4899abe448d2415542dd [INFO] running `Command { std: "docker" "start" "-a" "20f80e5e402af9268e3a342f4cf87d84d5f5c616642e4899abe448d2415542dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "20f80e5e402af9268e3a342f4cf87d84d5f5c616642e4899abe448d2415542dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "20f80e5e402af9268e3a342f4cf87d84d5f5c616642e4899abe448d2415542dd", kill_on_drop: false }` [INFO] [stdout] 20f80e5e402af9268e3a342f4cf87d84d5f5c616642e4899abe448d2415542dd [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] 3f4a12a9cbabbef1c399dc38528de648905d609b5996ec3f73cc6a9240b5cbce [INFO] running `Command { std: "docker" "start" "-a" "3f4a12a9cbabbef1c399dc38528de648905d609b5996ec3f73cc6a9240b5cbce", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Compiling signal-hook v0.3.18 [INFO] [stderr] Compiling rustix v1.0.8 [INFO] [stderr] Checking cfg-if v1.0.3 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Compiling litrs v0.4.2 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Checking bitflags v2.9.4 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling document-features v0.2.11 [INFO] [stderr] Compiling convert_case v0.7.1 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking sejal-terminal v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: variant `Match` is never constructed [INFO] [stdout] --> src/editor.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 13 | enum HighlightType { [INFO] [stdout] | ------------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 21 | Match, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HighlightType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/editor.rs:53:1 [INFO] [stdout] | [INFO] [stdout] 53 | / impl Default for Row { [INFO] [stdout] 54 | | fn default() -> Self { [INFO] [stdout] 55 | | Self { [INFO] [stdout] 56 | | idx: 0, [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 45 + #[derive(Default)] [INFO] [stdout] 46 | pub struct Row { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Buffer` [INFO] [stdout] --> src/editor.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | / pub fn new() -> Self { [INFO] [stdout] 87 | | Self { [INFO] [stdout] 88 | | content: String::new(), [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [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] 85 + impl Default for Buffer { [INFO] [stdout] 86 + fn default() -> Self { [INFO] [stdout] 87 + Self::new() [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Editor` [INFO] [stdout] --> src/editor.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / pub fn new() -> Self { [INFO] [stdout] 99 | | Self { [INFO] [stdout] 100 | | should_quit: false, [INFO] [stdout] 101 | | terminal: Terminal::new().expect("Failed to initialize terminal"), [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 97 + impl Default for Editor { [INFO] [stdout] 98 + fn default() -> Self { [INFO] [stdout] 99 + Self::new() [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/editor.rs:184:17 [INFO] [stdout] | [INFO] [stdout] 184 | / if (self.cursor_y as usize) < self.rows.len() { [INFO] [stdout] 185 | | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 186 | | } [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] 183 ~ KeyEvent { code: KeyCode::End, .. } [INFO] [stdout] 184 ~ if (self.cursor_y as usize) < self.rows.len() => { [INFO] [stdout] 185 | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/editor.rs:244:17 [INFO] [stdout] | [INFO] [stdout] 244 | / if (self.cursor_y as usize) < self.rows.len() { [INFO] [stdout] 245 | | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 246 | | } [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] 243 ~ KeyEvent { code: KeyCode::End, .. } [INFO] [stdout] 244 ~ if (self.cursor_y as usize) < self.rows.len() => { [INFO] [stdout] 245 | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 246 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/editor.rs:794:23 [INFO] [stdout] | [INFO] [stdout] 794 | while render.len() % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!render.len().is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:899:21 [INFO] [stdout] | [INFO] [stdout] 899 | / if filename.contains(pattern) { [INFO] [stdout] 900 | | if pattern.starts_with('.') || filename.ends_with(pattern) { [INFO] [stdout] 901 | | self.syntax = Some(syntax.clone()); [INFO] [stdout] ... | [INFO] [stdout] 908 | | } [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] 899 ~ if filename.contains(pattern) [INFO] [stdout] 900 ~ && (pattern.starts_with('.') || filename.ends_with(pattern)) { [INFO] [stdout] 901 | self.syntax = Some(syntax.clone()); [INFO] [stdout] ... [INFO] [stdout] 906 | return; [INFO] [stdout] 907 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/editor.rs:940:24 [INFO] [stdout] | [INFO] [stdout] 940 | if !in_string.is_some() && !in_comment { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `in_string.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/editor.rs:927:23 [INFO] [stdout] | [INFO] [stdout] 927 | let scs = syntax.singleline_comment_start.as_ref().map(|s| s.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `syntax.singleline_comment_start.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/editor.rs:928:23 [INFO] [stdout] | [INFO] [stdout] 928 | let mcs = syntax.multiline_comment_start.as_ref().map(|s| s.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `syntax.multiline_comment_start.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/editor.rs:929:23 [INFO] [stdout] | [INFO] [stdout] 929 | let mce = syntax.multiline_comment_end.as_ref().map(|s| s.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `syntax.multiline_comment_end.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:939:17 [INFO] [stdout] | [INFO] [stdout] 939 | / if let Some(scs_str) = scs { [INFO] [stdout] 940 | | if !in_string.is_some() && !in_comment { [INFO] [stdout] 941 | | if render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] 942 | | for j in i..hl.len() { [INFO] [stdout] ... | [INFO] [stdout] 948 | | } [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] 939 ~ if let Some(scs_str) = scs [INFO] [stdout] 940 ~ && !in_string.is_some() && !in_comment { [INFO] [stdout] 941 | if render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] ... [INFO] [stdout] 946 | } [INFO] [stdout] 947 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:940:21 [INFO] [stdout] | [INFO] [stdout] 940 | / if !in_string.is_some() && !in_comment { [INFO] [stdout] 941 | | if render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] 942 | | for j in i..hl.len() { [INFO] [stdout] 943 | | hl[j] = HighlightType::Comment; [INFO] [stdout] ... | [INFO] [stdout] 947 | | } [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] 940 ~ if !in_string.is_some() && !in_comment [INFO] [stdout] 941 ~ && render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] 942 | for j in i..hl.len() { [INFO] [stdout] ... [INFO] [stdout] 945 | break; [INFO] [stdout] 946 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `hl` [INFO] [stdout] --> src/editor.rs:942:38 [INFO] [stdout] | [INFO] [stdout] 942 | ... for j in i..hl.len() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 942 - for j in i..hl.len() { [INFO] [stdout] 942 + for in hl.iter_mut().skip(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:951:17 [INFO] [stdout] | [INFO] [stdout] 951 | / if let (Some(mcs_str), Some(mce_str)) = (mcs, mce) { [INFO] [stdout] 952 | | if in_string.is_none() { [INFO] [stdout] 953 | | if in_comment { [INFO] [stdout] 954 | | hl[i] = HighlightType::MlComment; [INFO] [stdout] ... | [INFO] [stdout] 976 | | } [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] 951 ~ if let (Some(mcs_str), Some(mce_str)) = (mcs, mce) [INFO] [stdout] 952 ~ && in_string.is_none() { [INFO] [stdout] 953 | if in_comment { [INFO] [stdout] ... [INFO] [stdout] 974 | } [INFO] [stdout] 975 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:1002:17 [INFO] [stdout] | [INFO] [stdout] 1002 | / if syntax.flags & HL_HIGHLIGHT_NUMBERS != 0 { [INFO] [stdout] 1003 | | if (c.is_ascii_digit() && (prev_sep || prev_hl == HighlightType::Number)) || [INFO] [stdout] 1004 | | (c == '.' && prev_hl == HighlightType::Number) { [INFO] [stdout] 1005 | | hl[i] = HighlightType::Number; [INFO] [stdout] ... | [INFO] [stdout] 1010 | | } [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] 1002 ~ if syntax.flags & HL_HIGHLIGHT_NUMBERS != 0 [INFO] [stdout] 1003 ~ && ((c.is_ascii_digit() && (prev_sep || prev_hl == HighlightType::Number)) || [INFO] [stdout] 1004 ~ (c == '.' && prev_hl == HighlightType::Number)) { [INFO] [stdout] 1005 | hl[i] = HighlightType::Number; [INFO] [stdout] ... [INFO] [stdout] 1008 | continue; [INFO] [stdout] 1009 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:1111:13 [INFO] [stdout] | [INFO] [stdout] 1111 | / if let Some(row) = self.rows.get(current as usize) { [INFO] [stdout] 1112 | | if let Some(match_pos) = row.render.find(query) { [INFO] [stdout] 1113 | | self.last_match = Some(current as usize); [INFO] [stdout] 1114 | | self.cursor_y = current as u16; [INFO] [stdout] ... | [INFO] [stdout] 1119 | | } [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] 1111 ~ if let Some(row) = self.rows.get(current as usize) [INFO] [stdout] 1112 ~ && let Some(match_pos) = row.render.find(query) { [INFO] [stdout] 1113 | self.last_match = Some(current as usize); [INFO] [stdout] ... [INFO] [stdout] 1117 | break; [INFO] [stdout] 1118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Match` is never constructed [INFO] [stdout] --> src/editor.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 13 | enum HighlightType { [INFO] [stdout] | ------------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 21 | Match, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HighlightType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/editor.rs:53:1 [INFO] [stdout] | [INFO] [stdout] 53 | / impl Default for Row { [INFO] [stdout] 54 | | fn default() -> Self { [INFO] [stdout] 55 | | Self { [INFO] [stdout] 56 | | idx: 0, [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 45 + #[derive(Default)] [INFO] [stdout] 46 | pub struct Row { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Buffer` [INFO] [stdout] --> src/editor.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | / pub fn new() -> Self { [INFO] [stdout] 87 | | Self { [INFO] [stdout] 88 | | content: String::new(), [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [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] 85 + impl Default for Buffer { [INFO] [stdout] 86 + fn default() -> Self { [INFO] [stdout] 87 + Self::new() [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Editor` [INFO] [stdout] --> src/editor.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / pub fn new() -> Self { [INFO] [stdout] 99 | | Self { [INFO] [stdout] 100 | | should_quit: false, [INFO] [stdout] 101 | | terminal: Terminal::new().expect("Failed to initialize terminal"), [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 97 + impl Default for Editor { [INFO] [stdout] 98 + fn default() -> Self { [INFO] [stdout] 99 + Self::new() [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/editor.rs:184:17 [INFO] [stdout] | [INFO] [stdout] 184 | / if (self.cursor_y as usize) < self.rows.len() { [INFO] [stdout] 185 | | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 186 | | } [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] 183 ~ KeyEvent { code: KeyCode::End, .. } [INFO] [stdout] 184 ~ if (self.cursor_y as usize) < self.rows.len() => { [INFO] [stdout] 185 | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/editor.rs:244:17 [INFO] [stdout] | [INFO] [stdout] 244 | / if (self.cursor_y as usize) < self.rows.len() { [INFO] [stdout] 245 | | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 246 | | } [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] 243 ~ KeyEvent { code: KeyCode::End, .. } [INFO] [stdout] 244 ~ if (self.cursor_y as usize) < self.rows.len() => { [INFO] [stdout] 245 | self.cursor_x = self.rows[self.cursor_y as usize].text.len() as u16; [INFO] [stdout] 246 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/editor.rs:794:23 [INFO] [stdout] | [INFO] [stdout] 794 | while render.len() % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!render.len().is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:899:21 [INFO] [stdout] | [INFO] [stdout] 899 | / if filename.contains(pattern) { [INFO] [stdout] 900 | | if pattern.starts_with('.') || filename.ends_with(pattern) { [INFO] [stdout] 901 | | self.syntax = Some(syntax.clone()); [INFO] [stdout] ... | [INFO] [stdout] 908 | | } [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] 899 ~ if filename.contains(pattern) [INFO] [stdout] 900 ~ && (pattern.starts_with('.') || filename.ends_with(pattern)) { [INFO] [stdout] 901 | self.syntax = Some(syntax.clone()); [INFO] [stdout] ... [INFO] [stdout] 906 | return; [INFO] [stdout] 907 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/editor.rs:940:24 [INFO] [stdout] | [INFO] [stdout] 940 | if !in_string.is_some() && !in_comment { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `in_string.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/editor.rs:927:23 [INFO] [stdout] | [INFO] [stdout] 927 | let scs = syntax.singleline_comment_start.as_ref().map(|s| s.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `syntax.singleline_comment_start.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/editor.rs:928:23 [INFO] [stdout] | [INFO] [stdout] 928 | let mcs = syntax.multiline_comment_start.as_ref().map(|s| s.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `syntax.multiline_comment_start.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/editor.rs:929:23 [INFO] [stdout] | [INFO] [stdout] 929 | let mce = syntax.multiline_comment_end.as_ref().map(|s| s.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `syntax.multiline_comment_end.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:939:17 [INFO] [stdout] | [INFO] [stdout] 939 | / if let Some(scs_str) = scs { [INFO] [stdout] 940 | | if !in_string.is_some() && !in_comment { [INFO] [stdout] 941 | | if render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] 942 | | for j in i..hl.len() { [INFO] [stdout] ... | [INFO] [stdout] 948 | | } [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] 939 ~ if let Some(scs_str) = scs [INFO] [stdout] 940 ~ && !in_string.is_some() && !in_comment { [INFO] [stdout] 941 | if render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] ... [INFO] [stdout] 946 | } [INFO] [stdout] 947 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:940:21 [INFO] [stdout] | [INFO] [stdout] 940 | / if !in_string.is_some() && !in_comment { [INFO] [stdout] 941 | | if render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] 942 | | for j in i..hl.len() { [INFO] [stdout] 943 | | hl[j] = HighlightType::Comment; [INFO] [stdout] ... | [INFO] [stdout] 947 | | } [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] 940 ~ if !in_string.is_some() && !in_comment [INFO] [stdout] 941 ~ && render_chars[i..].iter().collect::().starts_with(scs_str) { [INFO] [stdout] 942 | for j in i..hl.len() { [INFO] [stdout] ... [INFO] [stdout] 945 | break; [INFO] [stdout] 946 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `hl` [INFO] [stdout] --> src/editor.rs:942:38 [INFO] [stdout] | [INFO] [stdout] 942 | ... for j in i..hl.len() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 942 - for j in i..hl.len() { [INFO] [stdout] 942 + for in hl.iter_mut().skip(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:951:17 [INFO] [stdout] | [INFO] [stdout] 951 | / if let (Some(mcs_str), Some(mce_str)) = (mcs, mce) { [INFO] [stdout] 952 | | if in_string.is_none() { [INFO] [stdout] 953 | | if in_comment { [INFO] [stdout] 954 | | hl[i] = HighlightType::MlComment; [INFO] [stdout] ... | [INFO] [stdout] 976 | | } [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] 951 ~ if let (Some(mcs_str), Some(mce_str)) = (mcs, mce) [INFO] [stdout] 952 ~ && in_string.is_none() { [INFO] [stdout] 953 | if in_comment { [INFO] [stdout] ... [INFO] [stdout] 974 | } [INFO] [stdout] 975 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:1002:17 [INFO] [stdout] | [INFO] [stdout] 1002 | / if syntax.flags & HL_HIGHLIGHT_NUMBERS != 0 { [INFO] [stdout] 1003 | | if (c.is_ascii_digit() && (prev_sep || prev_hl == HighlightType::Number)) || [INFO] [stdout] 1004 | | (c == '.' && prev_hl == HighlightType::Number) { [INFO] [stdout] 1005 | | hl[i] = HighlightType::Number; [INFO] [stdout] ... | [INFO] [stdout] 1010 | | } [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] 1002 ~ if syntax.flags & HL_HIGHLIGHT_NUMBERS != 0 [INFO] [stdout] 1003 ~ && ((c.is_ascii_digit() && (prev_sep || prev_hl == HighlightType::Number)) || [INFO] [stdout] 1004 ~ (c == '.' && prev_hl == HighlightType::Number)) { [INFO] [stdout] 1005 | hl[i] = HighlightType::Number; [INFO] [stdout] ... [INFO] [stdout] 1008 | continue; [INFO] [stdout] 1009 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/editor.rs:1111:13 [INFO] [stdout] | [INFO] [stdout] 1111 | / if let Some(row) = self.rows.get(current as usize) { [INFO] [stdout] 1112 | | if let Some(match_pos) = row.render.find(query) { [INFO] [stdout] 1113 | | self.last_match = Some(current as usize); [INFO] [stdout] 1114 | | self.cursor_y = current as u16; [INFO] [stdout] ... | [INFO] [stdout] 1119 | | } [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] 1111 ~ if let Some(row) = self.rows.get(current as usize) [INFO] [stdout] 1112 ~ && let Some(match_pos) = row.render.find(query) { [INFO] [stdout] 1113 | self.last_match = Some(current as usize); [INFO] [stdout] ... [INFO] [stdout] 1117 | break; [INFO] [stdout] 1118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.79s [INFO] running `Command { std: "docker" "inspect" "3f4a12a9cbabbef1c399dc38528de648905d609b5996ec3f73cc6a9240b5cbce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3f4a12a9cbabbef1c399dc38528de648905d609b5996ec3f73cc6a9240b5cbce", kill_on_drop: false }` [INFO] [stdout] 3f4a12a9cbabbef1c399dc38528de648905d609b5996ec3f73cc6a9240b5cbce