[INFO] cloning repository https://github.com/davazp/rile [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/davazp/rile" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdavazp%2Frile", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdavazp%2Frile'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0d32db679b770238e00d6447c85c099ff77220b7 [INFO] linting davazp/rile against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdavazp%2Frile" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-6-tc1/source/.cargo/config [INFO] started tweaking git repo https://github.com/davazp/rile [INFO] finished tweaking git repo https://github.com/davazp/rile [INFO] tweaked toml for git repo https://github.com/davazp/rile written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/davazp/rile on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/davazp/rile 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 nix v0.16.0 [INFO] [stderr] Downloaded signal-hook v0.1.12 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 0f2d3d5259c8a5f84aae90fbe281ccef9191eb08c207b737dbb1a308b04b85d8 [INFO] running `Command { std: "docker" "start" "-a" "0f2d3d5259c8a5f84aae90fbe281ccef9191eb08c207b737dbb1a308b04b85d8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0f2d3d5259c8a5f84aae90fbe281ccef9191eb08c207b737dbb1a308b04b85d8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0f2d3d5259c8a5f84aae90fbe281ccef9191eb08c207b737dbb1a308b04b85d8", kill_on_drop: false }` [INFO] [stdout] 0f2d3d5259c8a5f84aae90fbe281ccef9191eb08c207b737dbb1a308b04b85d8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] c0888a169d301e5c1bd111af05e422dbec06424e40c9417146d524bdc9772d56 [INFO] running `Command { std: "docker" "start" "-a" "c0888a169d301e5c1bd111af05e422dbec06424e40c9417146d524bdc9772d56", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.66 [INFO] [stderr] Compiling nix v0.16.0 [INFO] [stderr] Checking arc-swap v0.4.4 [INFO] [stderr] Checking void v1.0.2 [INFO] [stderr] Checking signal-hook-registry v1.2.0 [INFO] [stderr] Checking atty v0.2.13 [INFO] [stderr] Checking clap v2.33.0 [INFO] [stderr] Checking signal-hook v0.1.12 [INFO] [stderr] Checking rile v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:218:22 [INFO] [stdout] | [INFO] [stdout] 218 | const ARROW_UP: &'static [u8; 2] = b"[A"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:219:24 [INFO] [stdout] | [INFO] [stdout] 219 | const ARROW_DOWN: &'static [u8; 2] = b"[B"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:220:25 [INFO] [stdout] | [INFO] [stdout] 220 | const ARROW_RIGHT: &'static [u8; 2] = b"[C"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:221:24 [INFO] [stdout] | [INFO] [stdout] 221 | const ARROW_LEFT: &'static [u8; 2] = b"[D"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:218:22 [INFO] [stdout] | [INFO] [stdout] 218 | const ARROW_UP: &'static [u8; 2] = b"[A"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:219:24 [INFO] [stdout] | [INFO] [stdout] 219 | const ARROW_DOWN: &'static [u8; 2] = b"[B"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:220:25 [INFO] [stdout] | [INFO] [stdout] 220 | const ARROW_RIGHT: &'static [u8; 2] = b"[C"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/term.rs:221:24 [INFO] [stdout] | [INFO] [stdout] 221 | const ARROW_LEFT: &'static [u8; 2] = b"[D"; [INFO] [stdout] | -^^^^^^^-------- help: consider removing `'static`: `&[u8; 2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let mut buffer = context.buffer_list.resolve_ref_as_mut(window.buffer_ref); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | let mut buffer = context.buffer_list.resolve_ref_as_mut(window.buffer_ref); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Buffer` [INFO] [stdout] --> src/buffer.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / pub fn new() -> Buffer { [INFO] [stdout] 34 | | Buffer { [INFO] [stdout] 35 | | cursor: Cursor::new(), [INFO] [stdout] 36 | | lines: vec!["".to_string()], [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 32 + impl Default for Buffer { [INFO] [stdout] 33 + fn default() -> Self { [INFO] [stdout] 34 + Self::new() [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/buffer.rs:50:23 [INFO] [stdout] | [INFO] [stdout] 50 | let content = match fs::read_to_string(&file) { [INFO] [stdout] | _______________________^ [INFO] [stdout] 51 | | Ok(content) => content, [INFO] [stdout] 52 | | Err(_) => String::from(""), [INFO] [stdout] 53 | | }; [INFO] [stdout] | |_________^ help: replace it with: `fs::read_to_string(&file).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/buffer.rs:50:48 [INFO] [stdout] | [INFO] [stdout] 50 | let content = match fs::read_to_string(&file) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: implementation of inherent method `to_string(&self) -> String` for type `buffer::Buffer` [INFO] [stdout] --> src/buffer.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / pub fn to_string(&self) -> String { [INFO] [stdout] 115 | | self.lines.join("\n") [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `buffer::Buffer` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EventLoopState` [INFO] [stdout] --> src/event_loop.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> EventLoopState { [INFO] [stdout] 27 | | EventLoopState { [INFO] [stdout] 28 | | result: None, [INFO] [stdout] 29 | | pending_input: VecDeque::new(), [INFO] [stdout] 30 | | } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 25 + impl Default for EventLoopState { [INFO] [stdout] 26 + fn default() -> Self { [INFO] [stdout] 27 + Self::new() [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/event_loop.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / match self.result { [INFO] [stdout] 45 | | Some(Ok(_)) => true, [INFO] [stdout] 46 | | _ => false, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 44 - match self.result { [INFO] [stdout] 45 - Some(Ok(_)) => true, [INFO] [stdout] 46 - _ => false, [INFO] [stdout] 47 - } [INFO] [stdout] 44 + matches!(self.result, Some(Ok(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/event_loop.rs:71:25 [INFO] [stdout] | [INFO] [stdout] 71 | fn is_self_insert(keys: &Vec) -> Option { [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] 71 - fn is_self_insert(keys: &Vec) -> Option { [INFO] [stdout] 71 + fn is_self_insert(keys: &[Key]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commands.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let mut buffer = context.buffer_list.resolve_ref_as_mut(window.buffer_ref); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/event_loop.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 74 | } else if let Some(ch) = keys[0].as_char() { [INFO] [stdout] | ____________^ [INFO] [stdout] 75 | | Some(ch) [INFO] [stdout] 76 | | } else { [INFO] [stdout] 77 | | None [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ help: try: `{ keys[0].as_char().map(|ch| ch) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/key.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | self.code = 0x1f & self.code; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.code &= 0x1f` [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: variable does not need to be mutable [INFO] [stdout] --> src/commands.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | let mut buffer = context.buffer_list.resolve_ref_as_mut(window.buffer_ref); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/key.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | / format!( [INFO] [stdout] 91 | | "{}", [INFO] [stdout] 92 | | key.iter() [INFO] [stdout] 93 | | .map(|k| format!("{}", k)) [INFO] [stdout] 94 | | .collect::>() [INFO] [stdout] 95 | | .join(" ") [INFO] [stdout] 96 | | ) [INFO] [stdout] | |_________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 90 ~ key.iter() [INFO] [stdout] 91 + .map(|k| format!("{}", k)) [INFO] [stdout] 92 + .collect::>() [INFO] [stdout] 93 + .join(" ").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Buffer` [INFO] [stdout] --> src/buffer.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / pub fn new() -> Buffer { [INFO] [stdout] 34 | | Buffer { [INFO] [stdout] 35 | | cursor: Cursor::new(), [INFO] [stdout] 36 | | lines: vec!["".to_string()], [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 32 + impl Default for Buffer { [INFO] [stdout] 33 + fn default() -> Self { [INFO] [stdout] 34 + Self::new() [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/key.rs:103:14 [INFO] [stdout] | [INFO] [stdout] 103 | Some(&str[prefix.len()..]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/key.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | if str.starts_with(prefix) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 102 ~ if let Some() = str.strip_prefix(prefix) { [INFO] [stdout] 103 ~ Some() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Keymap` [INFO] [stdout] --> src/keymap.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Keymap { [INFO] [stdout] 24 | | Keymap { [INFO] [stdout] 25 | | inner: Rc::new(RefCell::new(HashMap::new())), [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for Keymap { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/buffer.rs:50:23 [INFO] [stdout] | [INFO] [stdout] 50 | let content = match fs::read_to_string(&file) { [INFO] [stdout] | _______________________^ [INFO] [stdout] 51 | | Ok(content) => content, [INFO] [stdout] 52 | | Err(_) => String::from(""), [INFO] [stdout] 53 | | }; [INFO] [stdout] | |_________^ help: replace it with: `fs::read_to_string(&file).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/buffer.rs:50:48 [INFO] [stdout] | [INFO] [stdout] 50 | let content = match fs::read_to_string(&file) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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 are using an explicit closure for cloning elements [INFO] [stdout] --> src/keymap.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | self.inner.borrow().get(key).map(|item| item.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.inner.borrow().get(key).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `buffer::Buffer` [INFO] [stdout] --> src/buffer.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / pub fn to_string(&self) -> String { [INFO] [stdout] 115 | | self.lines.join("\n") [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `buffer::Buffer` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/minibuffer.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn minibuffer_complete(context: &mut Context, _term: &mut Term) -> commands::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/term.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | return Ok(()); [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] 59 - return Ok(()); [INFO] [stdout] 59 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Term` [INFO] [stdout] --> src/term.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / pub fn new() -> Term { [INFO] [stdout] 89 | | let (rows, columns) = get_window_size(); [INFO] [stdout] 90 | | Term { [INFO] [stdout] 91 | | buffer: vec![], [INFO] [stdout] ... | [INFO] [stdout] 95 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 87 + impl Default for Term { [INFO] [stdout] 88 + fn default() -> Self { [INFO] [stdout] 89 + Self::new() [INFO] [stdout] 90 + } [INFO] [stdout] 91 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EventLoopState` [INFO] [stdout] --> src/event_loop.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> EventLoopState { [INFO] [stdout] 27 | | EventLoopState { [INFO] [stdout] 28 | | result: None, [INFO] [stdout] 29 | | pending_input: VecDeque::new(), [INFO] [stdout] 30 | | } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 25 + impl Default for EventLoopState { [INFO] [stdout] 26 + fn default() -> Self { [INFO] [stdout] 27 + Self::new() [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/event_loop.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / match self.result { [INFO] [stdout] 45 | | Some(Ok(_)) => true, [INFO] [stdout] 46 | | _ => false, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 44 - match self.result { [INFO] [stdout] 45 - Some(Ok(_)) => true, [INFO] [stdout] 46 - _ => false, [INFO] [stdout] 47 - } [INFO] [stdout] 44 + matches!(self.result, Some(Ok(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/event_loop.rs:71:25 [INFO] [stdout] | [INFO] [stdout] 71 | fn is_self_insert(keys: &Vec) -> Option { [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] 71 - fn is_self_insert(keys: &Vec) -> Option { [INFO] [stdout] 71 + fn is_self_insert(keys: &[Key]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn move_beginning_of_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/event_loop.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 74 | } else if let Some(ch) = keys[0].as_char() { [INFO] [stdout] | ____________^ [INFO] [stdout] 75 | | Some(ch) [INFO] [stdout] 76 | | } else { [INFO] [stdout] 77 | | None [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ help: try: `{ keys[0].as_char().map(|ch| ch) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn move_end_of_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:39:1 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn forward_char(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:52:1 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn backward_char(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:71:1 [INFO] [stdout] | [INFO] [stdout] 71 | pub fn next_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:88:1 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn previous_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:114:1 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn delete_char(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:120:1 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn delete_backward_char(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:127:1 [INFO] [stdout] | [INFO] [stdout] 127 | pub fn kill_line(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/key.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | self.code = 0x1f & self.code; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.code &= 0x1f` [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: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | pub fn newline(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:155:1 [INFO] [stdout] | [INFO] [stdout] 155 | pub fn indent_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/key.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | / format!( [INFO] [stdout] 91 | | "{}", [INFO] [stdout] 92 | | key.iter() [INFO] [stdout] 93 | | .map(|k| format!("{}", k)) [INFO] [stdout] 94 | | .collect::>() [INFO] [stdout] 95 | | .join(" ") [INFO] [stdout] 96 | | ) [INFO] [stdout] | |_________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 90 ~ key.iter() [INFO] [stdout] 91 + .map(|k| format!("{}", k)) [INFO] [stdout] 92 + .collect::>() [INFO] [stdout] 93 + .join(" ").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/key.rs:103:14 [INFO] [stdout] | [INFO] [stdout] 103 | Some(&str[prefix.len()..]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/key.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | if str.starts_with(prefix) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 102 ~ if let Some() = str.strip_prefix(prefix) { [INFO] [stdout] 103 ~ Some() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:166:1 [INFO] [stdout] | [INFO] [stdout] 166 | pub fn save_buffer(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn next_screen(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:206:1 [INFO] [stdout] | [INFO] [stdout] 206 | pub fn previous_screen(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Keymap` [INFO] [stdout] --> src/keymap.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Keymap { [INFO] [stdout] 24 | | Keymap { [INFO] [stdout] 25 | | inner: Rc::new(RefCell::new(HashMap::new())), [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for Keymap { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/commands.rs:220:26 [INFO] [stdout] | [INFO] [stdout] 220 | window.scroll_line = if let Some(scroll_line) = window.scroll_line.checked_sub(offset) { [INFO] [stdout] | __________________________^ [INFO] [stdout] 221 | | scroll_line [INFO] [stdout] 222 | | } else { [INFO] [stdout] 223 | | 0 [INFO] [stdout] 224 | | }; [INFO] [stdout] | |_____^ help: replace it with: `window.scroll_line.checked_sub(offset).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:229:1 [INFO] [stdout] | [INFO] [stdout] 229 | pub fn beginning_of_buffer(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:237:1 [INFO] [stdout] | [INFO] [stdout] 237 | pub fn end_of_buffer(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:247:1 [INFO] [stdout] | [INFO] [stdout] 247 | pub fn kill_rile(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:252:1 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn isearch_forward(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/keymap.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | self.inner.borrow().get(key).map(|item| item.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.inner.borrow().get(key).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:273:1 [INFO] [stdout] | [INFO] [stdout] 273 | pub fn m_x(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:278:1 [INFO] [stdout] | [INFO] [stdout] 278 | pub fn keyboard_quit(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/minibuffer.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn minibuffer_complete(context: &mut Context, _term: &mut Term) -> commands::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/term.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | return Ok(()); [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] 59 - return Ok(()); [INFO] [stdout] 59 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Term` [INFO] [stdout] --> src/term.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / pub fn new() -> Term { [INFO] [stdout] 89 | | let (rows, columns) = get_window_size(); [INFO] [stdout] 90 | | Term { [INFO] [stdout] 91 | | buffer: vec![], [INFO] [stdout] ... | [INFO] [stdout] 95 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 87 + impl Default for Term { [INFO] [stdout] 88 + fn default() -> Self { [INFO] [stdout] 89 + Self::new() [INFO] [stdout] 90 + } [INFO] [stdout] 91 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn move_beginning_of_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn move_end_of_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:39:1 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn forward_char(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:52:1 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn backward_char(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:71:1 [INFO] [stdout] | [INFO] [stdout] 71 | pub fn next_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:88:1 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn previous_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:114:1 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn delete_char(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:120:1 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn delete_backward_char(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:127:1 [INFO] [stdout] | [INFO] [stdout] 127 | pub fn kill_line(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | pub fn newline(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:155:1 [INFO] [stdout] | [INFO] [stdout] 155 | pub fn indent_line(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:166:1 [INFO] [stdout] | [INFO] [stdout] 166 | pub fn save_buffer(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn next_screen(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:206:1 [INFO] [stdout] | [INFO] [stdout] 206 | pub fn previous_screen(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/commands.rs:220:26 [INFO] [stdout] | [INFO] [stdout] 220 | window.scroll_line = if let Some(scroll_line) = window.scroll_line.checked_sub(offset) { [INFO] [stdout] | __________________________^ [INFO] [stdout] 221 | | scroll_line [INFO] [stdout] 222 | | } else { [INFO] [stdout] 223 | | 0 [INFO] [stdout] 224 | | }; [INFO] [stdout] | |_____^ help: replace it with: `window.scroll_line.checked_sub(offset).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:229:1 [INFO] [stdout] | [INFO] [stdout] 229 | pub fn beginning_of_buffer(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:237:1 [INFO] [stdout] | [INFO] [stdout] 237 | pub fn end_of_buffer(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:247:1 [INFO] [stdout] | [INFO] [stdout] 247 | pub fn kill_rile(context: &mut Context, _term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:252:1 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn isearch_forward(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:273:1 [INFO] [stdout] | [INFO] [stdout] 273 | pub fn m_x(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/commands.rs:278:1 [INFO] [stdout] | [INFO] [stdout] 278 | pub fn keyboard_quit(context: &mut Context, term: &mut Term) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | const PKG_NAME: &'static str = env!("CARGO_PKG_NAME"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | const PKG_VERSION: &'static str = env!("CARGO_PKG_VERSION"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | const PKG_AUTHORS: &'static str = env!("CARGO_PKG_AUTHORS"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:19:25 [INFO] [stdout] | [INFO] [stdout] 19 | const PKG_DESCRIPTION: &'static str = env!("CARGO_PKG_DESCRIPTION"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/rile.rs:55:28 [INFO] [stdout] | [INFO] [stdout] 55 | with_raw_mode(|| while !event_loop(term, context, |_, _| {}, false).is_ok() {}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `event_loop(term, context, |_, _| {}, false).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | const PKG_NAME: &'static str = env!("CARGO_PKG_NAME"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | const PKG_VERSION: &'static str = env!("CARGO_PKG_VERSION"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | const PKG_AUTHORS: &'static str = env!("CARGO_PKG_AUTHORS"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/bin/rile.rs:19:25 [INFO] [stdout] | [INFO] [stdout] 19 | const PKG_DESCRIPTION: &'static str = env!("CARGO_PKG_DESCRIPTION"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/test-term.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | write!(term, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 24 - write!(term, "\n")?; [INFO] [stdout] 24 + writeln!(term)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/test-term.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | write!(term, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 46 - write!(term, "\n")?; [INFO] [stdout] 46 + writeln!(term)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/test-term.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | write!(term, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 49 - write!(term, "\n")?; [INFO] [stdout] 49 + writeln!(term)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/rile.rs:55:28 [INFO] [stdout] | [INFO] [stdout] 55 | with_raw_mode(|| while !event_loop(term, context, |_, _| {}, false).is_ok() {}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `event_loop(term, context, |_, _| {}, false).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/test-term.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | write!(term, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 24 - write!(term, "\n")?; [INFO] [stdout] 24 + writeln!(term)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/test-term.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | write!(term, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 46 - write!(term, "\n")?; [INFO] [stdout] 46 + writeln!(term)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/test-term.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | write!(term, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 49 - write!(term, "\n")?; [INFO] [stdout] 49 + writeln!(term)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.74s [INFO] running `Command { std: "docker" "inspect" "c0888a169d301e5c1bd111af05e422dbec06424e40c9417146d524bdc9772d56", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c0888a169d301e5c1bd111af05e422dbec06424e40c9417146d524bdc9772d56", kill_on_drop: false }` [INFO] [stdout] c0888a169d301e5c1bd111af05e422dbec06424e40c9417146d524bdc9772d56