[INFO] crate idcontain 0.7.5 is already in cache [INFO] extracting crate idcontain 0.7.5 into work/ex/clippy-test-run/sources/stable/reg/idcontain/0.7.5 [INFO] extracting crate idcontain 0.7.5 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/idcontain/0.7.5 [INFO] validating manifest of idcontain-0.7.5 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of idcontain-0.7.5 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing idcontain-0.7.5 [INFO] finished frobbing idcontain-0.7.5 [INFO] frobbed toml for idcontain-0.7.5 written to work/ex/clippy-test-run/sources/stable/reg/idcontain/0.7.5/Cargo.toml [INFO] started frobbing idcontain-0.7.5 [INFO] finished frobbing idcontain-0.7.5 [INFO] frobbed toml for idcontain-0.7.5 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/idcontain/0.7.5/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting idcontain-0.7.5 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/idcontain/0.7.5:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] c0caf27a8813ef6afae928068d46c8fab155668596be2940915c4f5de0616ef3 [INFO] running `"docker" "start" "-a" "c0caf27a8813ef6afae928068d46c8fab155668596be2940915c4f5de0616ef3"` [INFO] [stderr] Checking idcontain v0.7.5 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:126:13 [INFO] [stderr] | [INFO] [stderr] 126 | seed_tag: seed_tag, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `seed_tag` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:297:72 [INFO] [stderr] | [INFO] [stderr] 297 | match mem::replace(&mut tagged_slot.slot, Slot::Occupied { value: value }) { [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:303:17 [INFO] [stderr] | [INFO] [stderr] 303 | index: index, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:309:40 [INFO] [stderr] | [INFO] [stderr] 309 | slot: Slot::Occupied { value: value }, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:539:21 [INFO] [stderr] | [INFO] [stderr] 539 | index: index, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:540:21 [INFO] [stderr] | [INFO] [stderr] 540 | tag: tag, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `tag` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:126:13 [INFO] [stderr] | [INFO] [stderr] 126 | seed_tag: seed_tag, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `seed_tag` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:297:72 [INFO] [stderr] | [INFO] [stderr] 297 | match mem::replace(&mut tagged_slot.slot, Slot::Occupied { value: value }) { [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:303:17 [INFO] [stderr] | [INFO] [stderr] 303 | index: index, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:309:40 [INFO] [stderr] | [INFO] [stderr] 309 | slot: Slot::Occupied { value: value }, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:539:21 [INFO] [stderr] | [INFO] [stderr] 539 | index: index, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/slab.rs:540:21 [INFO] [stderr] | [INFO] [stderr] 540 | tag: tag, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `tag` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: lint name `expl_impl_clone_on_copy` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore [INFO] [stderr] --> src/id.rs:120:44 [INFO] [stderr] | [INFO] [stderr] 120 | #[cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::expl_impl_clone_on_copy` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(renamed_and_removed_lints)] on by default [INFO] [stderr] [INFO] [stderr] warning: lint name `expl_impl_clone_on_copy` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore [INFO] [stderr] --> src/option.rs:221:44 [INFO] [stderr] | [INFO] [stderr] 221 | #[cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::expl_impl_clone_on_copy` [INFO] [stderr] [INFO] [stderr] warning: lint name `expl_impl_clone_on_copy` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore [INFO] [stderr] --> src/id.rs:120:44 [INFO] [stderr] | [INFO] [stderr] 120 | #[cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::expl_impl_clone_on_copy` [INFO] [stderr] [INFO] [stderr] warning: lint name `expl_impl_clone_on_copy` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore [INFO] [stderr] --> src/id.rs:120:44 [INFO] [stderr] | [INFO] [stderr] 120 | #[cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::expl_impl_clone_on_copy` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(renamed_and_removed_lints)] on by default [INFO] [stderr] [INFO] [stderr] warning: lint name `expl_impl_clone_on_copy` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore [INFO] [stderr] --> src/option.rs:221:44 [INFO] [stderr] | [INFO] [stderr] 221 | #[cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::expl_impl_clone_on_copy` [INFO] [stderr] [INFO] [stderr] warning: immediately dereferencing a reference [INFO] [stderr] --> src/slab.rs:818:20 [INFO] [stderr] | [INFO] [stderr] 818 | assert_eq!(*(&id_slab[id_a]), 1); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `id_slab[id_a]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::deref_addrof)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stderr] [INFO] [stderr] warning: immediately dereferencing a reference [INFO] [stderr] --> src/slab.rs:819:20 [INFO] [stderr] | [INFO] [stderr] 819 | assert_eq!(*(&id_slab[id_b]), 2); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `id_slab[id_b]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stderr] [INFO] [stderr] warning: immediately dereferencing a reference [INFO] [stderr] --> src/slab.rs:820:20 [INFO] [stderr] | [INFO] [stderr] 820 | assert_eq!(*(&id_slab[id_c]), 3); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `id_slab[id_c]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stderr] [INFO] [stderr] warning: immediately dereferencing a reference [INFO] [stderr] --> src/slab.rs:823:20 [INFO] [stderr] | [INFO] [stderr] 823 | assert_eq!(*(&mut id_slab[id_a]), 1); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `id_slab[id_a]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stderr] [INFO] [stderr] warning: immediately dereferencing a reference [INFO] [stderr] --> src/slab.rs:824:20 [INFO] [stderr] | [INFO] [stderr] 824 | assert_eq!(*(&mut id_slab[id_b]), 2); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `id_slab[id_b]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stderr] [INFO] [stderr] warning: immediately dereferencing a reference [INFO] [stderr] --> src/slab.rs:825:20 [INFO] [stderr] | [INFO] [stderr] 825 | assert_eq!(*(&mut id_slab[id_c]), 3); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `id_slab[id_c]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/map.rs:106:9 [INFO] [stderr] | [INFO] [stderr] 106 | reverse_lookup.get(usize_lookup_index).map( [INFO] [stderr] | _________^ [INFO] [stderr] | |_________| [INFO] [stderr] | || [INFO] [stderr] 107 | || |&reverse_index| { [INFO] [stderr] 108 | || lookup[reverse_index as usize].index = lookup_index [INFO] [stderr] 109 | || }, [INFO] [stderr] 110 | || ); [INFO] [stderr] | ||_________^- help: try this: `if let Some(&reverse_index) = reverse_lookup.get(usize_lookup_index) { ... }` [INFO] [stderr] | |__________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/map.rs:127:9 [INFO] [stderr] | [INFO] [stderr] 127 | reverse_lookup.get(index).map(|&reverse_index| { [INFO] [stderr] | _________^ [INFO] [stderr] | |_________| [INFO] [stderr] | || [INFO] [stderr] 128 | || lookup[reverse_index as usize].index = index as u32; [INFO] [stderr] 129 | || }); [INFO] [stderr] | ||__________^- help: try this: `if let Some(&reverse_index) = reverse_lookup.get(index) { lookup[reverse_index as usize].index = index as u32; }` [INFO] [stderr] | |___________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:48:20 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn is_none(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:53:20 [INFO] [stderr] | [INFO] [stderr] 53 | pub fn is_some(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:58:19 [INFO] [stderr] | [INFO] [stderr] 58 | pub fn as_ref(&self) -> Option<&Id> { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:138:17 [INFO] [stderr] | [INFO] [stderr] 138 | pub fn iter(&self) -> OptionIntoIter<&Id> { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: lint name `expl_impl_clone_on_copy` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore [INFO] [stderr] --> src/id.rs:120:44 [INFO] [stderr] | [INFO] [stderr] 120 | #[cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::expl_impl_clone_on_copy` [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/map.rs:106:9 [INFO] [stderr] | [INFO] [stderr] 106 | reverse_lookup.get(usize_lookup_index).map( [INFO] [stderr] | _________^ [INFO] [stderr] | |_________| [INFO] [stderr] | || [INFO] [stderr] 107 | || |&reverse_index| { [INFO] [stderr] 108 | || lookup[reverse_index as usize].index = lookup_index [INFO] [stderr] 109 | || }, [INFO] [stderr] 110 | || ); [INFO] [stderr] | ||_________^- help: try this: `if let Some(&reverse_index) = reverse_lookup.get(usize_lookup_index) { ... }` [INFO] [stderr] | |__________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/map.rs:127:9 [INFO] [stderr] | [INFO] [stderr] 127 | reverse_lookup.get(index).map(|&reverse_index| { [INFO] [stderr] | _________^ [INFO] [stderr] | |_________| [INFO] [stderr] | || [INFO] [stderr] 128 | || lookup[reverse_index as usize].index = index as u32; [INFO] [stderr] 129 | || }); [INFO] [stderr] | ||__________^- help: try this: `if let Some(&reverse_index) = reverse_lookup.get(index) { lookup[reverse_index as usize].index = index as u32; }` [INFO] [stderr] | |___________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/map.rs:270:20 [INFO] [stderr] | [INFO] [stderr] 270 | assert_eq!(map.get_mut(id1).map(|x| *x), Some(1)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `map.get_mut(id1).cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/map.rs:271:20 [INFO] [stderr] | [INFO] [stderr] 271 | assert_eq!(map.get_mut(id2).map(|x| *x), Some(2)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `map.get_mut(id2).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/map.rs:288:20 [INFO] [stderr] | [INFO] [stderr] 288 | assert_eq!(map.get_mut(id3).map(|x| *x), Some(3)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `map.get_mut(id3).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/map.rs:289:20 [INFO] [stderr] | [INFO] [stderr] 289 | assert_eq!(map.get_mut(id4).map(|x| *x), Some(4)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `map.get_mut(id4).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:48:20 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn is_none(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:53:20 [INFO] [stderr] | [INFO] [stderr] 53 | pub fn is_some(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:58:19 [INFO] [stderr] | [INFO] [stderr] 58 | pub fn as_ref(&self) -> Option<&Id> { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/option.rs:138:17 [INFO] [stderr] | [INFO] [stderr] 138 | pub fn iter(&self) -> OptionIntoIter<&Id> { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:808:20 [INFO] [stderr] | [INFO] [stderr] 808 | assert_eq!(id_slab.get(id_a).map(|&x| x), Some(1)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `id_slab.get(id_a).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:809:20 [INFO] [stderr] | [INFO] [stderr] 809 | assert_eq!(id_slab.get(id_b).map(|&x| x), Some(2)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `id_slab.get(id_b).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:810:20 [INFO] [stderr] | [INFO] [stderr] 810 | assert_eq!(id_slab.get(id_c).map(|&x| x), Some(3)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `id_slab.get(id_c).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:813:20 [INFO] [stderr] | [INFO] [stderr] 813 | assert_eq!(id_slab.get_mut(id_a).map(|&mut x| x), Some(1)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `id_slab.get_mut(id_a).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:814:20 [INFO] [stderr] | [INFO] [stderr] 814 | assert_eq!(id_slab.get_mut(id_b).map(|&mut x| x), Some(2)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `id_slab.get_mut(id_b).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:815:20 [INFO] [stderr] | [INFO] [stderr] 815 | assert_eq!(id_slab.get_mut(id_c).map(|&mut x| x), Some(3)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `id_slab.get_mut(id_c).cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: statement with no effect [INFO] [stderr] --> src/slab.rs:838:9 [INFO] [stderr] | [INFO] [stderr] 838 | id_slab[id]; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::no_effect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:905:14 [INFO] [stderr] | [INFO] [stderr] 905 | &id_slab.iter_mut().map(|&mut x| x).collect::>()[..], [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `id_slab.iter_mut().cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/slab.rs:914:14 [INFO] [stderr] | [INFO] [stderr] 914 | &(&mut id_slab) [INFO] [stderr] | ______________^ [INFO] [stderr] 915 | | .into_iter() [INFO] [stderr] 916 | | .map(|&mut x| x) [INFO] [stderr] | |________________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] help: Consider calling the dedicated `cloned` method [INFO] [stderr] | [INFO] [stderr] 914 | &(&mut id_slab) [INFO] [stderr] 915 | .into_iter().cloned() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 31 [INFO] [stderr] --> src/slab.rs:924:5 [INFO] [stderr] | [INFO] [stderr] 924 | / fn id_slab_ids_from_different_id_slabs() { [INFO] [stderr] 925 | | let mut id_slab_1 = IdSlab::with_capacity(3); [INFO] [stderr] 926 | | let mut id_slab_2 = IdSlab::with_capacity(4); [INFO] [stderr] 927 | | [INFO] [stderr] ... | [INFO] [stderr] 970 | | ); [INFO] [stderr] 971 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.90s [INFO] running `"docker" "inspect" "c0caf27a8813ef6afae928068d46c8fab155668596be2940915c4f5de0616ef3"` [INFO] running `"docker" "rm" "-f" "c0caf27a8813ef6afae928068d46c8fab155668596be2940915c4f5de0616ef3"` [INFO] [stdout] c0caf27a8813ef6afae928068d46c8fab155668596be2940915c4f5de0616ef3