[INFO] fetching crate bwrap 1.3.0... [INFO] linting bwrap-1.3.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate bwrap 1.3.0 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate bwrap 1.3.0 [INFO] finished tweaking crates.io crate bwrap 1.3.0 [INFO] tweaked toml for crates.io crate bwrap 1.3.0 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate bwrap 1.3.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 1 package to latest compatible version [INFO] [stderr] Adding unicode-width v0.1.14 (available: v0.2.2) [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-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b2a01028008066d4eca415e9ea2ea2ef78f6822fb930eaccef925f585eb2d7d1 [INFO] running `Command { std: "docker" "start" "-a" "b2a01028008066d4eca415e9ea2ea2ef78f6822fb930eaccef925f585eb2d7d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b2a01028008066d4eca415e9ea2ea2ef78f6822fb930eaccef925f585eb2d7d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b2a01028008066d4eca415e9ea2ea2ef78f6822fb930eaccef925f585eb2d7d1", kill_on_drop: false }` [INFO] [stdout] b2a01028008066d4eca415e9ea2ea2ef78f6822fb930eaccef925f585eb2d7d1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e02081c96e3844d3b1ed8c2fea36d21c6b61a035b774f1a085f1a430ac211d5f [INFO] running `Command { std: "docker" "start" "-a" "e02081c96e3844d3b1ed8c2fea36d21c6b61a035b774f1a085f1a430ac211d5f", kill_on_drop: false }` [INFO] [stderr] Checking bwrap v1.3.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/lib.rs:119:7 [INFO] [stdout] | [INFO] [stdout] 119 | #[cfg(any(feature = "use_std"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "use_std"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] = note: `#[warn(clippy::non_minimal_cfg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/lib.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | #![cfg_attr(doc_cfg, feature(doc_cfg))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/lib.rs:128:12 [INFO] [stdout] | [INFO] [stdout] 128 | #[cfg_attr(doc_cfg, doc(cfg(feature = "use_std")))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/lib.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | #[cfg_attr(doc_cfg, doc(cfg(feature = "use_std")))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/public_macros.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | #[cfg_attr(doc_cfg, doc(cfg(feature = "use_std")))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/lib.rs:119:7 [INFO] [stdout] | [INFO] [stdout] 119 | #[cfg(any(feature = "use_std"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "use_std"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] = note: `#[warn(clippy::non_minimal_cfg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/lib.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | #![cfg_attr(doc_cfg, feature(doc_cfg))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/lib.rs:128:12 [INFO] [stdout] | [INFO] [stdout] 128 | #[cfg_attr(doc_cfg, doc(cfg(feature = "use_std")))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/lib.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | #[cfg_attr(doc_cfg, doc(cfg(feature = "use_std")))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `doc_cfg` [INFO] [stdout] --> src/public_macros.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | #[cfg_attr(doc_cfg, doc(cfg(feature = "use_std")))] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `push_within` is never used [INFO] [stdout] --> src/auxbuf.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 19 | impl<'a> ByteSlcBuf<'a> { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 50 | pub(crate) fn push_within(&mut self, byte: u8, begi: usize, endi: usize) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/lib.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | //! is appending/prepending. (n, p, a is the number of input/prepended/appended [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 20 | //! is appending/prepending. (n, p, a is the number of input/prepended/appended [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/lib.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | //! bytes respectively) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 21 | //! bytes respectively) [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/auxbuf.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | / for i in 0..many_len { [INFO] [stdout] 46 | | self.inner[begi + i] = bytes[i]; [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.inner[begi..(many_len + begi)].copy_from_slice(&bytes[..many_len]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/auxbuf.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / for i in begi..begi + prep_len { [INFO] [stdout] 60 | | self.inner[i] = prep_bytes[i - begi]; [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.inner[begi..(begi + prep_len)].copy_from_slice(&prep_bytes[..(begi + prep_len - begi)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/auxbuf.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | &self.inner [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/auxbuf.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | &self.inner [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/wrapper.rs:137:22 [INFO] [stdout] | [INFO] [stdout] 137 | let bf_len = self.before.as_bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.before.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wrapper.rs:197:16 [INFO] [stdout] | [INFO] [stdout] 197 | if is_last_cp [INFO] [stdout] | ________________^ [INFO] [stdout] 198 | | || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [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] 197 - if is_last_cp [INFO] [stdout] 198 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 197 + if !(!is_last_cp && bf_bytes[ci] >= 0b10000000 && bf_bytes[ci] < 0b11000000) [INFO] [stdout] | [INFO] [stdout] 197 - if is_last_cp [INFO] [stdout] 198 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 197 + if is_last_cp || bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `expect` on `append_str` after checking its variant with `is_none` [INFO] [stdout] --> src/wrapper.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 162 | let append_str = if append_str.is_none() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = append_str` [INFO] [stdout] ... [INFO] [stdout] 165 | append_str.expect("bug") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ci` is used to index `bf_bytes` [INFO] [stdout] --> src/wrapper.rs:194:19 [INFO] [stdout] | [INFO] [stdout] 194 | for ci in 1..bf_len + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 194 - for ci in 1..bf_len + 1 { [INFO] [stdout] 194 + for (ci, ) in bf_bytes.iter().enumerate().skip(1).take(bf_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/wrapper.rs:243:17 [INFO] [stdout] | [INFO] [stdout] 243 | / { [INFO] [stdout] 244 | | width_seen -= 1; [INFO] [stdout] 245 | | width_buried += 1; [INFO] [stdout] 246 | | } else if enl_pref == TrimTrailSpc [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/wrapper.rs:249:17 [INFO] [stdout] | [INFO] [stdout] 249 | / { [INFO] [stdout] 250 | | width_seen -= 1; [INFO] [stdout] 251 | | width_buried += 1; [INFO] [stdout] 252 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wrapper.rs:322:16 [INFO] [stdout] | [INFO] [stdout] 322 | if is_last_cp [INFO] [stdout] | ________________^ [INFO] [stdout] 323 | | || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [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] help: try [INFO] [stdout] | [INFO] [stdout] 322 - if is_last_cp [INFO] [stdout] 323 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 322 + if !(!is_last_cp && bf_bytes[ci] >= 0b10000000 && bf_bytes[ci] < 0b11000000) [INFO] [stdout] | [INFO] [stdout] 322 - if is_last_cp [INFO] [stdout] 323 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 322 + if is_last_cp || bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `expect` on `prepend_str` after checking its variant with `is_none` [INFO] [stdout] --> src/wrapper.rs:283:13 [INFO] [stdout] | [INFO] [stdout] 280 | let prepend_str = if prepend_str.is_none() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = prepend_str` [INFO] [stdout] ... [INFO] [stdout] 283 | prepend_str.expect("bug") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `expect` on `append_str` after checking its variant with `is_none` [INFO] [stdout] --> src/wrapper.rs:289:13 [INFO] [stdout] | [INFO] [stdout] 286 | let append_str = if append_str.is_none() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = append_str` [INFO] [stdout] ... [INFO] [stdout] 289 | append_str.expect("bug") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wrapper.rs:297:22 [INFO] [stdout] | [INFO] [stdout] 297 | + if prepend_str.len() == 0 && append_str.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `prepend_str.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: length comparison to zero [INFO] [stdout] --> src/wrapper.rs:297:48 [INFO] [stdout] | [INFO] [stdout] 297 | + if prepend_str.len() == 0 && append_str.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `append_str.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/wrapper.rs:301:21 [INFO] [stdout] | [INFO] [stdout] 301 | bf_len * 1 + bf_len * prepend_str.len() + bf_len * append_str.len() [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `bf_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ci` is used to index `bf_bytes` [INFO] [stdout] --> src/wrapper.rs:319:19 [INFO] [stdout] | [INFO] [stdout] 319 | for ci in 1..bf_len + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 319 - for ci in 1..bf_len + 1 { [INFO] [stdout] 319 + for (ci, ) in bf_bytes.iter().enumerate().skip(1).take(bf_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `push_within` is never used [INFO] [stdout] --> src/auxbuf.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 19 | impl<'a> ByteSlcBuf<'a> { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 50 | pub(crate) fn push_within(&mut self, byte: u8, begi: usize, endi: usize) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/lib.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | //! is appending/prepending. (n, p, a is the number of input/prepended/appended [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 20 | //! is appending/prepending. (n, p, a is the number of input/prepended/appended [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/lib.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | //! bytes respectively) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 21 | //! bytes respectively) [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/auxbuf.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | / for i in 0..many_len { [INFO] [stdout] 46 | | self.inner[begi + i] = bytes[i]; [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.inner[begi..(many_len + begi)].copy_from_slice(&bytes[..many_len]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/auxbuf.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / for i in begi..begi + prep_len { [INFO] [stdout] 60 | | self.inner[i] = prep_bytes[i - begi]; [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.inner[begi..(begi + prep_len)].copy_from_slice(&prep_bytes[..(begi + prep_len - begi)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/auxbuf.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | &self.inner [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/auxbuf.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | &self.inner [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/wrapper.rs:137:22 [INFO] [stdout] | [INFO] [stdout] 137 | let bf_len = self.before.as_bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.before.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wrapper.rs:197:16 [INFO] [stdout] | [INFO] [stdout] 197 | if is_last_cp [INFO] [stdout] | ________________^ [INFO] [stdout] 198 | | || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [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] 197 - if is_last_cp [INFO] [stdout] 198 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 197 + if !(!is_last_cp && bf_bytes[ci] >= 0b10000000 && bf_bytes[ci] < 0b11000000) [INFO] [stdout] | [INFO] [stdout] 197 - if is_last_cp [INFO] [stdout] 198 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 197 + if is_last_cp || bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `expect` on `append_str` after checking its variant with `is_none` [INFO] [stdout] --> src/wrapper.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 162 | let append_str = if append_str.is_none() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = append_str` [INFO] [stdout] ... [INFO] [stdout] 165 | append_str.expect("bug") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ci` is used to index `bf_bytes` [INFO] [stdout] --> src/wrapper.rs:194:19 [INFO] [stdout] | [INFO] [stdout] 194 | for ci in 1..bf_len + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 194 - for ci in 1..bf_len + 1 { [INFO] [stdout] 194 + for (ci, ) in bf_bytes.iter().enumerate().skip(1).take(bf_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/wrapper.rs:243:17 [INFO] [stdout] | [INFO] [stdout] 243 | / { [INFO] [stdout] 244 | | width_seen -= 1; [INFO] [stdout] 245 | | width_buried += 1; [INFO] [stdout] 246 | | } else if enl_pref == TrimTrailSpc [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/wrapper.rs:249:17 [INFO] [stdout] | [INFO] [stdout] 249 | / { [INFO] [stdout] 250 | | width_seen -= 1; [INFO] [stdout] 251 | | width_buried += 1; [INFO] [stdout] 252 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wrapper.rs:322:16 [INFO] [stdout] | [INFO] [stdout] 322 | if is_last_cp [INFO] [stdout] | ________________^ [INFO] [stdout] 323 | | || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [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] help: try [INFO] [stdout] | [INFO] [stdout] 322 - if is_last_cp [INFO] [stdout] 323 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 322 + if !(!is_last_cp && bf_bytes[ci] >= 0b10000000 && bf_bytes[ci] < 0b11000000) [INFO] [stdout] | [INFO] [stdout] 322 - if is_last_cp [INFO] [stdout] 323 - || (!is_last_cp && (bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000)) [INFO] [stdout] 322 + if is_last_cp || bf_bytes[ci] < 0b10000000 || bf_bytes[ci] >= 0b11000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `expect` on `prepend_str` after checking its variant with `is_none` [INFO] [stdout] --> src/wrapper.rs:283:13 [INFO] [stdout] | [INFO] [stdout] 280 | let prepend_str = if prepend_str.is_none() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = prepend_str` [INFO] [stdout] ... [INFO] [stdout] 283 | prepend_str.expect("bug") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `expect` on `append_str` after checking its variant with `is_none` [INFO] [stdout] --> src/wrapper.rs:289:13 [INFO] [stdout] | [INFO] [stdout] 286 | let append_str = if append_str.is_none() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = append_str` [INFO] [stdout] ... [INFO] [stdout] 289 | append_str.expect("bug") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wrapper.rs:297:22 [INFO] [stdout] | [INFO] [stdout] 297 | + if prepend_str.len() == 0 && append_str.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `prepend_str.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: length comparison to zero [INFO] [stdout] --> src/wrapper.rs:297:48 [INFO] [stdout] | [INFO] [stdout] 297 | + if prepend_str.len() == 0 && append_str.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `append_str.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/wrapper.rs:301:21 [INFO] [stdout] | [INFO] [stdout] 301 | bf_len * 1 + bf_len * prepend_str.len() + bf_len * append_str.len() [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `bf_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ci` is used to index `bf_bytes` [INFO] [stdout] --> src/wrapper.rs:319:19 [INFO] [stdout] | [INFO] [stdout] 319 | for ci in 1..bf_len + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 319 - for ci in 1..bf_len + 1 { [INFO] [stdout] 319 + for (ci, ) in bf_bytes.iter().enumerate().skip(1).take(bf_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bwrap::Result` [INFO] [stdout] --> tests/usestd_maybrk.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use bwrap::Result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bwrap::WrapStyle` [INFO] [stdout] --> tests/usestd_maybrk.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use bwrap::WrapStyle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bwrap::ExistNlPref` [INFO] [stdout] --> tests/usestd_nobrk_append.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use bwrap::ExistNlPref; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bwrap::Result` [INFO] [stdout] --> tests/usestd_nobrk_append.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use bwrap::Result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bwrap::WrapStyle` [INFO] [stdout] --> tests/usestd_nobrk_append.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use bwrap::WrapStyle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bwrap::Result` [INFO] [stdout] --> tests/usestd_maybrk_prepend.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use bwrap::Result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bwrap::WrapStyle` [INFO] [stdout] --> tests/usestd_maybrk_prepend.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use bwrap::WrapStyle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.08s [INFO] running `Command { std: "docker" "inspect" "e02081c96e3844d3b1ed8c2fea36d21c6b61a035b774f1a085f1a430ac211d5f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e02081c96e3844d3b1ed8c2fea36d21c6b61a035b774f1a085f1a430ac211d5f", kill_on_drop: false }` [INFO] [stdout] e02081c96e3844d3b1ed8c2fea36d21c6b61a035b774f1a085f1a430ac211d5f