[INFO] fetching crate rs-collections 0.1.9... [INFO] linting rs-collections-0.1.9 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate rs-collections 0.1.9 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate rs-collections 0.1.9 [INFO] finished tweaking crates.io crate rs-collections 0.1.9 [INFO] tweaked toml for crates.io crate rs-collections 0.1.9 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rs-collections 0.1.9 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Locking 4 packages to latest compatible versions [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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rs-mem v0.2.6 [INFO] [stderr] Downloaded rs-ctypes v0.1.1 [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] a4ff7f074041766e2b4044059ea8ce23c19c62bf1cf8af9cf8a8636e49a2b783 [INFO] running `Command { std: "docker" "start" "-a" "a4ff7f074041766e2b4044059ea8ce23c19c62bf1cf8af9cf8a8636e49a2b783", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a4ff7f074041766e2b4044059ea8ce23c19c62bf1cf8af9cf8a8636e49a2b783", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a4ff7f074041766e2b4044059ea8ce23c19c62bf1cf8af9cf8a8636e49a2b783", kill_on_drop: false }` [INFO] [stdout] a4ff7f074041766e2b4044059ea8ce23c19c62bf1cf8af9cf8a8636e49a2b783 [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] 4b1b8be5b94e513100c9b0cbe26b2ed733656f71708f130562ddc8ed83ab974f [INFO] running `Command { std: "docker" "start" "-a" "4b1b8be5b94e513100c9b0cbe26b2ed733656f71708f130562ddc8ed83ab974f", kill_on_drop: false }` [INFO] [stderr] Checking rs-ctypes v0.1.1 [INFO] [stderr] Checking rs-mem v0.2.6 [INFO] [stderr] Checking rs-collections v0.1.9 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/lib.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / #[allow(improper_ctypes)] [INFO] [stdout] 32 | | [INFO] [stdout] | |_^ [INFO] [stdout] 33 | pub mod hash; [INFO] [stdout] | ------------ the attribute applies to this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the attribute should apply to the crate use an inner attribute [INFO] [stdout] | [INFO] [stdout] 31 | #![allow(improper_ctypes)] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/string.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | Split { v: v, idx: 0 } [INFO] [stdout] | ^^^^ help: replace it with: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/lib.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / #[allow(improper_ctypes)] [INFO] [stdout] 32 | | [INFO] [stdout] | |_^ [INFO] [stdout] 33 | pub mod hash; [INFO] [stdout] | ------------ the attribute applies to this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the attribute should apply to the crate use an inner attribute [INFO] [stdout] | [INFO] [stdout] 31 | #![allow(improper_ctypes)] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/string.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | Split { v: v, idx: 0 } [INFO] [stdout] | ^^^^ help: replace it with: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/hashmap.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | let mut e = &mut entries[index as usize]; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/hash.rs:55:25 [INFO] [stdout] | [INFO] [stdout] 55 | let mut k = key[i + 0] as u64; [INFO] [stdout] | ^^^^^ help: consider reducing it to: `i` [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: you should consider adding a `Default` implementation for `Vec` [INFO] [stdout] --> src/vec.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn new() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | elements: ptr::null_mut(), [INFO] [stdout] 59 | | count : 0, [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 44 + impl Default for Vec { [INFO] [stdout] 45 + fn default() -> Self { [INFO] [stdout] 46 + Self::new() [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Vec` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/vec.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | pub fn len(&self) -> usize { self.count } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/vec.rs:79:34 [INFO] [stdout] | [INFO] [stdout] 79 | let v = unsafe { old_ptr.offset(i as isize).read() }; // v = old[i]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 79 - let v = unsafe { old_ptr.offset(i as isize).read() }; // v = old[i]; [INFO] [stdout] 79 + let v = unsafe { old_ptr.add(i).read() }; // v = old[i]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/vec.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | unsafe { new_ptr.offset(i as isize).write(v) }; // new[i] = v; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 80 - unsafe { new_ptr.offset(i as isize).write(v) }; // new[i] = v; [INFO] [stdout] 80 + unsafe { new_ptr.add(i).write(v) }; // new[i] = v; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/vec.rs:87:18 [INFO] [stdout] | [INFO] [stdout] 87 | unsafe { self.elements.offset(self.count as isize).write(t) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 87 - unsafe { self.elements.offset(self.count as isize).write(t) }; [INFO] [stdout] 87 + unsafe { self.elements.add(self.count).write(t) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/hashmap.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | let mut e = &mut entries[index as usize]; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `arr` [INFO] [stdout] --> src/vec.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | for i in 0..self.count { [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 [INFO] [stdout] | [INFO] [stdout] 115 - for i in 0..self.count { [INFO] [stdout] 115 + for in arr.iter().take(self.count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/vec.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | arr.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/vec.rs:136:25 [INFO] [stdout] | [INFO] [stdout] 136 | self.as_slice().into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice` [INFO] [stdout] --> src/vec.rs:140:29 [INFO] [stdout] | [INFO] [stdout] 140 | self.as_mut_slice().into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/vec.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | / loop { [INFO] [stdout] 171 | | match it.next() { [INFO] [stdout] 172 | | Some(r) => v.push(r), [INFO] [stdout] 173 | | None => break, [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(r) = it.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `T` which implements the `Copy` trait [INFO] [stdout] --> src/vec.rs:188:23 [INFO] [stdout] | [INFO] [stdout] 188 | self.push(e.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HashMap` [INFO] [stdout] --> src/hashmap.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | / pub fn new() -> Self { [INFO] [stdout] 54 | | Self { [INFO] [stdout] 55 | | table : Unique::new(ptr::null_mut()), [INFO] [stdout] 56 | | count : 0, [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 52 + impl Default for HashMap { [INFO] [stdout] 53 + fn default() -> Self { [INFO] [stdout] 54 + Self::new() [INFO] [stdout] 55 + } [INFO] [stdout] 56 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/hashmap.rs:210:23 [INFO] [stdout] | [INFO] [stdout] 210 | if ! ((index <= original_index && original_index < empty_index) [INFO] [stdout] | _______________________^ [INFO] [stdout] 211 | | || (original_index < empty_index && empty_index < index) [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] 210 - if ! ((index <= original_index && original_index < empty_index) [INFO] [stdout] 211 - || (original_index < empty_index && empty_index < index) [INFO] [stdout] 210 + if ! (!(original_index >= empty_index || index > original_index && empty_index >= index) [INFO] [stdout] | [INFO] [stdout] 210 - if ! ((index <= original_index && original_index < empty_index) [INFO] [stdout] 211 - || (original_index < empty_index && empty_index < index) [INFO] [stdout] 210 + if ! ((empty_index < index || index <= original_index) && original_index < empty_index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `String` [INFO] [stdout] --> src/string.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn new() -> Self { Self { data: Vec::new() } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for String { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/hash.rs:55:25 [INFO] [stdout] | [INFO] [stdout] 55 | let mut k = key[i + 0] as u64; [INFO] [stdout] | ^^^^^ help: consider reducing it to: `i` [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: struct `String` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/string.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn len(&self) -> usize { self.data.len() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/string.rs:58:28 [INFO] [stdout] | [INFO] [stdout] 58 | if st.as_str().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!st.as_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: you should consider adding a `Default` implementation for `Vec` [INFO] [stdout] --> src/vec.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn new() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | elements: ptr::null_mut(), [INFO] [stdout] 59 | | count : 0, [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 44 + impl Default for Vec { [INFO] [stdout] 45 + fn default() -> Self { [INFO] [stdout] 46 + Self::new() [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/string.rs:69:28 [INFO] [stdout] | [INFO] [stdout] 69 | if st.as_str().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!st.as_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: the loop variable `i` is used to index `ob` [INFO] [stdout] --> src/string.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | for i in 0..self.data.len() { [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] 147 - for i in 0..self.data.len() { [INFO] [stdout] 147 + for (i, ) in ob.iter().enumerate().take(self.data.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Vec` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/vec.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | pub fn len(&self) -> usize { self.count } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/vec.rs:79:34 [INFO] [stdout] | [INFO] [stdout] 79 | let v = unsafe { old_ptr.offset(i as isize).read() }; // v = old[i]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 79 - let v = unsafe { old_ptr.offset(i as isize).read() }; // v = old[i]; [INFO] [stdout] 79 + let v = unsafe { old_ptr.add(i).read() }; // v = old[i]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/vec.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | unsafe { new_ptr.offset(i as isize).write(v) }; // new[i] = v; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 80 - unsafe { new_ptr.offset(i as isize).write(v) }; // new[i] = v; [INFO] [stdout] 80 + unsafe { new_ptr.add(i).write(v) }; // new[i] = v; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/vec.rs:87:18 [INFO] [stdout] | [INFO] [stdout] 87 | unsafe { self.elements.offset(self.count as isize).write(t) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 87 - unsafe { self.elements.offset(self.count as isize).write(t) }; [INFO] [stdout] 87 + unsafe { self.elements.add(self.count).write(t) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/vec.rs:135:17 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn iter(&self) -> slice::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 135 | pub fn iter(&self) -> slice::Iter<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/vec.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | pub fn iter_mut(&mut self) -> slice::IterMut { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 139 | pub fn iter_mut(&mut self) -> slice::IterMut<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `arr` [INFO] [stdout] --> src/vec.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | for i in 0..self.count { [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 [INFO] [stdout] | [INFO] [stdout] 115 - for i in 0..self.count { [INFO] [stdout] 115 + for in arr.iter().take(self.count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/vec.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | arr.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/vec.rs:136:25 [INFO] [stdout] | [INFO] [stdout] 136 | self.as_slice().into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice` [INFO] [stdout] --> src/vec.rs:140:29 [INFO] [stdout] | [INFO] [stdout] 140 | self.as_mut_slice().into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/vec.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | / loop { [INFO] [stdout] 171 | | match it.next() { [INFO] [stdout] 172 | | Some(r) => v.push(r), [INFO] [stdout] 173 | | None => break, [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(r) = it.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `T` which implements the `Copy` trait [INFO] [stdout] --> src/vec.rs:188:23 [INFO] [stdout] | [INFO] [stdout] 188 | self.push(e.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `counter` is used as a loop counter [INFO] [stdout] --> src/vec.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | for i in v.to_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (counter, i) in v.to_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HashMap` [INFO] [stdout] --> src/hashmap.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | / pub fn new() -> Self { [INFO] [stdout] 54 | | Self { [INFO] [stdout] 55 | | table : Unique::new(ptr::null_mut()), [INFO] [stdout] 56 | | count : 0, [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 52 + impl Default for HashMap { [INFO] [stdout] 53 + fn default() -> Self { [INFO] [stdout] 54 + Self::new() [INFO] [stdout] 55 + } [INFO] [stdout] 56 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/hashmap.rs:210:23 [INFO] [stdout] | [INFO] [stdout] 210 | if ! ((index <= original_index && original_index < empty_index) [INFO] [stdout] | _______________________^ [INFO] [stdout] 211 | | || (original_index < empty_index && empty_index < index) [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] 210 - if ! ((index <= original_index && original_index < empty_index) [INFO] [stdout] 211 - || (original_index < empty_index && empty_index < index) [INFO] [stdout] 210 + if ! (!(original_index >= empty_index || index > original_index && empty_index >= index) [INFO] [stdout] | [INFO] [stdout] 210 - if ! ((index <= original_index && original_index < empty_index) [INFO] [stdout] 211 - || (original_index < empty_index && empty_index < index) [INFO] [stdout] 210 + if ! ((empty_index < index || index <= original_index) && original_index < empty_index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/hashmap.rs:259:25 [INFO] [stdout] | [INFO] [stdout] 259 | None => assert!(false) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/hashmap.rs:273:21 [INFO] [stdout] | [INFO] [stdout] 273 | assert!(hm.exist(i) == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `!hm.exist(i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/hashmap.rs:281:25 [INFO] [stdout] | [INFO] [stdout] 281 | None => assert!(false) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/hashmap.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | None => assert!(false) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/hashmap.rs:295:21 [INFO] [stdout] | [INFO] [stdout] 295 | assert!(hm.exist(i) == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `!hm.exist(i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/hashmap.rs:321:25 [INFO] [stdout] | [INFO] [stdout] 321 | None => assert!(false) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `String` [INFO] [stdout] --> src/string.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn new() -> Self { Self { data: Vec::new() } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for String { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `String` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/string.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn len(&self) -> usize { self.data.len() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/string.rs:58:28 [INFO] [stdout] | [INFO] [stdout] 58 | if st.as_str().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!st.as_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/string.rs:69:28 [INFO] [stdout] | [INFO] [stdout] 69 | if st.as_str().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!st.as_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: the loop variable `i` is used to index `ob` [INFO] [stdout] --> src/string.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | for i in 0..self.data.len() { [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] 147 - for i in 0..self.data.len() { [INFO] [stdout] 147 + for (i, ) in ob.iter().enumerate().take(self.data.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/vec.rs:135:17 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn iter(&self) -> slice::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 135 | pub fn iter(&self) -> slice::Iter<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/vec.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | pub fn iter_mut(&mut self) -> slice::IterMut { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 139 | pub fn iter_mut(&mut self) -> slice::IterMut<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.52s [INFO] running `Command { std: "docker" "inspect" "4b1b8be5b94e513100c9b0cbe26b2ed733656f71708f130562ddc8ed83ab974f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4b1b8be5b94e513100c9b0cbe26b2ed733656f71708f130562ddc8ed83ab974f", kill_on_drop: false }` [INFO] [stdout] 4b1b8be5b94e513100c9b0cbe26b2ed733656f71708f130562ddc8ed83ab974f