[INFO] cloning repository https://github.com/ren-wei/multi-line-stream [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ren-wei/multi-line-stream" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fren-wei%2Fmulti-line-stream", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fren-wei%2Fmulti-line-stream'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 713c406ded09188de2dd4ba078385453639c153b [INFO] linting ren-wei/multi-line-stream against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fren-wei%2Fmulti-line-stream" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ren-wei/multi-line-stream [INFO] finished tweaking git repo https://github.com/ren-wei/multi-line-stream [INFO] tweaked toml for git repo https://github.com/ren-wei/multi-line-stream written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ren-wei/multi-line-stream 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/ren-wei/multi-line-stream 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 2138a6bb14037ec7523251b2c58107655cb04b2defa6350db6fcfe54481a97bf [INFO] running `Command { std: "docker" "start" "-a" "2138a6bb14037ec7523251b2c58107655cb04b2defa6350db6fcfe54481a97bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2138a6bb14037ec7523251b2c58107655cb04b2defa6350db6fcfe54481a97bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2138a6bb14037ec7523251b2c58107655cb04b2defa6350db6fcfe54481a97bf", kill_on_drop: false }` [INFO] [stdout] 2138a6bb14037ec7523251b2c58107655cb04b2defa6350db6fcfe54481a97bf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 01f4a7532db7cc63703a2b407297449106519d9ba9d8f7b6179a9e662a7f70fa [INFO] running `Command { std: "docker" "start" "-a" "01f4a7532db7cc63703a2b407297449106519d9ba9d8f7b6179a9e662a7f70fa", kill_on_drop: false }` [INFO] [stderr] Checking multi-line-stream v1.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: enclosing `Some` and `?` operator are unneeded [INFO] [stdout] --> src/lib.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | Some(self.source.bytes().nth(index)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Some` and `?` operator [INFO] [stdout] | [INFO] [stdout] 44 - Some(self.source.bytes().nth(index)?) [INFO] [stdout] 44 + self.source.bytes().nth(index) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth()` on a `str` [INFO] [stdout] --> src/lib.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | Some(self.source.bytes().nth(index)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes().get(index).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] = note: `#[warn(clippy::bytes_nth)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / if let Some(char) = self.source.bytes().nth(self.position) { [INFO] [stdout] 49 | | if char == ch { [INFO] [stdout] 50 | | self.position += 1; [INFO] [stdout] 51 | | return true; [INFO] [stdout] 52 | | } [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 48 ~ if let Some(char) = self.source.bytes().nth(self.position) [INFO] [stdout] 49 ~ && char == ch { [INFO] [stdout] 50 | self.position += 1; [INFO] [stdout] 51 | return true; [INFO] [stdout] 52 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth()` on a `str` [INFO] [stdout] --> src/lib.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | if let Some(char) = self.source.bytes().nth(self.position) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes().get(self.position).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if !self [INFO] [stdout] | ____________^ [INFO] [stdout] 63 | | .source [INFO] [stdout] 64 | | .get(self.position..self.position + ch.len()) [INFO] [stdout] 65 | | .is_some_and(|v| v == ch) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 62 ~ if self [INFO] [stdout] 63 + .source [INFO] [stdout] 64 + .get(self.position..self.position + ch.len()).is_none_or(|v| v != ch) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth()` on a `str` [INFO] [stdout] --> src/lib.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 98 | if self.source.bytes().nth(self.position) == Some(ch) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes().get(self.position).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth().unwrap()` on a `str` [INFO] [stdout] --> src/lib.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | && condition(self.source.bytes().nth(self.position).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes()[self.position]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lib.rs:122:46 [INFO] [stdout] | [INFO] [stdout] 122 | let n = self.advance_while_char(|ch| vec![b' ', b'\t', b'\n', 12, b'\r'].contains(&ch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[b' ', b'\t', b'\n', 12, b'\r']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Some` and `?` operator are unneeded [INFO] [stdout] --> src/lib.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | Some(self.source.bytes().nth(index)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Some` and `?` operator [INFO] [stdout] | [INFO] [stdout] 44 - Some(self.source.bytes().nth(index)?) [INFO] [stdout] 44 + self.source.bytes().nth(index) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth()` on a `str` [INFO] [stdout] --> src/lib.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | Some(self.source.bytes().nth(index)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes().get(index).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] = note: `#[warn(clippy::bytes_nth)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / if let Some(char) = self.source.bytes().nth(self.position) { [INFO] [stdout] 49 | | if char == ch { [INFO] [stdout] 50 | | self.position += 1; [INFO] [stdout] 51 | | return true; [INFO] [stdout] 52 | | } [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 48 ~ if let Some(char) = self.source.bytes().nth(self.position) [INFO] [stdout] 49 ~ && char == ch { [INFO] [stdout] 50 | self.position += 1; [INFO] [stdout] 51 | return true; [INFO] [stdout] 52 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth()` on a `str` [INFO] [stdout] --> src/lib.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | if let Some(char) = self.source.bytes().nth(self.position) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes().get(self.position).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if !self [INFO] [stdout] | ____________^ [INFO] [stdout] 63 | | .source [INFO] [stdout] 64 | | .get(self.position..self.position + ch.len()) [INFO] [stdout] 65 | | .is_some_and(|v| v == ch) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 62 ~ if self [INFO] [stdout] 63 + .source [INFO] [stdout] 64 + .get(self.position..self.position + ch.len()).is_none_or(|v| v != ch) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth()` on a `str` [INFO] [stdout] --> src/lib.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 98 | if self.source.bytes().nth(self.position) == Some(ch) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes().get(self.position).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth().unwrap()` on a `str` [INFO] [stdout] --> src/lib.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | && condition(self.source.bytes().nth(self.position).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.source.as_bytes()[self.position]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lib.rs:122:46 [INFO] [stdout] | [INFO] [stdout] 122 | let n = self.advance_while_char(|ch| vec![b' ', b'\t', b'\n', 12, b'\r'].contains(&ch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[b' ', b'\t', b'\n', 12, b'\r']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.28s [INFO] running `Command { std: "docker" "inspect" "01f4a7532db7cc63703a2b407297449106519d9ba9d8f7b6179a9e662a7f70fa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "01f4a7532db7cc63703a2b407297449106519d9ba9d8f7b6179a9e662a7f70fa", kill_on_drop: false }` [INFO] [stdout] 01f4a7532db7cc63703a2b407297449106519d9ba9d8f7b6179a9e662a7f70fa