[INFO] cloning repository https://github.com/retro49/stringer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/retro49/stringer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fretro49%2Fstringer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fretro49%2Fstringer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8f4a89f8d236938d9bcd4a9413ffc700284bbb77 [INFO] linting retro49/stringer/8f4a89f8d236938d9bcd4a9413ffc700284bbb77 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fretro49%2Fstringer" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/retro49/stringer [INFO] finished tweaking git repo https://github.com/retro49/stringer [INFO] tweaked toml for git repo https://github.com/retro49/stringer written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/retro49/stringer 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/retro49/stringer 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 quick-xml v0.36.1 [INFO] [stderr] Downloaded syn v2.0.77 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 8f2fed5006a248fb351d01fdf9b0e440f67e24335411bb2477ed96972f61ca6e [INFO] running `Command { std: "docker" "start" "-a" "8f2fed5006a248fb351d01fdf9b0e440f67e24335411bb2477ed96972f61ca6e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8f2fed5006a248fb351d01fdf9b0e440f67e24335411bb2477ed96972f61ca6e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8f2fed5006a248fb351d01fdf9b0e440f67e24335411bb2477ed96972f61ca6e", kill_on_drop: false }` [INFO] [stdout] 8f2fed5006a248fb351d01fdf9b0e440f67e24335411bb2477ed96972f61ca6e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 2450750cf5891c0b13098efe05177186b37bc1b9c3916ec68912219e611d5a6b [INFO] running `Command { std: "docker" "start" "-a" "2450750cf5891c0b13098efe05177186b37bc1b9c3916ec68912219e611d5a6b", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.86 [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Compiling serde_json v1.0.128 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking quick-xml v0.36.1 [INFO] [stderr] Checking clap_builder v4.5.17 [INFO] [stderr] Checking regex-automata v0.4.7 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling syn v2.0.77 [INFO] [stderr] Checking clap v4.5.17 [INFO] [stderr] Checking regex v1.10.6 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Checking stringer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:80:28 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn special_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 80 - pub fn special_include(self: &mut Self, opt: bool) { [INFO] [stdout] 80 + pub fn special_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:85:32 [INFO] [stdout] | [INFO] [stdout] 85 | pub fn set_window_min_size(self: &mut Self, ws: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 85 - pub fn set_window_min_size(self: &mut Self, ws: u64) { [INFO] [stdout] 85 + pub fn set_window_min_size(&mut self, ws: u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:90:32 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn set_window_max_size(self: &mut Self, ws: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 90 - pub fn set_window_max_size(self: &mut Self, ws: u64) { [INFO] [stdout] 90 + pub fn set_window_max_size(&mut self, ws: u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:95:31 [INFO] [stdout] | [INFO] [stdout] 95 | pub fn whitespace_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 95 - pub fn whitespace_include(self: &mut Self, opt: bool) { [INFO] [stdout] 95 + pub fn whitespace_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:100:30 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn set_output_format(self: &mut Self, opt: OutputFormat) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 100 - pub fn set_output_format(self: &mut Self, opt: OutputFormat) { [INFO] [stdout] 100 + pub fn set_output_format(&mut self, opt: OutputFormat) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:105:27 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn length_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 105 - pub fn length_include(self: &mut Self, opt: bool) { [INFO] [stdout] 105 + pub fn length_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:110:25 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn line_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 110 - pub fn line_include(self: &mut Self, opt: bool) { [INFO] [stdout] 110 + pub fn line_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn split(self: &mut Self, opt: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 115 - pub fn split(self: &mut Self, opt: u64) { [INFO] [stdout] 115 + pub fn split(&mut self, opt: u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:120:18 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn regex(self: &mut Self, opt: String) -> Result<(), crate::error::StringerError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 120 - pub fn regex(self: &mut Self, opt: String) -> Result<(), crate::error::StringerError> { [INFO] [stdout] 120 + pub fn regex(&mut self, opt: String) -> Result<(), crate::error::StringerError> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/writer.rs:1:14 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn write( [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 6 | W: std::io::Write [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/lib.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | pub fn new(input: &mut R) -> [INFO] [stdout] | ^ [INFO] [stdout] 74 | Result> [INFO] [stdout] 75 | where R: Read [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:106:23 [INFO] [stdout] | [INFO] [stdout] 106 | pub fn set_config(self: &mut Self, config: crate::config::StringerConfig) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 106 - pub fn set_config(self: &mut Self, config: crate::config::StringerConfig) { [INFO] [stdout] 106 + pub fn set_config(&mut self, config: crate::config::StringerConfig) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:112:16 [INFO] [stdout] | [INFO] [stdout] 112 | fn advance(self: &mut Self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 112 - fn advance(self: &mut Self) { [INFO] [stdout] 112 + fn advance(&mut self) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:125:20 [INFO] [stdout] | [INFO] [stdout] 125 | fn should_read(self: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 125 - fn should_read(self: &Self) -> bool { [INFO] [stdout] 125 + fn should_read(&self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | fn read(self: &mut Self) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 153 - fn read(self: &mut Self) -> Option> { [INFO] [stdout] 153 + fn read(&mut self) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:203:20 [INFO] [stdout] | [INFO] [stdout] 203 | fn to_stringer(self: &mut Self, buff: Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 203 - fn to_stringer(self: &mut Self, buff: Vec) -> Option { [INFO] [stdout] 203 + fn to_stringer(&mut self, buff: Vec) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:224:25 [INFO] [stdout] | [INFO] [stdout] 224 | pub fn read_strings(self: &mut Self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 224 - pub fn read_strings(self: &mut Self) { [INFO] [stdout] 224 + pub fn read_strings(&mut self) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:80:28 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn special_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 80 - pub fn special_include(self: &mut Self, opt: bool) { [INFO] [stdout] 80 + pub fn special_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:85:32 [INFO] [stdout] | [INFO] [stdout] 85 | pub fn set_window_min_size(self: &mut Self, ws: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 85 - pub fn set_window_min_size(self: &mut Self, ws: u64) { [INFO] [stdout] 85 + pub fn set_window_min_size(&mut self, ws: u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:90:32 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn set_window_max_size(self: &mut Self, ws: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 90 - pub fn set_window_max_size(self: &mut Self, ws: u64) { [INFO] [stdout] 90 + pub fn set_window_max_size(&mut self, ws: u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:95:31 [INFO] [stdout] | [INFO] [stdout] 95 | pub fn whitespace_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 95 - pub fn whitespace_include(self: &mut Self, opt: bool) { [INFO] [stdout] 95 + pub fn whitespace_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:100:30 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn set_output_format(self: &mut Self, opt: OutputFormat) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 100 - pub fn set_output_format(self: &mut Self, opt: OutputFormat) { [INFO] [stdout] 100 + pub fn set_output_format(&mut self, opt: OutputFormat) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:105:27 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn length_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 105 - pub fn length_include(self: &mut Self, opt: bool) { [INFO] [stdout] 105 + pub fn length_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:110:25 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn line_include(self: &mut Self, opt: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 110 - pub fn line_include(self: &mut Self, opt: bool) { [INFO] [stdout] 110 + pub fn line_include(&mut self, opt: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn split(self: &mut Self, opt: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 115 - pub fn split(self: &mut Self, opt: u64) { [INFO] [stdout] 115 + pub fn split(&mut self, opt: u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/config.rs:120:18 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn regex(self: &mut Self, opt: String) -> Result<(), crate::error::StringerError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 120 - pub fn regex(self: &mut Self, opt: String) -> Result<(), crate::error::StringerError> { [INFO] [stdout] 120 + pub fn regex(&mut self, opt: String) -> Result<(), crate::error::StringerError> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/writer.rs:1:14 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn write( [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 6 | W: std::io::Write [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/lib.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | pub fn new(input: &mut R) -> [INFO] [stdout] | ^ [INFO] [stdout] 74 | Result> [INFO] [stdout] 75 | where R: Read [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:106:23 [INFO] [stdout] | [INFO] [stdout] 106 | pub fn set_config(self: &mut Self, config: crate::config::StringerConfig) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 106 - pub fn set_config(self: &mut Self, config: crate::config::StringerConfig) { [INFO] [stdout] 106 + pub fn set_config(&mut self, config: crate::config::StringerConfig) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:112:16 [INFO] [stdout] | [INFO] [stdout] 112 | fn advance(self: &mut Self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 112 - fn advance(self: &mut Self) { [INFO] [stdout] 112 + fn advance(&mut self) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:125:20 [INFO] [stdout] | [INFO] [stdout] 125 | fn should_read(self: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 125 - fn should_read(self: &Self) -> bool { [INFO] [stdout] 125 + fn should_read(&self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | fn read(self: &mut Self) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 153 - fn read(self: &mut Self) -> Option> { [INFO] [stdout] 153 + fn read(&mut self) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:203:20 [INFO] [stdout] | [INFO] [stdout] 203 | fn to_stringer(self: &mut Self, buff: Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 203 - fn to_stringer(self: &mut Self, buff: Vec) -> Option { [INFO] [stdout] 203 + fn to_stringer(&mut self, buff: Vec) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/lib.rs:224:25 [INFO] [stdout] | [INFO] [stdout] 224 | pub fn read_strings(self: &mut Self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 224 - pub fn read_strings(self: &mut Self) { [INFO] [stdout] 224 + pub fn read_strings(&mut self) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/args.rs:138:28 [INFO] [stdout] | [INFO] [stdout] 138 | output_format: match cmd.get_one::("format") { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 139 | | Some(f) => Some(f.clone()), [INFO] [stdout] 140 | | _ => None, [INFO] [stdout] 141 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("format").map(|f| f.clone())` [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 `Option::map` [INFO] [stdout] --> src/args.rs:144:21 [INFO] [stdout] | [INFO] [stdout] 144 | output: match cmd.get_one::("out") { [INFO] [stdout] | _____________________^ [INFO] [stdout] 145 | | Some(s) => Some(s.clone()), [INFO] [stdout] 146 | | _ => None, [INFO] [stdout] 147 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("out").map(|s| s.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/args.rs:148:20 [INFO] [stdout] | [INFO] [stdout] 148 | input: match cmd.get_one::("in") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 149 | | Some(s) => Some(s.clone()), [INFO] [stdout] 150 | | _ => None, [INFO] [stdout] 151 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("in").map(|s| s.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/args.rs:152:20 [INFO] [stdout] | [INFO] [stdout] 152 | regex: match cmd.get_one::("regex") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 153 | | Some(s) => Some(s.clone()), [INFO] [stdout] 154 | | _ => None, [INFO] [stdout] 155 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("regex").map(|s| s.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/config.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | return conf; [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] 195 - return conf; [INFO] [stdout] 195 + conf [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/config.rs:189:24 [INFO] [stdout] | [INFO] [stdout] 189 | Some(r) => match regex::Regex::new(&r) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 190 | | Ok(r) => Some(r), [INFO] [stdout] 191 | | Err(_) => None, [INFO] [stdout] 192 | | }, [INFO] [stdout] | |_____________^ help: replace with: `regex::Regex::new(&r).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` 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/writer.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / match w.write(serde_json::to_string(r).unwrap().as_bytes()) { [INFO] [stdout] 10 | | Err(_) => { [INFO] [stdout] 11 | | println!("unable to write to buffer"); [INFO] [stdout] 12 | | return Err(crate::error::StringerError::new(String::from( [INFO] [stdout] ... | [INFO] [stdout] 18 | | } [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] 9 ~ if let Err(_) = w.write(serde_json::to_string(r).unwrap().as_bytes()) { [INFO] [stdout] 10 + println!("unable to write to buffer"); [INFO] [stdout] 11 + return Err(crate::error::StringerError::new(String::from( [INFO] [stdout] 12 + "unable to write to buffer", [INFO] [stdout] 13 + ))); [INFO] [stdout] 14 + } [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/lib.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | / match self.length { [INFO] [stdout] 47 | | Some(n) => { [INFO] [stdout] 48 | | ss.serialize_field("length", &n)?; [INFO] [stdout] ... | [INFO] [stdout] 51 | | }; [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] 46 ~ if let Some(n) = self.length { [INFO] [stdout] 47 + ss.serialize_field("length", &n)?; [INFO] [stdout] 48 ~ }; [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/lib.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / match self.length { [INFO] [stdout] 60 | | Some(n) => { [INFO] [stdout] 61 | | let _ = f.write_fmt(format_args!("{}, ", n )); [INFO] [stdout] ... | [INFO] [stdout] 64 | | }; [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] 59 ~ if let Some(n) = self.length { [INFO] [stdout] 60 + let _ = f.write_fmt(format_args!("{}, ", n )); [INFO] [stdout] 61 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/lib.rs:69:6 [INFO] [stdout] | [INFO] [stdout] 69 | impl<'a> Stringer { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` 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/lib.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | / match input.read_to_end(&mut buff) { [INFO] [stdout] 79 | | Err(e) => { [INFO] [stdout] 80 | | return Err(Box::new(e)); [INFO] [stdout] ... | [INFO] [stdout] 83 | | }; [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] 78 ~ if let Err(e) = input.read_to_end(&mut buff) { [INFO] [stdout] 79 + return Err(Box::new(e)); [INFO] [stdout] 80 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/lib.rs:89:20 [INFO] [stdout] | [INFO] [stdout] 89 | if buff.len() <= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `0` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `buff.len() == 0` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] = note: `#[deny(clippy::absurd_extreme_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | if buff.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buff.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/lib.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | return false; [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] 148 - return false; [INFO] [stdout] 148 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:209:25 [INFO] [stdout] | [INFO] [stdout] 209 | Err(_) => { 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] 209 ~ Err(_) => { None} [INFO] [stdout] 210 | Ok(s) => { [INFO] [stdout] ... [INFO] [stdout] 218 | } [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:211:17 [INFO] [stdout] | [INFO] [stdout] 211 | / return Some(StringerResult { [INFO] [stdout] 212 | | length: match self.config.length { [INFO] [stdout] 213 | | true => { Some(len - 1) }, [INFO] [stdout] 214 | | false => { None } [INFO] [stdout] 215 | | }, [INFO] [stdout] 216 | | string: s [INFO] [stdout] 217 | | }); [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] 211 ~ Some(StringerResult { [INFO] [stdout] 212 + length: match self.config.length { [INFO] [stdout] 213 + true => { Some(len - 1) }, [INFO] [stdout] 214 + false => { None } [INFO] [stdout] 215 + }, [INFO] [stdout] 216 + string: s [INFO] [stdout] 217 ~ }) [INFO] [stdout] 218 | } [INFO] [stdout] 219 ~ } [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/lib.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 242 | / match self.config.regex{ [INFO] [stdout] 243 | | Some(ref r) => { [INFO] [stdout] 244 | | // this clone is gonna cost a lot. [INFO] [stdout] 245 | | let res: Vec = [INFO] [stdout] ... | [INFO] [stdout] 254 | | _ => {} [INFO] [stdout] 255 | | }; [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] 242 ~ if let Some(ref r) = self.config.regex { [INFO] [stdout] 243 + // this clone is gonna cost a lot. [INFO] [stdout] 244 + let res: Vec = [INFO] [stdout] 245 + self.results [INFO] [stdout] 246 + .iter() [INFO] [stdout] 247 + .filter({ |x| [INFO] [stdout] 248 + r.is_match(x.string.to_str().unwrap()) [INFO] [stdout] 249 + }).cloned() [INFO] [stdout] 250 + .collect(); [INFO] [stdout] 251 + self.results = res; [INFO] [stdout] 252 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `stringer` (lib test) due to 1 previous error; 33 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/args.rs:138:28 [INFO] [stdout] | [INFO] [stdout] 138 | output_format: match cmd.get_one::("format") { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 139 | | Some(f) => Some(f.clone()), [INFO] [stdout] 140 | | _ => None, [INFO] [stdout] 141 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("format").map(|f| f.clone())` [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 `Option::map` [INFO] [stdout] --> src/args.rs:144:21 [INFO] [stdout] | [INFO] [stdout] 144 | output: match cmd.get_one::("out") { [INFO] [stdout] | _____________________^ [INFO] [stdout] 145 | | Some(s) => Some(s.clone()), [INFO] [stdout] 146 | | _ => None, [INFO] [stdout] 147 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("out").map(|s| s.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/args.rs:148:20 [INFO] [stdout] | [INFO] [stdout] 148 | input: match cmd.get_one::("in") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 149 | | Some(s) => Some(s.clone()), [INFO] [stdout] 150 | | _ => None, [INFO] [stdout] 151 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("in").map(|s| s.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/args.rs:152:20 [INFO] [stdout] | [INFO] [stdout] 152 | regex: match cmd.get_one::("regex") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 153 | | Some(s) => Some(s.clone()), [INFO] [stdout] 154 | | _ => None, [INFO] [stdout] 155 | | }, [INFO] [stdout] | |_____________^ help: try: `cmd.get_one::("regex").map(|s| s.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/config.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | return conf; [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] 195 - return conf; [INFO] [stdout] 195 + conf [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/config.rs:189:24 [INFO] [stdout] | [INFO] [stdout] 189 | Some(r) => match regex::Regex::new(&r) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 190 | | Ok(r) => Some(r), [INFO] [stdout] 191 | | Err(_) => None, [INFO] [stdout] 192 | | }, [INFO] [stdout] | |_____________^ help: replace with: `regex::Regex::new(&r).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` 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/writer.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / match w.write(serde_json::to_string(r).unwrap().as_bytes()) { [INFO] [stdout] 10 | | Err(_) => { [INFO] [stdout] 11 | | println!("unable to write to buffer"); [INFO] [stdout] 12 | | return Err(crate::error::StringerError::new(String::from( [INFO] [stdout] ... | [INFO] [stdout] 18 | | } [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] 9 ~ if let Err(_) = w.write(serde_json::to_string(r).unwrap().as_bytes()) { [INFO] [stdout] 10 + println!("unable to write to buffer"); [INFO] [stdout] 11 + return Err(crate::error::StringerError::new(String::from( [INFO] [stdout] 12 + "unable to write to buffer", [INFO] [stdout] 13 + ))); [INFO] [stdout] 14 + } [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/lib.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | / match self.length { [INFO] [stdout] 47 | | Some(n) => { [INFO] [stdout] 48 | | ss.serialize_field("length", &n)?; [INFO] [stdout] ... | [INFO] [stdout] 51 | | }; [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] 46 ~ if let Some(n) = self.length { [INFO] [stdout] 47 + ss.serialize_field("length", &n)?; [INFO] [stdout] 48 ~ }; [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/lib.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / match self.length { [INFO] [stdout] 60 | | Some(n) => { [INFO] [stdout] 61 | | let _ = f.write_fmt(format_args!("{}, ", n )); [INFO] [stdout] ... | [INFO] [stdout] 64 | | }; [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] 59 ~ if let Some(n) = self.length { [INFO] [stdout] 60 + let _ = f.write_fmt(format_args!("{}, ", n )); [INFO] [stdout] 61 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/lib.rs:69:6 [INFO] [stdout] | [INFO] [stdout] 69 | impl<'a> Stringer { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` 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/lib.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | / match input.read_to_end(&mut buff) { [INFO] [stdout] 79 | | Err(e) => { [INFO] [stdout] 80 | | return Err(Box::new(e)); [INFO] [stdout] ... | [INFO] [stdout] 83 | | }; [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] 78 ~ if let Err(e) = input.read_to_end(&mut buff) { [INFO] [stdout] 79 + return Err(Box::new(e)); [INFO] [stdout] 80 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/lib.rs:89:20 [INFO] [stdout] | [INFO] [stdout] 89 | if buff.len() <= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `0` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `buff.len() == 0` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] = note: `#[deny(clippy::absurd_extreme_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | if buff.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buff.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/lib.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | return false; [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] 148 - return false; [INFO] [stdout] 148 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:209:25 [INFO] [stdout] | [INFO] [stdout] 209 | Err(_) => { 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] 209 ~ Err(_) => { None} [INFO] [stdout] 210 | Ok(s) => { [INFO] [stdout] ... [INFO] [stdout] 218 | } [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:211:17 [INFO] [stdout] | [INFO] [stdout] 211 | / return Some(StringerResult { [INFO] [stdout] 212 | | length: match self.config.length { [INFO] [stdout] 213 | | true => { Some(len - 1) }, [INFO] [stdout] 214 | | false => { None } [INFO] [stdout] 215 | | }, [INFO] [stdout] 216 | | string: s [INFO] [stdout] 217 | | }); [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] 211 ~ Some(StringerResult { [INFO] [stdout] 212 + length: match self.config.length { [INFO] [stdout] 213 + true => { Some(len - 1) }, [INFO] [stdout] 214 + false => { None } [INFO] [stdout] 215 + }, [INFO] [stdout] 216 + string: s [INFO] [stdout] 217 ~ }) [INFO] [stdout] 218 | } [INFO] [stdout] 219 ~ } [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/lib.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 242 | / match self.config.regex{ [INFO] [stdout] 243 | | Some(ref r) => { [INFO] [stdout] 244 | | // this clone is gonna cost a lot. [INFO] [stdout] 245 | | let res: Vec = [INFO] [stdout] ... | [INFO] [stdout] 254 | | _ => {} [INFO] [stdout] 255 | | }; [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] 242 ~ if let Some(ref r) = self.config.regex { [INFO] [stdout] 243 + // this clone is gonna cost a lot. [INFO] [stdout] 244 + let res: Vec = [INFO] [stdout] 245 + self.results [INFO] [stdout] 246 + .iter() [INFO] [stdout] 247 + .filter({ |x| [INFO] [stdout] 248 + r.is_match(x.string.to_str().unwrap()) [INFO] [stdout] 249 + }).cloned() [INFO] [stdout] 250 + .collect(); [INFO] [stdout] 251 + self.results = res; [INFO] [stdout] 252 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `stringer` (lib) due to 1 previous error; 33 warnings emitted [INFO] running `Command { std: "docker" "inspect" "2450750cf5891c0b13098efe05177186b37bc1b9c3916ec68912219e611d5a6b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2450750cf5891c0b13098efe05177186b37bc1b9c3916ec68912219e611d5a6b", kill_on_drop: false }` [INFO] [stdout] 2450750cf5891c0b13098efe05177186b37bc1b9c3916ec68912219e611d5a6b