[INFO] fetching crate lino 0.10.0... [INFO] linting lino-0.10.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate lino 0.10.0 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate lino 0.10.0 [INFO] finished tweaking crates.io crate lino 0.10.0 [INFO] tweaked toml for crates.io crate lino 0.10.0 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate lino 0.10.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate lino 0.10.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded ctrlc v3.2.1 [INFO] [stderr] Downloaded plist v1.2.1 [INFO] [stderr] Downloaded pkg-config v0.3.20 [INFO] [stderr] Downloaded onig v6.3.0 [INFO] [stderr] Downloaded proc-macro2 v1.0.30 [INFO] [stderr] Downloaded wayland-cursor v0.28.6 [INFO] [stderr] Downloaded smithay-clipboard v0.6.4 [INFO] [stderr] Downloaded cc v1.0.71 [INFO] [stderr] Downloaded memmap2 v0.2.3 [INFO] [stderr] Downloaded wayland-commons v0.28.6 [INFO] [stderr] Downloaded signal-hook v0.3.10 [INFO] [stderr] Downloaded wayland-scanner v0.28.6 [INFO] [stderr] Downloaded minimal-lexical v0.1.4 [INFO] [stderr] Downloaded wayland-client v0.28.6 [INFO] [stderr] Downloaded nom v7.0.0 [INFO] [stderr] Downloaded wayland-protocols v0.28.6 [INFO] [stderr] Downloaded xcb v0.9.0 [INFO] [stderr] Downloaded syn v1.0.80 [INFO] [stderr] Downloaded smithay-client-toolkit v0.14.0 [INFO] [stderr] Downloaded crossterm v0.22.1 [INFO] [stderr] Downloaded nix v0.23.0 [INFO] [stderr] Downloaded libloading v0.7.1 [INFO] [stderr] Downloaded copypasta v0.7.1 [INFO] [stderr] Downloaded wayland-sys v0.28.6 [INFO] [stderr] Downloaded x11-clipboard v0.5.2 [INFO] [stderr] Downloaded libc v0.2.104 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] aeae8fceea890ea0ddce5b488c51667c934615800230ff008459fb805636dd02 [INFO] running `Command { std: "docker" "start" "-a" "aeae8fceea890ea0ddce5b488c51667c934615800230ff008459fb805636dd02", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aeae8fceea890ea0ddce5b488c51667c934615800230ff008459fb805636dd02", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aeae8fceea890ea0ddce5b488c51667c934615800230ff008459fb805636dd02", kill_on_drop: false }` [INFO] [stdout] aeae8fceea890ea0ddce5b488c51667c934615800230ff008459fb805636dd02 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] ca012ea49230a711856b02d819e8ebe47ae45e013c55d06a8a6b78177b257e13 [INFO] running `Command { std: "docker" "start" "-a" "ca012ea49230a711856b02d819e8ebe47ae45e013c55d06a8a6b78177b257e13", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.104 [INFO] [stderr] Compiling proc-macro2 v1.0.30 [INFO] [stderr] Compiling pkg-config v0.3.20 [INFO] [stderr] Compiling xml-rs v0.8.4 [INFO] [stderr] Checking smallvec v1.7.0 [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Compiling version_check v0.9.3 [INFO] [stderr] Checking minimal-lexical v0.1.4 [INFO] [stderr] Checking scoped-tls v1.0.0 [INFO] [stderr] Checking libloading v0.7.1 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling serde v1.0.130 [INFO] [stderr] Checking downcast-rs v1.2.0 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling cc v1.0.71 [INFO] [stderr] Compiling indexmap v1.7.0 [INFO] [stderr] Compiling memoffset v0.6.4 [INFO] [stderr] Compiling parking_lot_core v0.8.5 [INFO] [stderr] Compiling syn v1.0.80 [INFO] [stderr] Compiling signal-hook v0.3.10 [INFO] [stderr] Checking dlib v0.5.0 [INFO] [stderr] Checking instant v0.1.12 [INFO] [stderr] Compiling serde_json v1.0.68 [INFO] [stderr] Compiling serde_derive v1.0.130 [INFO] [stderr] Compiling nom v7.0.0 [INFO] [stderr] Checking lock_api v0.4.5 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Compiling wayland-sys v0.28.6 [INFO] [stderr] Checking linked-hash-map v0.5.4 [INFO] [stderr] Checking regex-syntax v0.6.25 [INFO] [stderr] Checking lazycell v1.3.0 [INFO] [stderr] Checking yaml-rust v0.4.5 [INFO] [stderr] Compiling quote v1.0.10 [INFO] [stderr] Compiling onig_sys v69.7.1 [INFO] [stderr] Compiling wayland-scanner v0.28.6 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking nix v0.20.0 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking memmap2 v0.2.3 [INFO] [stderr] Checking mio v0.7.14 [INFO] [stderr] Checking nix v0.23.0 [INFO] [stderr] Checking flate2 v1.0.22 [INFO] [stderr] Compiling xcb v0.9.0 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking signal-hook-mio v0.2.1 [INFO] [stderr] Checking crossterm v0.22.1 [INFO] [stderr] Compiling wayland-client v0.28.6 [INFO] [stderr] Compiling wayland-protocols v0.28.6 [INFO] [stderr] Checking xcursor v0.3.4 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking plist v1.2.1 [INFO] [stderr] Checking wayland-commons v0.28.6 [INFO] [stderr] Checking ctrlc v3.2.1 [INFO] [stderr] Checking wayland-cursor v0.28.6 [INFO] [stderr] Checking onig v6.3.0 [INFO] [stderr] Checking syntect v4.6.0 [INFO] [stderr] Checking x11-clipboard v0.5.2 [INFO] [stderr] Checking smithay-client-toolkit v0.14.0 [INFO] [stderr] Checking smithay-clipboard v0.6.4 [INFO] [stderr] Checking copypasta v0.7.1 [INFO] [stderr] Checking lino v0.10.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use std; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/init.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/handle.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/edit.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/highlight.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use syntect; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/highlight.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | syntax_set: syntax_set, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `syntax_set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/highlight.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | theme_set: theme_set, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `theme_set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/highlight.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | syntax: syntax, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `syntax` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/render.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:101:21 [INFO] [stdout] | [INFO] [stdout] 101 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:120:25 [INFO] [stdout] | [INFO] [stdout] 120 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:121:25 [INFO] [stdout] | [INFO] [stdout] 121 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use std; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:155:80 [INFO] [stdout] | [INFO] [stdout] 155 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) { [INFO] [stdout] | ^^^^^^^^ help: replace it with: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:155:90 [INFO] [stdout] | [INFO] [stdout] 155 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) { [INFO] [stdout] | ^^^^^^^^ help: replace it with: `col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:164:80 [INFO] [stdout] | [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] | ^^^^^^^^ help: replace it with: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:164:90 [INFO] [stdout] | [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] | ^^^^^^^^ help: replace it with: `col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/init.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/handle.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:175:21 [INFO] [stdout] | [INFO] [stdout] 175 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:176:21 [INFO] [stdout] | [INFO] [stdout] 176 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:201:25 [INFO] [stdout] | [INFO] [stdout] 201 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:202:25 [INFO] [stdout] | [INFO] [stdout] 202 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:212:21 [INFO] [stdout] | [INFO] [stdout] 212 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:214:21 [INFO] [stdout] | [INFO] [stdout] 214 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:231:25 [INFO] [stdout] | [INFO] [stdout] 231 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:232:25 [INFO] [stdout] | [INFO] [stdout] 232 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:242:21 [INFO] [stdout] | [INFO] [stdout] 242 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:243:21 [INFO] [stdout] | [INFO] [stdout] 243 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:244:21 [INFO] [stdout] | [INFO] [stdout] 244 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/edit.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/highlight.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use syntect; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/highlight.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | syntax_set: syntax_set, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `syntax_set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/highlight.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | theme_set: theme_set, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `theme_set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/highlight.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | syntax: syntax, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `syntax` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/render.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/frames.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:101:21 [INFO] [stdout] | [INFO] [stdout] 101 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:120:25 [INFO] [stdout] | [INFO] [stdout] 120 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:121:25 [INFO] [stdout] | [INFO] [stdout] 121 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:155:80 [INFO] [stdout] | [INFO] [stdout] 155 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) { [INFO] [stdout] | ^^^^^^^^ help: replace it with: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:155:90 [INFO] [stdout] | [INFO] [stdout] 155 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) { [INFO] [stdout] | ^^^^^^^^ help: replace it with: `col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:164:80 [INFO] [stdout] | [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] | ^^^^^^^^ help: replace it with: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:164:90 [INFO] [stdout] | [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] | ^^^^^^^^ help: replace it with: `col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:175:21 [INFO] [stdout] | [INFO] [stdout] 175 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/input_prompt/render.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:176:21 [INFO] [stdout] | [INFO] [stdout] 176 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:201:25 [INFO] [stdout] | [INFO] [stdout] 201 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:202:25 [INFO] [stdout] | [INFO] [stdout] 202 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:212:21 [INFO] [stdout] | [INFO] [stdout] 212 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:214:21 [INFO] [stdout] | [INFO] [stdout] 214 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/confirmation_prompt/render.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:231:25 [INFO] [stdout] | [INFO] [stdout] 231 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:232:25 [INFO] [stdout] | [INFO] [stdout] 232 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:242:21 [INFO] [stdout] | [INFO] [stdout] 242 | background: background, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `background` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:243:21 [INFO] [stdout] | [INFO] [stdout] 243 | foreground: foreground, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreground` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lino/render.rs:244:21 [INFO] [stdout] | [INFO] [stdout] 244 | character: character, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/frames.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/input_prompt/render.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/lino/confirmation_prompt/render.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use crossterm; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `text_frame_highlighted_fg` is never read [INFO] [stdout] --> src/lino/mod.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 100 | pub(crate) struct Theming { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 109 | text_frame_highlighted_fg: crossterm::style::Color, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Theming` has a derived impl for the trait `Clone`, but this is 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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lino/init.rs:12:33 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn from_file(file_path: &String) -> Lino { [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] 12 ~ pub fn from_file(file_path: &str) -> Lino { [INFO] [stdout] 13 | let mut lino = Lino::new(); [INFO] [stdout] 14 ~ lino.file.path = Path::new(file_path).to_str().unwrap().to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/init.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | Lino::init(&input_string) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `input_string` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lino/init.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) fn init(input_string: &String) -> Lino { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 - pub(crate) fn init(input_string: &String) -> Lino { [INFO] [stdout] 26 + pub(crate) fn init(input_string: &str) -> Lino { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/handle.rs:27:33 [INFO] [stdout] | [INFO] [stdout] 27 | ... self.cursor.clone())).unwrap_or(()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lino/handle.rs:353:12 [INFO] [stdout] | [INFO] [stdout] 353 | if !operation_to_perform.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `operation_to_perform.is_some()` [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 `unwrap` on `operation_to_perform` after checking its variant with `is_none` [INFO] [stdout] --> src/lino/handle.rs:354:13 [INFO] [stdout] | [INFO] [stdout] 353 | if !operation_to_perform.is_none() { [INFO] [stdout] | ------------------------------ the check is happening here [INFO] [stdout] 354 | operation_to_perform.unwrap()(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:47:31 [INFO] [stdout] | [INFO] [stdout] 47 | let mut key_binding = format!(""); [INFO] [stdout] | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()` [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/handle.rs:344:17 [INFO] [stdout] | [INFO] [stdout] 344 | / if event.modifiers == crossterm::event::KeyModifiers::NONE { [INFO] [stdout] 345 | | key_binding = format!("{}", keys::ESC); [INFO] [stdout] 346 | | } [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] 343 ~ crossterm::event::KeyCode::Esc [INFO] [stdout] 344 ~ if event.modifiers == crossterm::event::KeyModifiers::NONE => { [INFO] [stdout] 345 | key_binding = format!("{}", keys::ESC); [INFO] [stdout] 346 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lino/handle.rs:120:84 [INFO] [stdout] | [INFO] [stdout] 120 | | crossterm::event::KeyModifiers::SHIFT) && (c == 'z' || c == 'Z') { [INFO] [stdout] | ____________________________________________________________________________________^ [INFO] [stdout] 121 | | key_binding = format!("{}+{}", keys::CTRL, 'y'); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lino/handle.rs:125:43 [INFO] [stdout] | [INFO] [stdout] 125 | && (c == 'y' || c == 'Y') { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 126 | | key_binding = format!("{}+{}", keys::CTRL, 'y'); [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:56:35 [INFO] [stdout] | [INFO] [stdout] 56 | key_binding = format!("{}", keys::CHAR_INPUT); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::CHAR_INPUT.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: field `text_frame_highlighted_fg` is never read [INFO] [stdout] --> src/lino/mod.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 100 | pub(crate) struct Theming { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 109 | text_frame_highlighted_fg: crossterm::style::Color, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Theming` has a derived impl for the trait `Clone`, but this is 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: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:161:31 [INFO] [stdout] | [INFO] [stdout] 161 | key_binding = format!("{}", keys::TAB); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::TAB.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lino/init.rs:12:33 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn from_file(file_path: &String) -> Lino { [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] 12 ~ pub fn from_file(file_path: &str) -> Lino { [INFO] [stdout] 13 | let mut lino = Lino::new(); [INFO] [stdout] 14 ~ lino.file.path = Path::new(file_path).to_str().unwrap().to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/init.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | Lino::init(&input_string) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `input_string` [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: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:168:35 [INFO] [stdout] | [INFO] [stdout] 168 | key_binding = format!("{}", keys::ENTER); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ENTER.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lino/init.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) fn init(input_string: &String) -> Lino { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 - pub(crate) fn init(input_string: &String) -> Lino { [INFO] [stdout] 26 + pub(crate) fn init(input_string: &str) -> Lino { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:181:35 [INFO] [stdout] | [INFO] [stdout] 181 | key_binding = format!("{}", keys::BACKSPACE); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::BACKSPACE.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/lino/handle.rs:194:35 [INFO] [stdout] | [INFO] [stdout] 194 | key_binding = format!("{}", keys::DELETE); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::DELETE.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/lino/handle.rs:211:35 [INFO] [stdout] | [INFO] [stdout] 211 | key_binding = format!("{}", keys::HOME); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::HOME.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/lino/handle.rs:220:35 [INFO] [stdout] | [INFO] [stdout] 220 | key_binding = format!("{}", keys::END); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::END.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/lino/handle.rs:229:35 [INFO] [stdout] | [INFO] [stdout] 229 | key_binding = format!("{}", keys::PAGE_UP); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::PAGE_UP.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/lino/handle.rs:238:35 [INFO] [stdout] | [INFO] [stdout] 238 | key_binding = format!("{}", keys::PAGE_DOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::PAGE_DOWN.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/lino/handle.rs:247:35 [INFO] [stdout] | [INFO] [stdout] 247 | key_binding = format!("{}", keys::LEFT); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::LEFT.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/lino/handle.rs:269:35 [INFO] [stdout] | [INFO] [stdout] 269 | key_binding = format!("{}", keys::RIGHT); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::RIGHT.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/lino/handle.rs:291:35 [INFO] [stdout] | [INFO] [stdout] 291 | key_binding = format!("{}", keys::UP); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::UP.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/handle.rs:27:33 [INFO] [stdout] | [INFO] [stdout] 27 | ... self.cursor.clone())).unwrap_or(()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:318:35 [INFO] [stdout] | [INFO] [stdout] 318 | key_binding = format!("{}", keys::DOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::DOWN.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 boolean expression can be simplified [INFO] [stdout] --> src/lino/handle.rs:353:12 [INFO] [stdout] | [INFO] [stdout] 353 | if !operation_to_perform.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `operation_to_perform.is_some()` [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 `unwrap` on `operation_to_perform` after checking its variant with `is_none` [INFO] [stdout] --> src/lino/handle.rs:354:13 [INFO] [stdout] | [INFO] [stdout] 353 | if !operation_to_perform.is_none() { [INFO] [stdout] | ------------------------------ the check is happening here [INFO] [stdout] 354 | operation_to_perform.unwrap()(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:47:31 [INFO] [stdout] | [INFO] [stdout] 47 | let mut key_binding = format!(""); [INFO] [stdout] | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()` [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/handle.rs:344:17 [INFO] [stdout] | [INFO] [stdout] 344 | / if event.modifiers == crossterm::event::KeyModifiers::NONE { [INFO] [stdout] 345 | | key_binding = format!("{}", keys::ESC); [INFO] [stdout] 346 | | } [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] 343 ~ crossterm::event::KeyCode::Esc [INFO] [stdout] 344 ~ if event.modifiers == crossterm::event::KeyModifiers::NONE => { [INFO] [stdout] 345 | key_binding = format!("{}", keys::ESC); [INFO] [stdout] 346 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lino/handle.rs:120:84 [INFO] [stdout] | [INFO] [stdout] 120 | | crossterm::event::KeyModifiers::SHIFT) && (c == 'z' || c == 'Z') { [INFO] [stdout] | ____________________________________________________________________________________^ [INFO] [stdout] 121 | | key_binding = format!("{}+{}", keys::CTRL, 'y'); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lino/handle.rs:125:43 [INFO] [stdout] | [INFO] [stdout] 125 | && (c == 'y' || c == 'Y') { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 126 | | key_binding = format!("{}+{}", keys::CTRL, 'y'); [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:56:35 [INFO] [stdout] | [INFO] [stdout] 56 | key_binding = format!("{}", keys::CHAR_INPUT); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::CHAR_INPUT.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/lino/handle.rs:345:35 [INFO] [stdout] | [INFO] [stdout] 345 | key_binding = format!("{}", keys::ESC); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ESC.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: manual implementation of an assign operation [INFO] [stdout] --> src/lino/cursor.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | self.cursor.row = self.cursor.row - self.text_frame.height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.cursor.row -= self.text_frame.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lino/cursor.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | self.cursor.row = self.cursor.row + self.text_frame.height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.cursor.row += self.text_frame.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - self.cursor.col -= 1; [INFO] [stdout] 65 - return; [INFO] [stdout] 64 + self.cursor.col -= 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 85 - self.cursor.col += 1; [INFO] [stdout] 86 - return; [INFO] [stdout] 85 + self.cursor.col += 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | return self.cursor.col == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 185 - return self.cursor.col == 0; [INFO] [stdout] 185 + self.cursor.col == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | return self.cursor.col == self.lines[self.cursor.row].len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 189 - return self.cursor.col == self.lines[self.cursor.row].len(); [INFO] [stdout] 189 + self.cursor.col == self.lines[self.cursor.row].len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | return self.lines[self.cursor.row].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return self.lines[self.cursor.row].len() == 0; [INFO] [stdout] 193 + self.lines[self.cursor.row].len() == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/cursor.rs:193:16 [INFO] [stdout] | [INFO] [stdout] 193 | return self.lines[self.cursor.row].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.lines[self.cursor.row].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | return self.cursor.row == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 - return self.cursor.row == 0; [INFO] [stdout] 197 + self.cursor.row == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | return self.cursor.row == self.lines.len() - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 201 - return self.cursor.row == self.lines.len() - 1; [INFO] [stdout] 201 + self.cursor.row == self.lines.len() - 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | return self.is_cursor_at_last_line() && self.is_cursor_at_line_end(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 205 - return self.is_cursor_at_last_line() && self.is_cursor_at_line_end(); [INFO] [stdout] 205 + self.is_cursor_at_last_line() && self.is_cursor_at_line_end() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | return self.lines.len() == 1 && self.lines[0].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 209 - return self.lines.len() == 1 && self.lines[0].len() == 0; [INFO] [stdout] 209 + self.lines.len() == 1 && self.lines[0].len() == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/cursor.rs:209:41 [INFO] [stdout] | [INFO] [stdout] 209 | return self.lines.len() == 1 && self.lines[0].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.lines[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | / return self.cursor.row > other_cursor.row [INFO] [stdout] 214 | | || (self.cursor.row == other_cursor.row && self.cursor.col > other_cursor.col); [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 213 ~ self.cursor.row > other_cursor.row [INFO] [stdout] 214 ~ || (self.cursor.row == other_cursor.row && self.cursor.col > other_cursor.col) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:218:9 [INFO] [stdout] | [INFO] [stdout] 218 | / return self.cursor.row < other_cursor.row [INFO] [stdout] 219 | | || (self.cursor.row == other_cursor.row && self.cursor.col < other_cursor.col); [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 218 ~ self.cursor.row < other_cursor.row [INFO] [stdout] 219 ~ || (self.cursor.row == other_cursor.row && self.cursor.col < other_cursor.col) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:161:31 [INFO] [stdout] | [INFO] [stdout] 161 | key_binding = format!("{}", keys::TAB); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::TAB.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: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:223:9 [INFO] [stdout] | [INFO] [stdout] 223 | return self.cursor.row == other_cursor.row && self.cursor.col == other_cursor.col; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 223 - return self.cursor.row == other_cursor.row && self.cursor.col == other_cursor.col; [INFO] [stdout] 223 + self.cursor.row == other_cursor.row && self.cursor.col == other_cursor.col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:168:35 [INFO] [stdout] | [INFO] [stdout] 168 | key_binding = format!("{}", keys::ENTER); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ENTER.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/lino/handle.rs:181:35 [INFO] [stdout] | [INFO] [stdout] 181 | key_binding = format!("{}", keys::BACKSPACE); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::BACKSPACE.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: unneeded `return` statement [INFO] [stdout] --> src/lino/edit.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - self.cursor.col = 0; [INFO] [stdout] 57 - return; [INFO] [stdout] 56 + self.cursor.col = 0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:194:35 [INFO] [stdout] | [INFO] [stdout] 194 | key_binding = format!("{}", keys::DELETE); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::DELETE.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: length comparison to zero [INFO] [stdout] --> src/lino/edit.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 74 | if self.lines[self.cursor.row - 1].len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines[self.cursor.row - 1].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/edit.rs:112:13 [INFO] [stdout] | [INFO] [stdout] 112 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] 112 - return; [INFO] [stdout] 111 + self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:211:35 [INFO] [stdout] | [INFO] [stdout] 211 | key_binding = format!("{}", keys::HOME); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::HOME.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/lino/handle.rs:220:35 [INFO] [stdout] | [INFO] [stdout] 220 | key_binding = format!("{}", keys::END); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::END.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: unneeded `return` statement [INFO] [stdout] --> src/lino/edit.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] 143 - return; [INFO] [stdout] 142 + self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:229:35 [INFO] [stdout] | [INFO] [stdout] 229 | key_binding = format!("{}", keys::PAGE_UP); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::PAGE_UP.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:153:31 [INFO] [stdout] | [INFO] [stdout] 153 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:164:31 [INFO] [stdout] | [INFO] [stdout] 164 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:238:35 [INFO] [stdout] | [INFO] [stdout] 238 | key_binding = format!("{}", keys::PAGE_DOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::PAGE_DOWN.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:189:23 [INFO] [stdout] | [INFO] [stdout] 189 | self.cursor = selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:203:29 [INFO] [stdout] | [INFO] [stdout] 203 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:227:29 [INFO] [stdout] | [INFO] [stdout] 227 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:247:35 [INFO] [stdout] | [INFO] [stdout] 247 | key_binding = format!("{}", keys::LEFT); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::LEFT.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:231:23 [INFO] [stdout] | [INFO] [stdout] 231 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:269:35 [INFO] [stdout] | [INFO] [stdout] 269 | key_binding = format!("{}", keys::RIGHT); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::RIGHT.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:235:23 [INFO] [stdout] | [INFO] [stdout] 235 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:240:23 [INFO] [stdout] | [INFO] [stdout] 240 | self.cursor = selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:291:35 [INFO] [stdout] | [INFO] [stdout] 291 | key_binding = format!("{}", keys::UP); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::UP.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: length comparison to zero [INFO] [stdout] --> src/lino/edit.rs:331:36 [INFO] [stdout] | [INFO] [stdout] 331 | if should_move_curor_up && self.lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/edit.rs:333:19 [INFO] [stdout] | [INFO] [stdout] 333 | } else if self.lines.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:318:35 [INFO] [stdout] | [INFO] [stdout] 318 | key_binding = format!("{}", keys::DOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::DOWN.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:360:23 [INFO] [stdout] | [INFO] [stdout] 360 | self.cursor = selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `clipboard_ctx` after checking its variant with `is_ok` [INFO] [stdout] --> src/lino/edit.rs:408:37 [INFO] [stdout] | [INFO] [stdout] 407 | if clipboard_ctx.is_ok() { [INFO] [stdout] | ------------------------ help: try: `if let Ok() = clipboard_ctx` [INFO] [stdout] 408 | let mut clipboard_ctx = clipboard_ctx.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:381:37 [INFO] [stdout] | [INFO] [stdout] 381 | let current_cursor_backup = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/handle.rs:345:35 [INFO] [stdout] | [INFO] [stdout] 345 | key_binding = format!("{}", keys::ESC); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ESC.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `clipboard_ctx` after checking its variant with `is_ok` [INFO] [stdout] --> src/lino/edit.rs:419:37 [INFO] [stdout] | [INFO] [stdout] 418 | if clipboard_ctx.is_ok() { [INFO] [stdout] | ------------------------ help: try: `if let Ok() = clipboard_ctx` [INFO] [stdout] 419 | let mut clipboard_ctx = clipboard_ctx.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/edit.rs:417:9 [INFO] [stdout] | [INFO] [stdout] 417 | let copied_string: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `copied_string` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 417 ~ [INFO] [stdout] 418 ~ let copied_string: String = if clipboard_ctx.is_ok() { [INFO] [stdout] 419 | let mut clipboard_ctx = clipboard_ctx.unwrap(); [INFO] [stdout] 420 ~ clipboard_ctx.get_contents().unwrap() [INFO] [stdout] 421 | } else { [INFO] [stdout] 422 ~ self.clipboard.clone() [INFO] [stdout] 423 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lino/cursor.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | self.cursor.row = self.cursor.row - self.text_frame.height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.cursor.row -= self.text_frame.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lino/cursor.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | self.cursor.row = self.cursor.row + self.text_frame.height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.cursor.row += self.text_frame.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lino/highlight.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | -> (Sender<(HighlightingThreadMessage, Cursor)>, [INFO] [stdout] | ____________^ [INFO] [stdout] 40 | | Receiver<(std::vec::Vec<(syntect::highlighting::Style, usize)>, Cursor)> [INFO] [stdout] 41 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - self.cursor.col -= 1; [INFO] [stdout] 65 - return; [INFO] [stdout] 64 + self.cursor.col -= 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/highlight.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | self.cursor.clone())).unwrap_or(()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 85 - self.cursor.col += 1; [INFO] [stdout] 86 - return; [INFO] [stdout] 85 + self.cursor.col += 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/highlight.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | if ranges.len() < 1 { return; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ranges.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/highlight.rs:100:29 [INFO] [stdout] | [INFO] [stdout] 100 | let cursor_backup = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lino/highlight.rs:170:12 [INFO] [stdout] | [INFO] [stdout] 170 | if !std::path::Path::new(self.file.path.as_str()).extension().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::path::Path::new(self.file.path.as_str()).extension().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/highlight.rs:173:28 [INFO] [stdout] | [INFO] [stdout] 173 | SyntectConfig::new(&file_ext) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `file_ext` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | return self.cursor.col == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 185 - return self.cursor.col == 0; [INFO] [stdout] 185 + self.cursor.col == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/render.rs:58:63 [INFO] [stdout] | [INFO] [stdout] 58 | if j == self.line_nums_frame.width - 1 && self.line_nums_frame.boundary_r != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.line_nums_frame.boundary_r.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | return self.cursor.col == self.lines[self.cursor.row].len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 189 - return self.cursor.col == self.lines[self.cursor.row].len(); [INFO] [stdout] 189 + self.cursor.col == self.lines[self.cursor.row].len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | return self.lines[self.cursor.row].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return self.lines[self.cursor.row].len() == 0; [INFO] [stdout] 193 + self.lines[self.cursor.row].len() == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/cursor.rs:193:16 [INFO] [stdout] | [INFO] [stdout] 193 | return self.lines[self.cursor.row].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.lines[self.cursor.row].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:86:32 [INFO] [stdout] | [INFO] [stdout] 86 | character: num_string_with_boundary.get(j).unwrap_or(&' ').clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*num_string_with_boundary.get(j).unwrap_or(&' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | return self.cursor.row == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 - return self.cursor.row == 0; [INFO] [stdout] 197 + self.cursor.row == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | return self.cursor.row == self.lines.len() - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 201 - return self.cursor.row == self.lines.len() - 1; [INFO] [stdout] 201 + self.cursor.row == self.lines.len() - 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:102:32 [INFO] [stdout] | [INFO] [stdout] 102 | character: num_string_with_boundary.get(j).unwrap_or(&' ').clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*num_string_with_boundary.get(j).unwrap_or(&' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | return self.is_cursor_at_last_line() && self.is_cursor_at_line_end(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 205 - return self.is_cursor_at_last_line() && self.is_cursor_at_line_end(); [INFO] [stdout] 205 + self.is_cursor_at_last_line() && self.is_cursor_at_line_end() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | return self.lines.len() == 1 && self.lines[0].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 209 - return self.lines.len() == 1 && self.lines[0].len() == 0; [INFO] [stdout] 209 + self.lines.len() == 1 && self.lines[0].len() == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/cursor.rs:209:41 [INFO] [stdout] | [INFO] [stdout] 209 | return self.lines.len() == 1 && self.lines[0].len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.lines[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | / return self.cursor.row > other_cursor.row [INFO] [stdout] 214 | | || (self.cursor.row == other_cursor.row && self.cursor.col > other_cursor.col); [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 213 ~ self.cursor.row > other_cursor.row [INFO] [stdout] 214 ~ || (self.cursor.row == other_cursor.row && self.cursor.col > other_cursor.col) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:218:9 [INFO] [stdout] | [INFO] [stdout] 218 | / return self.cursor.row < other_cursor.row [INFO] [stdout] 219 | | || (self.cursor.row == other_cursor.row && self.cursor.col < other_cursor.col); [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 218 ~ self.cursor.row < other_cursor.row [INFO] [stdout] 219 ~ || (self.cursor.row == other_cursor.row && self.cursor.col < other_cursor.col) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/cursor.rs:223:9 [INFO] [stdout] | [INFO] [stdout] 223 | return self.cursor.row == other_cursor.row && self.cursor.col == other_cursor.col; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 223 - return self.cursor.row == other_cursor.row && self.cursor.col == other_cursor.col; [INFO] [stdout] 223 + self.cursor.row == other_cursor.row && self.cursor.col == other_cursor.col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:152:42 [INFO] [stdout] | [INFO] [stdout] 152 | ... start_point: instance.start.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `instance.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:153:40 [INFO] [stdout] | [INFO] [stdout] 153 | ... end_point: instance.end.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `instance.end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/render.rs:164:25 [INFO] [stdout] | [INFO] [stdout] 164 | / if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 165 | | && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] 166 | | || (row == self.lines.len() - 1 && col < self.lines[row].len())) { [INFO] [stdout] 167 | | background = self.theming.text_frame_selection_bg; [INFO] [stdout] 168 | | foreground = self.theming.text_frame_selection_fg; [INFO] [stdout] 169 | | } [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] 163 ~ Some(selection) [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 165 | && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] 166 ~ || (row == self.lines.len() - 1 && col < self.lines[row].len())) => { [INFO] [stdout] 167 | background = self.theming.text_frame_selection_bg; [INFO] [stdout] 168 | foreground = self.theming.text_frame_selection_fg; [INFO] [stdout] 169 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/render.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | / match &sorted_selection_points { [INFO] [stdout] 163 | | Some(selection) => { [INFO] [stdout] 164 | | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 165 | | && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] ... | [INFO] [stdout] 171 | | _ => () [INFO] [stdout] 172 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Some(selection) = &sorted_selection_points { [INFO] [stdout] 163 + if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 164 + && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] 165 + || (row == self.lines.len() - 1 && col < self.lines[row].len())) { [INFO] [stdout] 166 + background = self.theming.text_frame_selection_bg; [INFO] [stdout] 167 + foreground = self.theming.text_frame_selection_fg; [INFO] [stdout] 168 + } [INFO] [stdout] 169 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/render.rs:164:60 [INFO] [stdout] | [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/lino/render.rs:178:28 [INFO] [stdout] | [INFO] [stdout] 178 | width: width as u8, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `width` [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: unneeded `return` statement [INFO] [stdout] --> src/lino/edit.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - self.cursor.col = 0; [INFO] [stdout] 57 - return; [INFO] [stdout] 56 + self.cursor.col = 0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/edit.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 74 | if self.lines[self.cursor.row - 1].len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines[self.cursor.row - 1].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lino/render.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 264 | / let status_string = if status_string.len() > self.term_width { [INFO] [stdout] 265 | | status_string[status_string.len()-self.term_width..].to_string() [INFO] [stdout] 266 | | } else { [INFO] [stdout] 267 | | status_string [INFO] [stdout] 268 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 269 | [INFO] [stdout] 270 | status_string [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 264 ~ [INFO] [stdout] 265 | [INFO] [stdout] 266 ~ if status_string.len() > self.term_width { [INFO] [stdout] 267 + status_string[status_string.len()-self.term_width..].to_string() [INFO] [stdout] 268 + } else { [INFO] [stdout] 269 + status_string [INFO] [stdout] 270 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/render.rs:257:16 [INFO] [stdout] | [INFO] [stdout] 257 | if self.file.path != "" { String::from(&self.file.path) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/edit.rs:112:13 [INFO] [stdout] | [INFO] [stdout] 112 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] 112 - return; [INFO] [stdout] 111 + self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/render.rs:260:50 [INFO] [stdout] | [INFO] [stdout] 260 | file_name + if !self.file.is_saved { &"* - "} else { &" - "} [INFO] [stdout] | ^^^^^^^ help: change this to: `"* - "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/render.rs:260:66 [INFO] [stdout] | [INFO] [stdout] 260 | file_name + if !self.file.is_saved { &"* - "} else { &" - "} [INFO] [stdout] | ^^^^^^ help: change this to: `" - "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lino/render.rs:288:9 [INFO] [stdout] | [INFO] [stdout] 282 | / let status_string = if status_string.len() > self.term_width { [INFO] [stdout] 283 | | status_string[..self.term_width].to_string() [INFO] [stdout] 284 | | } else { [INFO] [stdout] 285 | | status_string [INFO] [stdout] 286 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 287 | [INFO] [stdout] 288 | status_string [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 282 ~ [INFO] [stdout] 283 | [INFO] [stdout] 284 ~ if status_string.len() > self.term_width { [INFO] [stdout] 285 + status_string[..self.term_width].to_string() [INFO] [stdout] 286 + } else { [INFO] [stdout] 287 + status_string [INFO] [stdout] 288 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/edit.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] 143 - return; [INFO] [stdout] 142 + self.lines[self.cursor.row].remove(self.cursor.col); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/render.rs:274:37 [INFO] [stdout] | [INFO] [stdout] 274 | if !self.find.is_finding || self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:153:31 [INFO] [stdout] | [INFO] [stdout] 153 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lino/render.rs:310:9 [INFO] [stdout] | [INFO] [stdout] 304 | / let task_feedback = if task_feedback.len() > self.term_width { [INFO] [stdout] 305 | | task_feedback[..self.term_width].to_string() [INFO] [stdout] 306 | | } else { [INFO] [stdout] 307 | | task_feedback [INFO] [stdout] 308 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 309 | [INFO] [stdout] 310 | task_feedback [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 304 ~ [INFO] [stdout] 305 | [INFO] [stdout] 306 ~ if task_feedback.len() > self.term_width { [INFO] [stdout] 307 + task_feedback[..self.term_width].to_string() [INFO] [stdout] 308 + } else { [INFO] [stdout] 309 + task_feedback [INFO] [stdout] 310 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/render.rs:298:32 [INFO] [stdout] | [INFO] [stdout] 298 | let task_feedback = if self.task_feedback.text == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.task_feedback.text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:164:31 [INFO] [stdout] | [INFO] [stdout] 164 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:189:23 [INFO] [stdout] | [INFO] [stdout] 189 | self.cursor = selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:203:29 [INFO] [stdout] | [INFO] [stdout] 203 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/render.rs:341:20 [INFO] [stdout] | [INFO] [stdout] 341 | && same_styled_text.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!same_styled_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:227:29 [INFO] [stdout] | [INFO] [stdout] 227 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lino/util.rs:28:59 [INFO] [stdout] | [INFO] [stdout] 28 | pub(crate) fn convert_string_to_2d_text(input_string: &String) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 28 - pub(crate) fn convert_string_to_2d_text(input_string: &String) -> Vec> { [INFO] [stdout] 28 + pub(crate) fn convert_string_to_2d_text(input_string: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/lino/util.rs:40:32 [INFO] [stdout] | [INFO] [stdout] 40 | character: character.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/util.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return self.settings.tab_width - (self.cursor.col % self.settings.tab_width); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return self.settings.tab_width - (self.cursor.col % self.settings.tab_width); [INFO] [stdout] 56 + self.settings.tab_width - (self.cursor.col % self.settings.tab_width) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lino/file.rs:23:41 [INFO] [stdout] | [INFO] [stdout] 23 | let mut file = match File::open(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/file.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | / match file.read_to_string(&mut input_string) { [INFO] [stdout] 31 | | Err(why) => panic!("[ERROR] Couldn't read \"{}\": {}", display, why), [INFO] [stdout] 32 | | Ok(_) => (), [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ help: try: `if let Err(why) = file.read_to_string(&mut input_string) { panic!("[ERROR] Couldn't read \"{}\": {}", display, why) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `file` after checking its variant with `is_err` [INFO] [stdout] --> src/lino/file.rs:59:91 [INFO] [stdout] | [INFO] [stdout] 58 | if file.is_err() { [INFO] [stdout] | ---------------- help: try: `if let Err() = file` [INFO] [stdout] 59 | self.file.save_error = format!("[ERROR] Couldn't create \"{}\": {}", display, file.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lino/file.rs:56:33 [INFO] [stdout] | [INFO] [stdout] 56 | let file = File::create(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/file.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / match file.write_all(output_string.as_bytes()) { [INFO] [stdout] 67 | | Err(why) => { [INFO] [stdout] 68 | | self.file.save_error = format!("[ERROR] Couldn't write to \"{}\": {}", display, why); [INFO] [stdout] 69 | | return; [INFO] [stdout] 70 | | }, [INFO] [stdout] 71 | | Ok(_) => (), [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Err(why) = file.write_all(output_string.as_bytes()) { [INFO] [stdout] 67 + self.file.save_error = format!("[ERROR] Couldn't write to \"{}\": {}", display, why); [INFO] [stdout] 68 + return; [INFO] [stdout] 69 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:9:24 [INFO] [stdout] | [INFO] [stdout] 9 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:37:23 [INFO] [stdout] | [INFO] [stdout] 37 | self.cursor = last_iteration.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | self.selection = last_iteration.selection.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:51:24 [INFO] [stdout] | [INFO] [stdout] 51 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:55:23 [INFO] [stdout] | [INFO] [stdout] 55 | self.cursor = last_iteration.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:56:26 [INFO] [stdout] | [INFO] [stdout] 56 | self.selection = last_iteration.selection.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/selection.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | if self.lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/selection.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | if self.lines[self.selection.end_point.row].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines[self.selection.end_point.row].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:35:42 [INFO] [stdout] | [INFO] [stdout] 35 | self.selection.start_point = previous_cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:40:37 [INFO] [stdout] | [INFO] [stdout] 40 | let cursor_backup = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:41:31 [INFO] [stdout] | [INFO] [stdout] 41 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:231:23 [INFO] [stdout] | [INFO] [stdout] 231 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:235:23 [INFO] [stdout] | [INFO] [stdout] 235 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:240:23 [INFO] [stdout] | [INFO] [stdout] 240 | self.cursor = selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/edit.rs:331:36 [INFO] [stdout] | [INFO] [stdout] 331 | if should_move_curor_up && self.lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/edit.rs:333:19 [INFO] [stdout] | [INFO] [stdout] 333 | } else if self.lines.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:360:23 [INFO] [stdout] | [INFO] [stdout] 360 | self.cursor = selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `clipboard_ctx` after checking its variant with `is_ok` [INFO] [stdout] --> src/lino/edit.rs:408:37 [INFO] [stdout] | [INFO] [stdout] 407 | if clipboard_ctx.is_ok() { [INFO] [stdout] | ------------------------ help: try: `if let Ok() = clipboard_ctx` [INFO] [stdout] 408 | let mut clipboard_ctx = clipboard_ctx.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/edit.rs:381:37 [INFO] [stdout] | [INFO] [stdout] 381 | let current_cursor_backup = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `clipboard_ctx` after checking its variant with `is_ok` [INFO] [stdout] --> src/lino/edit.rs:419:37 [INFO] [stdout] | [INFO] [stdout] 418 | if clipboard_ctx.is_ok() { [INFO] [stdout] | ------------------------ help: try: `if let Ok() = clipboard_ctx` [INFO] [stdout] 419 | let mut clipboard_ctx = clipboard_ctx.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/edit.rs:417:9 [INFO] [stdout] | [INFO] [stdout] 417 | let copied_string: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `copied_string` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 417 ~ [INFO] [stdout] 418 ~ let copied_string: String = if clipboard_ctx.is_ok() { [INFO] [stdout] 419 | let mut clipboard_ctx = clipboard_ctx.unwrap(); [INFO] [stdout] 420 ~ clipboard_ctx.get_contents().unwrap() [INFO] [stdout] 421 | } else { [INFO] [stdout] 422 ~ self.clipboard.clone() [INFO] [stdout] 423 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lino/highlight.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | -> (Sender<(HighlightingThreadMessage, Cursor)>, [INFO] [stdout] | ____________^ [INFO] [stdout] 40 | | Receiver<(std::vec::Vec<(syntect::highlighting::Style, usize)>, Cursor)> [INFO] [stdout] 41 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/highlight.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | self.cursor.clone())).unwrap_or(()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/highlight.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | if ranges.len() < 1 { return; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ranges.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/highlight.rs:100:29 [INFO] [stdout] | [INFO] [stdout] 100 | let cursor_backup = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lino/highlight.rs:170:12 [INFO] [stdout] | [INFO] [stdout] 170 | if !std::path::Path::new(self.file.path.as_str()).extension().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::path::Path::new(self.file.path.as_str()).extension().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/highlight.rs:173:28 [INFO] [stdout] | [INFO] [stdout] 173 | SyntectConfig::new(&file_ext) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `file_ext` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/render.rs:58:63 [INFO] [stdout] | [INFO] [stdout] 58 | if j == self.line_nums_frame.width - 1 && self.line_nums_frame.boundary_r != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.line_nums_frame.boundary_r.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:43:46 [INFO] [stdout] | [INFO] [stdout] 43 | self.selection.start_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:44:31 [INFO] [stdout] | [INFO] [stdout] 44 | self.cursor = cursor_backup.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor_backup` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:55:40 [INFO] [stdout] | [INFO] [stdout] 55 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lino/selection.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | if !sorted_selection_points.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sorted_selection_points.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `sorted_selection_points` after checking its variant with `is_none` [INFO] [stdout] --> src/lino/selection.rs:70:30 [INFO] [stdout] | [INFO] [stdout] 69 | if !sorted_selection_points.is_none() { [INFO] [stdout] | --------------------------------- the check is happening here [INFO] [stdout] 70 | self.selection = sorted_selection_points.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/lino/selection.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | if self.selection.is_selected == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.selection.is_selected` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:62:42 [INFO] [stdout] | [INFO] [stdout] 62 | self.selection.start_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:63:40 [INFO] [stdout] | [INFO] [stdout] 63 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:74:41 [INFO] [stdout] | [INFO] [stdout] 74 | self.is_cursor_greater_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:77:40 [INFO] [stdout] | [INFO] [stdout] 77 | self.is_cursor_lesser_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:80:41 [INFO] [stdout] | [INFO] [stdout] 80 | self.is_cursor_greater_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:83:40 [INFO] [stdout] | [INFO] [stdout] 83 | self.is_cursor_lesser_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:87:27 [INFO] [stdout] | [INFO] [stdout] 87 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:90:27 [INFO] [stdout] | [INFO] [stdout] 90 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:95:27 [INFO] [stdout] | [INFO] [stdout] 95 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:99:38 [INFO] [stdout] | [INFO] [stdout] 99 | self.selection.start_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:100:36 [INFO] [stdout] | [INFO] [stdout] 100 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/selection.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return None; [INFO] [stdout] 157 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:86:32 [INFO] [stdout] | [INFO] [stdout] 86 | character: num_string_with_boundary.get(j).unwrap_or(&' ').clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*num_string_with_boundary.get(j).unwrap_or(&' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:165:29 [INFO] [stdout] | [INFO] [stdout] 165 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:166:23 [INFO] [stdout] | [INFO] [stdout] 166 | self.cursor = selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:102:32 [INFO] [stdout] | [INFO] [stdout] 102 | character: num_string_with_boundary.get(j).unwrap_or(&' ').clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*num_string_with_boundary.get(j).unwrap_or(&' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:9:31 [INFO] [stdout] | [INFO] [stdout] 9 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:19:31 [INFO] [stdout] | [INFO] [stdout] 19 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:29:31 [INFO] [stdout] | [INFO] [stdout] 29 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:49:31 [INFO] [stdout] | [INFO] [stdout] 49 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:59:31 [INFO] [stdout] | [INFO] [stdout] 59 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:69:31 [INFO] [stdout] | [INFO] [stdout] 69 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:79:31 [INFO] [stdout] | [INFO] [stdout] 79 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:89:31 [INFO] [stdout] | [INFO] [stdout] 89 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:99:31 [INFO] [stdout] | [INFO] [stdout] 99 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:152:42 [INFO] [stdout] | [INFO] [stdout] 152 | ... start_point: instance.start.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `instance.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/render.rs:153:40 [INFO] [stdout] | [INFO] [stdout] 153 | ... end_point: instance.end.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `instance.end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:120:31 [INFO] [stdout] | [INFO] [stdout] 120 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:131:31 [INFO] [stdout] | [INFO] [stdout] 131 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/render.rs:164:25 [INFO] [stdout] | [INFO] [stdout] 164 | / if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 165 | | && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] 166 | | || (row == self.lines.len() - 1 && col < self.lines[row].len())) { [INFO] [stdout] 167 | | background = self.theming.text_frame_selection_bg; [INFO] [stdout] 168 | | foreground = self.theming.text_frame_selection_fg; [INFO] [stdout] 169 | | } [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] 163 ~ Some(selection) [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 165 | && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] 166 ~ || (row == self.lines.len() - 1 && col < self.lines[row].len())) => { [INFO] [stdout] 167 | background = self.theming.text_frame_selection_bg; [INFO] [stdout] 168 | foreground = self.theming.text_frame_selection_fg; [INFO] [stdout] 169 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/render.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | / match &sorted_selection_points { [INFO] [stdout] 163 | | Some(selection) => { [INFO] [stdout] 164 | | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 165 | | && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] ... | [INFO] [stdout] 171 | | _ => () [INFO] [stdout] 172 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Some(selection) = &sorted_selection_points { [INFO] [stdout] 163 + if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] 164 + && ((row < self.lines.len() - 1 && col <= self.lines[row].len()) [INFO] [stdout] 165 + || (row == self.lines.len() - 1 && col < self.lines[row].len())) { [INFO] [stdout] 166 + background = self.theming.text_frame_selection_bg; [INFO] [stdout] 167 + foreground = self.theming.text_frame_selection_fg; [INFO] [stdout] 168 + } [INFO] [stdout] 169 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:142:31 [INFO] [stdout] | [INFO] [stdout] 142 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/render.rs:164:60 [INFO] [stdout] | [INFO] [stdout] 164 | if self.is_cursor_inside_selection(&selection, &Cursor{row: row, col: col}) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/lino/render.rs:178:28 [INFO] [stdout] | [INFO] [stdout] 178 | width: width as u8, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `width` [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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:153:31 [INFO] [stdout] | [INFO] [stdout] 153 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:164:31 [INFO] [stdout] | [INFO] [stdout] 164 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:175:31 [INFO] [stdout] | [INFO] [stdout] 175 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:186:31 [INFO] [stdout] | [INFO] [stdout] 186 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:197:31 [INFO] [stdout] | [INFO] [stdout] 197 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:208:31 [INFO] [stdout] | [INFO] [stdout] 208 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lino/render.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 264 | / let status_string = if status_string.len() > self.term_width { [INFO] [stdout] 265 | | status_string[status_string.len()-self.term_width..].to_string() [INFO] [stdout] 266 | | } else { [INFO] [stdout] 267 | | status_string [INFO] [stdout] 268 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 269 | [INFO] [stdout] 270 | status_string [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 264 ~ [INFO] [stdout] 265 | [INFO] [stdout] 266 ~ if status_string.len() > self.term_width { [INFO] [stdout] 267 + status_string[status_string.len()-self.term_width..].to_string() [INFO] [stdout] 268 + } else { [INFO] [stdout] 269 + status_string [INFO] [stdout] 270 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/render.rs:257:16 [INFO] [stdout] | [INFO] [stdout] 257 | if self.file.path != "" { String::from(&self.file.path) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/render.rs:260:50 [INFO] [stdout] | [INFO] [stdout] 260 | file_name + if !self.file.is_saved { &"* - "} else { &" - "} [INFO] [stdout] | ^^^^^^^ help: change this to: `"* - "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/render.rs:260:66 [INFO] [stdout] | [INFO] [stdout] 260 | file_name + if !self.file.is_saved { &"* - "} else { &" - "} [INFO] [stdout] | ^^^^^^ help: change this to: `" - "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 233 ~ [INFO] [stdout] 234 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 235 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 236 | self.delete_selected(); [INFO] [stdout] 237 ~ "Selection deleted.".to_string() [INFO] [stdout] 238 | } else { [INFO] [stdout] 239 | self.perform_backspace(); [INFO] [stdout] 240 ~ "Previous character deleted.".to_string() [INFO] [stdout] 241 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:234:36 [INFO] [stdout] | [INFO] [stdout] 234 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:242:36 [INFO] [stdout] | [INFO] [stdout] 242 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 251 ~ [INFO] [stdout] 252 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 253 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 254 | self.delete_selected(); [INFO] [stdout] 255 ~ "Selection deleted.".to_string() [INFO] [stdout] 256 | } else { [INFO] [stdout] 257 | self.perform_delete(); [INFO] [stdout] 258 ~ "Next character deleted.".to_string() [INFO] [stdout] 259 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:252:36 [INFO] [stdout] | [INFO] [stdout] 252 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lino/render.rs:288:9 [INFO] [stdout] | [INFO] [stdout] 282 | / let status_string = if status_string.len() > self.term_width { [INFO] [stdout] 283 | | status_string[..self.term_width].to_string() [INFO] [stdout] 284 | | } else { [INFO] [stdout] 285 | | status_string [INFO] [stdout] 286 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 287 | [INFO] [stdout] 288 | status_string [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 282 ~ [INFO] [stdout] 283 | [INFO] [stdout] 284 ~ if status_string.len() > self.term_width { [INFO] [stdout] 285 + status_string[..self.term_width].to_string() [INFO] [stdout] 286 + } else { [INFO] [stdout] 287 + status_string [INFO] [stdout] 288 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:260:36 [INFO] [stdout] | [INFO] [stdout] 260 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/render.rs:274:37 [INFO] [stdout] | [INFO] [stdout] 274 | if !self.find.is_finding || self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 269 ~ [INFO] [stdout] 270 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 271 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 272 | self.delete_selected(); [INFO] [stdout] 273 ~ "Selection deleted.".to_string() [INFO] [stdout] 274 | } else { [INFO] [stdout] 275 | self.delete_left_by_word(); [INFO] [stdout] 276 ~ "Previous word deleted.".to_string() [INFO] [stdout] 277 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:270:36 [INFO] [stdout] | [INFO] [stdout] 270 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:278:36 [INFO] [stdout] | [INFO] [stdout] 278 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lino/render.rs:310:9 [INFO] [stdout] | [INFO] [stdout] 304 | / let task_feedback = if task_feedback.len() > self.term_width { [INFO] [stdout] 305 | | task_feedback[..self.term_width].to_string() [INFO] [stdout] 306 | | } else { [INFO] [stdout] 307 | | task_feedback [INFO] [stdout] 308 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 309 | [INFO] [stdout] 310 | task_feedback [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 304 ~ [INFO] [stdout] 305 | [INFO] [stdout] 306 ~ if task_feedback.len() > self.term_width { [INFO] [stdout] 307 + task_feedback[..self.term_width].to_string() [INFO] [stdout] 308 + } else { [INFO] [stdout] 309 + task_feedback [INFO] [stdout] 310 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/render.rs:298:32 [INFO] [stdout] | [INFO] [stdout] 298 | let task_feedback = if self.task_feedback.text == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.task_feedback.text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 287 ~ [INFO] [stdout] 288 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 289 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 290 | self.delete_selected(); [INFO] [stdout] 291 ~ "Selection deleted.".to_string() [INFO] [stdout] 292 | } else { [INFO] [stdout] 293 | self.delete_right_by_word(); [INFO] [stdout] 294 ~ "Next word deleted.".to_string() [INFO] [stdout] 295 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:288:36 [INFO] [stdout] | [INFO] [stdout] 288 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:296:36 [INFO] [stdout] | [INFO] [stdout] 296 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:305:9 [INFO] [stdout] | [INFO] [stdout] 305 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 305 ~ [INFO] [stdout] 306 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 307 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 308 | self.delete_selected(); [INFO] [stdout] 309 ~ "Selection deleted.".to_string() [INFO] [stdout] 310 | } else { [INFO] [stdout] 311 | self.delete_current_line(); [INFO] [stdout] 312 ~ "Line deleted.".to_string() [INFO] [stdout] 313 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:306:36 [INFO] [stdout] | [INFO] [stdout] 306 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:314:36 [INFO] [stdout] | [INFO] [stdout] 314 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/render.rs:341:20 [INFO] [stdout] | [INFO] [stdout] 341 | && same_styled_text.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!same_styled_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/commands.rs:470:12 [INFO] [stdout] | [INFO] [stdout] 470 | if self.undo_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.undo_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/commands.rs:479:12 [INFO] [stdout] | [INFO] [stdout] 479 | if self.redo_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.redo_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lino/util.rs:28:59 [INFO] [stdout] | [INFO] [stdout] 28 | pub(crate) fn convert_string_to_2d_text(input_string: &String) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 28 - pub(crate) fn convert_string_to_2d_text(input_string: &String) -> Vec> { [INFO] [stdout] 28 + pub(crate) fn convert_string_to_2d_text(input_string: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:536:12 [INFO] [stdout] | [INFO] [stdout] 536 | if self.file.save_error != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:538:19 [INFO] [stdout] | [INFO] [stdout] 538 | } else if self.file.save_error == "" && self.file.is_saved && was_file_not_saved_before { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/lino/util.rs:40:32 [INFO] [stdout] | [INFO] [stdout] 40 | character: character.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:546:12 [INFO] [stdout] | [INFO] [stdout] 546 | if self.file.save_error != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:548:19 [INFO] [stdout] | [INFO] [stdout] 548 | } else if self.file.save_error == "" && self.file.is_saved && was_file_not_saved_before { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/util.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return self.settings.tab_width - (self.cursor.col % self.settings.tab_width); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return self.settings.tab_width - (self.cursor.col % self.settings.tab_width); [INFO] [stdout] 56 + self.settings.tab_width - (self.cursor.col % self.settings.tab_width) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:554:12 [INFO] [stdout] | [INFO] [stdout] 554 | if self.file.save_error != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lino/file.rs:23:41 [INFO] [stdout] | [INFO] [stdout] 23 | let mut file = match File::open(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:33:20 [INFO] [stdout] | [INFO] [stdout] 33 | kbs.insert(format!("{}", UP), Lino::command_move_up); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `UP.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/file.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | / match file.read_to_string(&mut input_string) { [INFO] [stdout] 31 | | Err(why) => panic!("[ERROR] Couldn't read \"{}\": {}", display, why), [INFO] [stdout] 32 | | Ok(_) => (), [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ help: try: `if let Err(why) = file.read_to_string(&mut input_string) { panic!("[ERROR] Couldn't read \"{}\": {}", display, why) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | kbs.insert(format!("{}", DOWN), Lino::command_move_down); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DOWN.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/lino/keybindings.rs:35:20 [INFO] [stdout] | [INFO] [stdout] 35 | kbs.insert(format!("{}", LEFT), Lino::command_move_left); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `LEFT.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `file` after checking its variant with `is_err` [INFO] [stdout] --> src/lino/file.rs:59:91 [INFO] [stdout] | [INFO] [stdout] 58 | if file.is_err() { [INFO] [stdout] | ---------------- help: try: `if let Err() = file` [INFO] [stdout] 59 | self.file.save_error = format!("[ERROR] Couldn't create \"{}\": {}", display, file.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:36:20 [INFO] [stdout] | [INFO] [stdout] 36 | kbs.insert(format!("{}", RIGHT), Lino::command_move_right); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `RIGHT.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lino/file.rs:56:33 [INFO] [stdout] | [INFO] [stdout] 56 | let file = File::create(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/file.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / match file.write_all(output_string.as_bytes()) { [INFO] [stdout] 67 | | Err(why) => { [INFO] [stdout] 68 | | self.file.save_error = format!("[ERROR] Couldn't write to \"{}\": {}", display, why); [INFO] [stdout] 69 | | return; [INFO] [stdout] 70 | | }, [INFO] [stdout] 71 | | Ok(_) => (), [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Err(why) = file.write_all(output_string.as_bytes()) { [INFO] [stdout] 67 + self.file.save_error = format!("[ERROR] Couldn't write to \"{}\": {}", display, why); [INFO] [stdout] 68 + return; [INFO] [stdout] 69 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:39:20 [INFO] [stdout] | [INFO] [stdout] 39 | kbs.insert(format!("{}", PAGE_UP), Lino::command_move_up_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_UP.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/lino/keybindings.rs:40:20 [INFO] [stdout] | [INFO] [stdout] 40 | kbs.insert(format!("{}", PAGE_DOWN), Lino::command_move_down_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_DOWN.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/lino/keybindings.rs:41:20 [INFO] [stdout] | [INFO] [stdout] 41 | kbs.insert(format!("{}", HOME), Lino::command_move_to_line_start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `HOME.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/lino/keybindings.rs:42:20 [INFO] [stdout] | [INFO] [stdout] 42 | kbs.insert(format!("{}", END), Lino::command_move_to_line_end); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `END.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:9:24 [INFO] [stdout] | [INFO] [stdout] 9 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:37:23 [INFO] [stdout] | [INFO] [stdout] 37 | self.cursor = last_iteration.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | self.selection = last_iteration.selection.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | cursor: self.cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:51:24 [INFO] [stdout] | [INFO] [stdout] 51 | selection: self.selection.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:55:23 [INFO] [stdout] | [INFO] [stdout] 55 | self.cursor = last_iteration.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Selection` which implements the `Copy` trait [INFO] [stdout] --> src/lino/history.rs:56:26 [INFO] [stdout] | [INFO] [stdout] 56 | self.selection = last_iteration.selection.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_iteration.selection` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/selection.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | if self.lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | kbs.insert(format!("{}", BACKSPACE), Lino::command_delete_left_character); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `BACKSPACE.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: length comparison to zero [INFO] [stdout] --> src/lino/selection.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | if self.lines[self.selection.end_point.row].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.lines[self.selection.end_point.row].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | kbs.insert(format!("{}", DELETE), Lino::command_delete_right_character); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DELETE.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:35:42 [INFO] [stdout] | [INFO] [stdout] 35 | self.selection.start_point = previous_cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:40:37 [INFO] [stdout] | [INFO] [stdout] 40 | let cursor_backup = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:41:31 [INFO] [stdout] | [INFO] [stdout] 41 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:43:46 [INFO] [stdout] | [INFO] [stdout] 43 | self.selection.start_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:44:31 [INFO] [stdout] | [INFO] [stdout] 44 | self.cursor = cursor_backup.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor_backup` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:55:40 [INFO] [stdout] | [INFO] [stdout] 55 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lino/selection.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | if !sorted_selection_points.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sorted_selection_points.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `sorted_selection_points` after checking its variant with `is_none` [INFO] [stdout] --> src/lino/selection.rs:70:30 [INFO] [stdout] | [INFO] [stdout] 69 | if !sorted_selection_points.is_none() { [INFO] [stdout] | --------------------------------- the check is happening here [INFO] [stdout] 70 | self.selection = sorted_selection_points.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/lino/selection.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | if self.selection.is_selected == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.selection.is_selected` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:62:42 [INFO] [stdout] | [INFO] [stdout] 62 | self.selection.start_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:63:40 [INFO] [stdout] | [INFO] [stdout] 63 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:74:41 [INFO] [stdout] | [INFO] [stdout] 74 | self.is_cursor_greater_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:77:40 [INFO] [stdout] | [INFO] [stdout] 77 | self.is_cursor_lesser_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:80:41 [INFO] [stdout] | [INFO] [stdout] 80 | self.is_cursor_greater_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lino/selection.rs:83:40 [INFO] [stdout] | [INFO] [stdout] 83 | self.is_cursor_lesser_than(&previous_cursor) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `previous_cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:87:27 [INFO] [stdout] | [INFO] [stdout] 87 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:90:27 [INFO] [stdout] | [INFO] [stdout] 90 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:95:27 [INFO] [stdout] | [INFO] [stdout] 95 | self.cursor = self.selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:99:38 [INFO] [stdout] | [INFO] [stdout] 99 | self.selection.start_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:100:36 [INFO] [stdout] | [INFO] [stdout] 100 | self.selection.end_point = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lino/selection.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return None; [INFO] [stdout] 157 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | kbs.insert(format!("{}", CHAR_INPUT), Lino::command_enter_character); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `CHAR_INPUT.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/lino/keybindings.rs:81:20 [INFO] [stdout] | [INFO] [stdout] 81 | kbs.insert(format!("{}", TAB), Lino::command_enter_tab); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `TAB.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/lino/keybindings.rs:83:20 [INFO] [stdout] | [INFO] [stdout] 83 | kbs.insert(format!("{}", ENTER), Lino::command_enter_auto_indented_new_line); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ENTER.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:165:29 [INFO] [stdout] | [INFO] [stdout] 165 | let backup_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/selection.rs:166:23 [INFO] [stdout] | [INFO] [stdout] 166 | self.cursor = selection.start_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `selection.start_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:9:31 [INFO] [stdout] | [INFO] [stdout] 9 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:19:31 [INFO] [stdout] | [INFO] [stdout] 19 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:29:31 [INFO] [stdout] | [INFO] [stdout] 29 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:49:31 [INFO] [stdout] | [INFO] [stdout] 49 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:59:31 [INFO] [stdout] | [INFO] [stdout] 59 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:69:31 [INFO] [stdout] | [INFO] [stdout] 69 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | kbs.insert(format!("{}", ESC), Lino::command_escape); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ESC.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:79:31 [INFO] [stdout] | [INFO] [stdout] 79 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:89:31 [INFO] [stdout] | [INFO] [stdout] 89 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:106:20 [INFO] [stdout] | [INFO] [stdout] 106 | kbs.insert(format!("{}", UP), Lino::command_move_up); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `UP.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:99:31 [INFO] [stdout] | [INFO] [stdout] 99 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:107:20 [INFO] [stdout] | [INFO] [stdout] 107 | kbs.insert(format!("{}", DOWN), Lino::command_move_down); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DOWN.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:108:20 [INFO] [stdout] | [INFO] [stdout] 108 | kbs.insert(format!("{}", LEFT), Lino::command_move_left); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `LEFT.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:120:31 [INFO] [stdout] | [INFO] [stdout] 120 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:109:20 [INFO] [stdout] | [INFO] [stdout] 109 | kbs.insert(format!("{}", RIGHT), Lino::command_move_right); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `RIGHT.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:131:31 [INFO] [stdout] | [INFO] [stdout] 131 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:142:31 [INFO] [stdout] | [INFO] [stdout] 142 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:112:20 [INFO] [stdout] | [INFO] [stdout] 112 | kbs.insert(format!("{}", PAGE_UP), Lino::command_move_up_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_UP.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:153:31 [INFO] [stdout] | [INFO] [stdout] 153 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:113:20 [INFO] [stdout] | [INFO] [stdout] 113 | kbs.insert(format!("{}", PAGE_DOWN), Lino::command_move_down_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_DOWN.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/lino/keybindings.rs:114:20 [INFO] [stdout] | [INFO] [stdout] 114 | kbs.insert(format!("{}", HOME), Lino::command_move_to_line_start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `HOME.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:164:31 [INFO] [stdout] | [INFO] [stdout] 164 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:115:20 [INFO] [stdout] | [INFO] [stdout] 115 | kbs.insert(format!("{}", END), Lino::command_move_to_line_end); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `END.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:175:31 [INFO] [stdout] | [INFO] [stdout] 175 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:186:31 [INFO] [stdout] | [INFO] [stdout] 186 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:197:31 [INFO] [stdout] | [INFO] [stdout] 197 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/commands.rs:208:31 [INFO] [stdout] | [INFO] [stdout] 208 | let previous_cursor = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 233 ~ [INFO] [stdout] 234 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 235 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 236 | self.delete_selected(); [INFO] [stdout] 237 ~ "Selection deleted.".to_string() [INFO] [stdout] 238 | } else { [INFO] [stdout] 239 | self.perform_backspace(); [INFO] [stdout] 240 ~ "Previous character deleted.".to_string() [INFO] [stdout] 241 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:234:36 [INFO] [stdout] | [INFO] [stdout] 234 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:242:36 [INFO] [stdout] | [INFO] [stdout] 242 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 251 ~ [INFO] [stdout] 252 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 253 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 254 | self.delete_selected(); [INFO] [stdout] 255 ~ "Selection deleted.".to_string() [INFO] [stdout] 256 | } else { [INFO] [stdout] 257 | self.perform_delete(); [INFO] [stdout] 258 ~ "Next character deleted.".to_string() [INFO] [stdout] 259 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:252:36 [INFO] [stdout] | [INFO] [stdout] 252 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:260:36 [INFO] [stdout] | [INFO] [stdout] 260 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 269 ~ [INFO] [stdout] 270 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 271 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 272 | self.delete_selected(); [INFO] [stdout] 273 ~ "Selection deleted.".to_string() [INFO] [stdout] 274 | } else { [INFO] [stdout] 275 | self.delete_left_by_word(); [INFO] [stdout] 276 ~ "Previous word deleted.".to_string() [INFO] [stdout] 277 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:270:36 [INFO] [stdout] | [INFO] [stdout] 270 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:278:36 [INFO] [stdout] | [INFO] [stdout] 278 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:135:20 [INFO] [stdout] | [INFO] [stdout] 135 | kbs.insert(format!("{}", ESC), Lino::command_escape); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ESC.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/lino/keybindings.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | kbs.insert(format!("{}", DOWN), Lino::command_select_next_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DOWN.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: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 287 ~ [INFO] [stdout] 288 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 289 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 290 | self.delete_selected(); [INFO] [stdout] 291 ~ "Selection deleted.".to_string() [INFO] [stdout] 292 | } else { [INFO] [stdout] 293 | self.delete_right_by_word(); [INFO] [stdout] 294 ~ "Next word deleted.".to_string() [INFO] [stdout] 295 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | kbs.insert(format!("{}", UP), Lino::command_select_previous_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `UP.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/lino/keybindings.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | kbs.insert(format!("{}", RIGHT), Lino::command_select_next_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `RIGHT.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-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:288:36 [INFO] [stdout] | [INFO] [stdout] 288 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:296:36 [INFO] [stdout] | [INFO] [stdout] 296 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:144:20 [INFO] [stdout] | [INFO] [stdout] 144 | kbs.insert(format!("{}", LEFT), Lino::command_select_previous_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `LEFT.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: unneeded late initialization [INFO] [stdout] --> src/lino/commands.rs:305:9 [INFO] [stdout] | [INFO] [stdout] 305 | let task_feedback_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `task_feedback_text` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 305 ~ [INFO] [stdout] 306 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] 307 ~ let task_feedback_text: String = if self.selection.is_selected { [INFO] [stdout] 308 | self.delete_selected(); [INFO] [stdout] 309 ~ "Selection deleted.".to_string() [INFO] [stdout] 310 | } else { [INFO] [stdout] 311 | self.delete_current_line(); [INFO] [stdout] 312 ~ "Line deleted.".to_string() [INFO] [stdout] 313 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:148:20 [INFO] [stdout] | [INFO] [stdout] 148 | kbs.insert(format!("{}", ENTER), Lino::command_exit_find_mode); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ENTER.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/lino/keybindings.rs:149:20 [INFO] [stdout] | [INFO] [stdout] 149 | kbs.insert(format!("{}", ESC), Lino::command_escape); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ESC.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-then-else expression returns a bool literal [INFO] [stdout] --> src/lino/commands.rs:306:36 [INFO] [stdout] | [INFO] [stdout] 306 | let should_show_feedback = if !self.is_document_empty() { true } else { false }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!self.is_document_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:314:36 [INFO] [stdout] | [INFO] [stdout] 314 | if should_show_feedback && task_feedback_text != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_feedback_text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/lino/frames.rs:34:80 [INFO] [stdout] | [INFO] [stdout] 34 | if self.text_frame.start_col > 0 && self.line_nums_frame.boundary_r != String::from("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/lino/frames.rs:37:88 [INFO] [stdout] | [INFO] [stdout] 37 | } else if self.text_frame.start_col == 0 && self.line_nums_frame.boundary_r != String::from(" ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `" "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/commands.rs:470:12 [INFO] [stdout] | [INFO] [stdout] 470 | if self.undo_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.undo_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/commands.rs:479:12 [INFO] [stdout] | [INFO] [stdout] 479 | if self.redo_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.redo_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:536:12 [INFO] [stdout] | [INFO] [stdout] 536 | if self.file.save_error != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:538:19 [INFO] [stdout] | [INFO] [stdout] 538 | } else if self.file.save_error == "" && self.file.is_saved && was_file_not_saved_before { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:546:12 [INFO] [stdout] | [INFO] [stdout] 546 | if self.file.save_error != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/exit.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / match prompt_result { [INFO] [stdout] 30 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 31 | | Ok(_) => () [INFO] [stdout] 32 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:548:19 [INFO] [stdout] | [INFO] [stdout] 548 | } else if self.file.save_error == "" && self.file.is_saved && was_file_not_saved_before { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/commands.rs:554:12 [INFO] [stdout] | [INFO] [stdout] 554 | if self.file.save_error != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/lino/save.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / if current_text != self.saved_text { [INFO] [stdout] 10 | | self.file.is_saved = false; [INFO] [stdout] 11 | | } else { [INFO] [stdout] 12 | | self.file.is_saved = true; [INFO] [stdout] 13 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.file.is_saved = current_text == self.saved_text;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/save.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if self.file.path == "" || self.file.should_save_as { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/save.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / match prompt_result { [INFO] [stdout] 51 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 52 | | Ok(_) => () [INFO] [stdout] 53 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/save.rs:64:16 [INFO] [stdout] | [INFO] [stdout] 64 | if self.file.path != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:33:20 [INFO] [stdout] | [INFO] [stdout] 33 | kbs.insert(format!("{}", UP), Lino::command_move_up); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `UP.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: comparison to empty slice [INFO] [stdout] --> src/lino/save.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | if self.file.is_saved && self.file.save_error == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | kbs.insert(format!("{}", DOWN), Lino::command_move_down); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DOWN.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/lino/keybindings.rs:35:20 [INFO] [stdout] | [INFO] [stdout] 35 | kbs.insert(format!("{}", LEFT), Lino::command_move_left); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `LEFT.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/lino/find.rs:12:38 [INFO] [stdout] | [INFO] [stdout] 12 | self.keybindings.remove(&format!("{}", keys::ENTER)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ENTER.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/lino/keybindings.rs:36:20 [INFO] [stdout] | [INFO] [stdout] 36 | kbs.insert(format!("{}", RIGHT), Lino::command_move_right); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `RIGHT.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/find.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | / match prompt_result { [INFO] [stdout] 32 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 33 | | Ok(_) => () [INFO] [stdout] 34 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:39:20 [INFO] [stdout] | [INFO] [stdout] 39 | kbs.insert(format!("{}", PAGE_UP), Lino::command_move_up_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_UP.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: comparison to empty slice [INFO] [stdout] --> src/lino/find.rs:44:16 [INFO] [stdout] | [INFO] [stdout] 44 | if self.find.find_string != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.find.find_string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:40:20 [INFO] [stdout] | [INFO] [stdout] 40 | kbs.insert(format!("{}", PAGE_DOWN), Lino::command_move_down_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_DOWN.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: length comparison to zero [INFO] [stdout] --> src/lino/find.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | if self.find.found_instances.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:41:20 [INFO] [stdout] | [INFO] [stdout] 41 | kbs.insert(format!("{}", HOME), Lino::command_move_to_line_start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `HOME.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/lino/keybindings.rs:42:20 [INFO] [stdout] | [INFO] [stdout] 42 | kbs.insert(format!("{}", END), Lino::command_move_to_line_end); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `END.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: length comparison to one [INFO] [stdout] --> src/lino/find.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/find.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | self.find.found_instances[self.find.selected_instance_index].start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | self.find.found_instances[self.find.selected_instance_index].end.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:105:23 [INFO] [stdout] | [INFO] [stdout] 105 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/find.rs:111:12 [INFO] [stdout] | [INFO] [stdout] 111 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | self.find.found_instances[self.find.selected_instance_index].start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | kbs.insert(format!("{}", BACKSPACE), Lino::command_delete_left_character); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `BACKSPACE.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: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | self.find.found_instances[self.find.selected_instance_index].end.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:127:23 [INFO] [stdout] | [INFO] [stdout] 127 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | kbs.insert(format!("{}", DELETE), Lino::command_delete_right_character); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DELETE.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/replace.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / match prompt_result { [INFO] [stdout] 23 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 24 | | Ok(_) => () [INFO] [stdout] 25 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/replace.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/guide.rs:149:43 [INFO] [stdout] | [INFO] [stdout] 149 | new_editor.keybindings.insert(format!("{}", keys::ESC), Lino::command_quit); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ESC.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/lino/keybindings.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | kbs.insert(format!("{}", CHAR_INPUT), Lino::command_enter_character); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `CHAR_INPUT.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/lino/keybindings.rs:81:20 [INFO] [stdout] | [INFO] [stdout] 81 | kbs.insert(format!("{}", TAB), Lino::command_enter_tab); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `TAB.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/lino/keybindings.rs:83:20 [INFO] [stdout] | [INFO] [stdout] 83 | kbs.insert(format!("{}", ENTER), Lino::command_enter_auto_indented_new_line); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ENTER.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 boolean expression can be simplified [INFO] [stdout] --> src/lino/input_prompt/handle.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | if !render_res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `render_res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | kbs.insert(format!("{}", ESC), Lino::command_escape); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ESC.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/input_prompt/handle.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | / match event.unwrap() { // read is a blocking call [INFO] [stdout] 22 | | crossterm::event::Event::Key(key_event) => { [INFO] [stdout] 23 | | match key_event.code { [INFO] [stdout] 24 | | crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] ... | [INFO] [stdout] 66 | | _ => () [INFO] [stdout] 67 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 21 ~ if let crossterm::event::Event::Key(key_event) = event.unwrap() { [INFO] [stdout] 22 + match key_event.code { [INFO] [stdout] 23 + crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] 24 + self.input.insert(self.cursor_col_offset, c); [INFO] [stdout] 25 + self.cursor_col_offset += 1; [INFO] [stdout] 26 + }, [INFO] [stdout] 27 + crossterm::event::KeyCode::Backspace => { [INFO] [stdout] 28 + if self.input.len() > 0 && self.cursor_col_offset > 0 { [INFO] [stdout] 29 + self.cursor_col_offset -= 1; [INFO] [stdout] 30 + self.input.remove(self.cursor_col_offset); [INFO] [stdout] 31 + } [INFO] [stdout] 32 + }, [INFO] [stdout] 33 + crossterm::event::KeyCode::Delete => { [INFO] [stdout] 34 + if self.input.len() > 0 [INFO] [stdout] 35 + && self.cursor_col_offset < self.input.len() { [INFO] [stdout] 36 + self.input.remove(self.cursor_col_offset); [INFO] [stdout] 37 + } [INFO] [stdout] 38 + }, [INFO] [stdout] 39 + crossterm::event::KeyCode::Left => { [INFO] [stdout] 40 + if self.cursor_col_offset > 0 { [INFO] [stdout] 41 + self.cursor_col_offset -= 1; [INFO] [stdout] 42 + } [INFO] [stdout] 43 + }, [INFO] [stdout] 44 + crossterm::event::KeyCode::Right => { [INFO] [stdout] 45 + if self.cursor_col_offset < self.input.len() { [INFO] [stdout] 46 + self.cursor_col_offset += 1; [INFO] [stdout] 47 + } [INFO] [stdout] 48 + }, [INFO] [stdout] 49 + crossterm::event::KeyCode::Home => { [INFO] [stdout] 50 + self.cursor_col_offset = 0; [INFO] [stdout] 51 + }, [INFO] [stdout] 52 + crossterm::event::KeyCode::End => { [INFO] [stdout] 53 + self.cursor_col_offset = self.input.len(); [INFO] [stdout] 54 + }, [INFO] [stdout] 55 + crossterm::event::KeyCode::Enter => { [INFO] [stdout] 56 + break; [INFO] [stdout] 57 + }, [INFO] [stdout] 58 + crossterm::event::KeyCode::Esc => { [INFO] [stdout] 59 + self.is_active = false; [INFO] [stdout] 60 + break; [INFO] [stdout] 61 + }, [INFO] [stdout] 62 + _ => () [INFO] [stdout] 63 + } [INFO] [stdout] 64 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:106:20 [INFO] [stdout] | [INFO] [stdout] 106 | kbs.insert(format!("{}", UP), Lino::command_move_up); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `UP.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/lino/input_prompt/handle.rs:29:29 [INFO] [stdout] | [INFO] [stdout] 29 | / ... if self.input.len() > 0 && self.cursor_col_offset > 0 { [INFO] [stdout] 30 | | ... self.cursor_col_offset -= 1; [INFO] [stdout] 31 | | ... self.input.remove(self.cursor_col_offset); [INFO] [stdout] 32 | | ... } [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] 28 ~ crossterm::event::KeyCode::Backspace [INFO] [stdout] 29 ~ if self.input.len() > 0 && self.cursor_col_offset > 0 => { [INFO] [stdout] 30 | self.cursor_col_offset -= 1; [INFO] [stdout] 31 | self.input.remove(self.cursor_col_offset); [INFO] [stdout] 32 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:107:20 [INFO] [stdout] | [INFO] [stdout] 107 | kbs.insert(format!("{}", DOWN), Lino::command_move_down); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DOWN.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/lino/keybindings.rs:108:20 [INFO] [stdout] | [INFO] [stdout] 108 | kbs.insert(format!("{}", LEFT), Lino::command_move_left); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `LEFT.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/lino/input_prompt/handle.rs:35:29 [INFO] [stdout] | [INFO] [stdout] 35 | / ... if self.input.len() > 0 [INFO] [stdout] 36 | | ... && self.cursor_col_offset < self.input.len() { [INFO] [stdout] 37 | | ... self.input.remove(self.cursor_col_offset); [INFO] [stdout] 38 | | ... } [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] 34 ~ crossterm::event::KeyCode::Delete [INFO] [stdout] 35 | if self.input.len() > 0 [INFO] [stdout] 36 ~ && self.cursor_col_offset < self.input.len() => { [INFO] [stdout] 37 | self.input.remove(self.cursor_col_offset); [INFO] [stdout] 38 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:109:20 [INFO] [stdout] | [INFO] [stdout] 109 | kbs.insert(format!("{}", RIGHT), Lino::command_move_right); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `RIGHT.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/lino/keybindings.rs:112:20 [INFO] [stdout] | [INFO] [stdout] 112 | kbs.insert(format!("{}", PAGE_UP), Lino::command_move_up_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_UP.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/lino/input_prompt/handle.rs:41:29 [INFO] [stdout] | [INFO] [stdout] 41 | / ... if self.cursor_col_offset > 0 { [INFO] [stdout] 42 | | ... self.cursor_col_offset -= 1; [INFO] [stdout] 43 | | ... } [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] 40 ~ crossterm::event::KeyCode::Left [INFO] [stdout] 41 ~ if self.cursor_col_offset > 0 => { [INFO] [stdout] 42 | self.cursor_col_offset -= 1; [INFO] [stdout] 43 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/input_prompt/handle.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | / ... if self.cursor_col_offset < self.input.len() { [INFO] [stdout] 47 | | ... self.cursor_col_offset += 1; [INFO] [stdout] 48 | | ... } [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] 45 ~ crossterm::event::KeyCode::Right [INFO] [stdout] 46 ~ if self.cursor_col_offset < self.input.len() => { [INFO] [stdout] 47 | self.cursor_col_offset += 1; [INFO] [stdout] 48 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/input_prompt/handle.rs:29:32 [INFO] [stdout] | [INFO] [stdout] 29 | ... if self.input.len() > 0 && self.cursor_col_offset > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/input_prompt/handle.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | ... if self.input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:113:20 [INFO] [stdout] | [INFO] [stdout] 113 | kbs.insert(format!("{}", PAGE_DOWN), Lino::command_move_down_by_page); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `PAGE_DOWN.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/lino/keybindings.rs:114:20 [INFO] [stdout] | [INFO] [stdout] 114 | kbs.insert(format!("{}", HOME), Lino::command_move_to_line_start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `HOME.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/lino/keybindings.rs:115:20 [INFO] [stdout] | [INFO] [stdout] 115 | kbs.insert(format!("{}", END), Lino::command_move_to_line_end); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `END.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 boolean expression can be simplified [INFO] [stdout] --> src/lino/confirmation_prompt/handle.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if !render_res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `render_res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/confirmation_prompt/handle.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | / match event.unwrap() { // read is a blocking call [INFO] [stdout] 23 | | crossterm::event::Event::Key(key_event) => { [INFO] [stdout] 24 | | match key_event.code { [INFO] [stdout] 25 | | crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] ... | [INFO] [stdout] 42 | | _ => () [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 22 ~ if let crossterm::event::Event::Key(key_event) = event.unwrap() { [INFO] [stdout] 23 + match key_event.code { [INFO] [stdout] 24 + crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] 25 + if c == 'y' || c == 'Y' { [INFO] [stdout] 26 + self.input = Some(true); [INFO] [stdout] 27 + break; [INFO] [stdout] 28 + } [INFO] [stdout] 29 + if c == 'n' || c == 'N' { [INFO] [stdout] 30 + self.input = Some(false); [INFO] [stdout] 31 + break; [INFO] [stdout] 32 + } [INFO] [stdout] 33 + }, [INFO] [stdout] 34 + crossterm::event::KeyCode::Esc => { [INFO] [stdout] 35 + self.input = None; [INFO] [stdout] 36 + break; [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => () [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/keybindings.rs:135:20 [INFO] [stdout] | [INFO] [stdout] 135 | kbs.insert(format!("{}", ESC), Lino::command_escape); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ESC.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/lino/keybindings.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | kbs.insert(format!("{}", DOWN), Lino::command_select_next_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `DOWN.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/lino/keybindings.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | kbs.insert(format!("{}", UP), Lino::command_select_previous_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `UP.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/lino/keybindings.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | kbs.insert(format!("{}", RIGHT), Lino::command_select_next_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `RIGHT.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/lino/keybindings.rs:144:20 [INFO] [stdout] | [INFO] [stdout] 144 | kbs.insert(format!("{}", LEFT), Lino::command_select_previous_found_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `LEFT.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/lino/keybindings.rs:148:20 [INFO] [stdout] | [INFO] [stdout] 148 | kbs.insert(format!("{}", ENTER), Lino::command_exit_find_mode); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ENTER.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/lino/keybindings.rs:149:20 [INFO] [stdout] | [INFO] [stdout] 149 | kbs.insert(format!("{}", ESC), Lino::command_escape); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `ESC.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 creates an owned instance just for comparison [INFO] [stdout] --> src/lino/frames.rs:34:80 [INFO] [stdout] | [INFO] [stdout] 34 | if self.text_frame.start_col > 0 && self.line_nums_frame.boundary_r != String::from("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/lino/frames.rs:37:88 [INFO] [stdout] | [INFO] [stdout] 37 | } else if self.text_frame.start_col == 0 && self.line_nums_frame.boundary_r != String::from(" ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `" "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/exit.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / match prompt_result { [INFO] [stdout] 30 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 31 | | Ok(_) => () [INFO] [stdout] 32 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/lino/save.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / if current_text != self.saved_text { [INFO] [stdout] 10 | | self.file.is_saved = false; [INFO] [stdout] 11 | | } else { [INFO] [stdout] 12 | | self.file.is_saved = true; [INFO] [stdout] 13 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.file.is_saved = current_text == self.saved_text;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/save.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if self.file.path == "" || self.file.should_save_as { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/save.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / match prompt_result { [INFO] [stdout] 51 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 52 | | Ok(_) => () [INFO] [stdout] 53 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/save.rs:64:16 [INFO] [stdout] | [INFO] [stdout] 64 | if self.file.path != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.file.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/save.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | if self.file.is_saved && self.file.save_error == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.file.save_error.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/find.rs:12:38 [INFO] [stdout] | [INFO] [stdout] 12 | self.keybindings.remove(&format!("{}", keys::ENTER)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ENTER.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/find.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | / match prompt_result { [INFO] [stdout] 32 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 33 | | Ok(_) => () [INFO] [stdout] 34 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lino/find.rs:44:16 [INFO] [stdout] | [INFO] [stdout] 44 | if self.find.find_string != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.find.find_string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/find.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | if self.find.found_instances.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/find.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/find.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | self.find.found_instances[self.find.selected_instance_index].start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | self.find.found_instances[self.find.selected_instance_index].end.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:105:23 [INFO] [stdout] | [INFO] [stdout] 105 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/find.rs:111:12 [INFO] [stdout] | [INFO] [stdout] 111 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | self.find.found_instances[self.find.selected_instance_index].start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | self.find.found_instances[self.find.selected_instance_index].end.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.find.found_instances[self.find.selected_instance_index].end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cursor` which implements the `Copy` trait [INFO] [stdout] --> src/lino/find.rs:127:23 [INFO] [stdout] | [INFO] [stdout] 127 | self.cursor = self.selection.end_point.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.selection.end_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/replace.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / match prompt_result { [INFO] [stdout] 23 | | Err(e) => self.panic_gracefully(&e), [INFO] [stdout] 24 | | Ok(_) => () [INFO] [stdout] 25 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = prompt_result { self.panic_gracefully(&e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/lino/replace.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if self.find.found_instances.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.find.found_instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lino/guide.rs:149:43 [INFO] [stdout] | [INFO] [stdout] 149 | new_editor.keybindings.insert(format!("{}", keys::ESC), Lino::command_quit); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `keys::ESC.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 boolean expression can be simplified [INFO] [stdout] --> src/lino/input_prompt/handle.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | if !render_res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `render_res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/input_prompt/handle.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | / match event.unwrap() { // read is a blocking call [INFO] [stdout] 22 | | crossterm::event::Event::Key(key_event) => { [INFO] [stdout] 23 | | match key_event.code { [INFO] [stdout] 24 | | crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] ... | [INFO] [stdout] 66 | | _ => () [INFO] [stdout] 67 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 21 ~ if let crossterm::event::Event::Key(key_event) = event.unwrap() { [INFO] [stdout] 22 + match key_event.code { [INFO] [stdout] 23 + crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] 24 + self.input.insert(self.cursor_col_offset, c); [INFO] [stdout] 25 + self.cursor_col_offset += 1; [INFO] [stdout] 26 + }, [INFO] [stdout] 27 + crossterm::event::KeyCode::Backspace => { [INFO] [stdout] 28 + if self.input.len() > 0 && self.cursor_col_offset > 0 { [INFO] [stdout] 29 + self.cursor_col_offset -= 1; [INFO] [stdout] 30 + self.input.remove(self.cursor_col_offset); [INFO] [stdout] 31 + } [INFO] [stdout] 32 + }, [INFO] [stdout] 33 + crossterm::event::KeyCode::Delete => { [INFO] [stdout] 34 + if self.input.len() > 0 [INFO] [stdout] 35 + && self.cursor_col_offset < self.input.len() { [INFO] [stdout] 36 + self.input.remove(self.cursor_col_offset); [INFO] [stdout] 37 + } [INFO] [stdout] 38 + }, [INFO] [stdout] 39 + crossterm::event::KeyCode::Left => { [INFO] [stdout] 40 + if self.cursor_col_offset > 0 { [INFO] [stdout] 41 + self.cursor_col_offset -= 1; [INFO] [stdout] 42 + } [INFO] [stdout] 43 + }, [INFO] [stdout] 44 + crossterm::event::KeyCode::Right => { [INFO] [stdout] 45 + if self.cursor_col_offset < self.input.len() { [INFO] [stdout] 46 + self.cursor_col_offset += 1; [INFO] [stdout] 47 + } [INFO] [stdout] 48 + }, [INFO] [stdout] 49 + crossterm::event::KeyCode::Home => { [INFO] [stdout] 50 + self.cursor_col_offset = 0; [INFO] [stdout] 51 + }, [INFO] [stdout] 52 + crossterm::event::KeyCode::End => { [INFO] [stdout] 53 + self.cursor_col_offset = self.input.len(); [INFO] [stdout] 54 + }, [INFO] [stdout] 55 + crossterm::event::KeyCode::Enter => { [INFO] [stdout] 56 + break; [INFO] [stdout] 57 + }, [INFO] [stdout] 58 + crossterm::event::KeyCode::Esc => { [INFO] [stdout] 59 + self.is_active = false; [INFO] [stdout] 60 + break; [INFO] [stdout] 61 + }, [INFO] [stdout] 62 + _ => () [INFO] [stdout] 63 + } [INFO] [stdout] 64 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/input_prompt/handle.rs:29:29 [INFO] [stdout] | [INFO] [stdout] 29 | / ... if self.input.len() > 0 && self.cursor_col_offset > 0 { [INFO] [stdout] 30 | | ... self.cursor_col_offset -= 1; [INFO] [stdout] 31 | | ... self.input.remove(self.cursor_col_offset); [INFO] [stdout] 32 | | ... } [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] 28 ~ crossterm::event::KeyCode::Backspace [INFO] [stdout] 29 ~ if self.input.len() > 0 && self.cursor_col_offset > 0 => { [INFO] [stdout] 30 | self.cursor_col_offset -= 1; [INFO] [stdout] 31 | self.input.remove(self.cursor_col_offset); [INFO] [stdout] 32 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/input_prompt/handle.rs:35:29 [INFO] [stdout] | [INFO] [stdout] 35 | / ... if self.input.len() > 0 [INFO] [stdout] 36 | | ... && self.cursor_col_offset < self.input.len() { [INFO] [stdout] 37 | | ... self.input.remove(self.cursor_col_offset); [INFO] [stdout] 38 | | ... } [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] 34 ~ crossterm::event::KeyCode::Delete [INFO] [stdout] 35 | if self.input.len() > 0 [INFO] [stdout] 36 ~ && self.cursor_col_offset < self.input.len() => { [INFO] [stdout] 37 | self.input.remove(self.cursor_col_offset); [INFO] [stdout] 38 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/input_prompt/handle.rs:41:29 [INFO] [stdout] | [INFO] [stdout] 41 | / ... if self.cursor_col_offset > 0 { [INFO] [stdout] 42 | | ... self.cursor_col_offset -= 1; [INFO] [stdout] 43 | | ... } [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] 40 ~ crossterm::event::KeyCode::Left [INFO] [stdout] 41 ~ if self.cursor_col_offset > 0 => { [INFO] [stdout] 42 | self.cursor_col_offset -= 1; [INFO] [stdout] 43 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lino/input_prompt/handle.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | / ... if self.cursor_col_offset < self.input.len() { [INFO] [stdout] 47 | | ... self.cursor_col_offset += 1; [INFO] [stdout] 48 | | ... } [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] 45 ~ crossterm::event::KeyCode::Right [INFO] [stdout] 46 ~ if self.cursor_col_offset < self.input.len() => { [INFO] [stdout] 47 | self.cursor_col_offset += 1; [INFO] [stdout] 48 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/input_prompt/handle.rs:29:32 [INFO] [stdout] | [INFO] [stdout] 29 | ... if self.input.len() > 0 && self.cursor_col_offset > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lino/input_prompt/handle.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | ... if self.input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lino/confirmation_prompt/handle.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if !render_res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `render_res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lino/confirmation_prompt/handle.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | / match event.unwrap() { // read is a blocking call [INFO] [stdout] 23 | | crossterm::event::Event::Key(key_event) => { [INFO] [stdout] 24 | | match key_event.code { [INFO] [stdout] 25 | | crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] ... | [INFO] [stdout] 42 | | _ => () [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 22 ~ if let crossterm::event::Event::Key(key_event) = event.unwrap() { [INFO] [stdout] 23 + match key_event.code { [INFO] [stdout] 24 + crossterm::event::KeyCode::Char(c) => { [INFO] [stdout] 25 + if c == 'y' || c == 'Y' { [INFO] [stdout] 26 + self.input = Some(true); [INFO] [stdout] 27 + break; [INFO] [stdout] 28 + } [INFO] [stdout] 29 + if c == 'n' || c == 'N' { [INFO] [stdout] 30 + self.input = Some(false); [INFO] [stdout] 31 + break; [INFO] [stdout] 32 + } [INFO] [stdout] 33 + }, [INFO] [stdout] 34 + crossterm::event::KeyCode::Esc => { [INFO] [stdout] 35 + self.input = None; [INFO] [stdout] 36 + break; [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => () [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 22.41s [INFO] running `Command { std: "docker" "inspect" "ca012ea49230a711856b02d819e8ebe47ae45e013c55d06a8a6b78177b257e13", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ca012ea49230a711856b02d819e8ebe47ae45e013c55d06a8a6b78177b257e13", kill_on_drop: false }` [INFO] [stdout] ca012ea49230a711856b02d819e8ebe47ae45e013c55d06a8a6b78177b257e13