[INFO] crate particles 0.1.0 is already in cache [INFO] extracting crate particles 0.1.0 into work/ex/clippy-test-run/sources/stable/reg/particles/0.1.0 [INFO] extracting crate particles 0.1.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/particles/0.1.0 [INFO] validating manifest of particles-0.1.0 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 particles-0.1.0 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 particles-0.1.0 [INFO] finished frobbing particles-0.1.0 [INFO] frobbed toml for particles-0.1.0 written to work/ex/clippy-test-run/sources/stable/reg/particles/0.1.0/Cargo.toml [INFO] started frobbing particles-0.1.0 [INFO] finished frobbing particles-0.1.0 [INFO] frobbed toml for particles-0.1.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/particles/0.1.0/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 particles-0.1.0 against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-6/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/particles/0.1.0:/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 -Dclippy::into_iter_on_array" "-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] 68bf14026be509a05234872a3011c7cc4fc666b1b03f27694b464880c3bb9ca2 [INFO] running `"docker" "start" "-a" "68bf14026be509a05234872a3011c7cc4fc666b1b03f27694b464880c3bb9ca2"` [INFO] [stderr] Checking particles v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/particles.rs:63:13 [INFO] [stderr] | [INFO] [stderr] 63 | config: config, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `config` [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/particles.rs:145:17 [INFO] [stderr] | [INFO] [stderr] 145 | opacity: opacity [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `opacity` [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/particles.rs:150:13 [INFO] [stderr] | [INFO] [stderr] 150 | nodes: nodes, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `nodes` [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/particles.rs:151:13 [INFO] [stderr] | [INFO] [stderr] 151 | edges: edges [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `edges` [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/particles.rs:161:13 [INFO] [stderr] | [INFO] [stderr] 161 | x: x, [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/particles.rs:162:13 [INFO] [stderr] | [INFO] [stderr] 162 | y: y, [INFO] [stderr] | ^^^^ help: replace it with: `y` [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/particles.rs:194:17 [INFO] [stderr] | [INFO] [stderr] 194 | left: left, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `left` [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/particles.rs:195:17 [INFO] [stderr] | [INFO] [stderr] 195 | right: right [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `right` [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/particles_api.rs:12:9 [INFO] [stderr] | [INFO] [stderr] 12 | height: height, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `height` [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/particles_api.rs:13:9 [INFO] [stderr] | [INFO] [stderr] 13 | width: width, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `width` [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/particles_api.rs:14:9 [INFO] [stderr] | [INFO] [stderr] 14 | n_particles: n_particles, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_particles` [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/particles_api.rs:15:9 [INFO] [stderr] | [INFO] [stderr] 15 | max_edge_len: max_edge_len, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_edge_len` [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/particles_api.rs:16:9 [INFO] [stderr] | [INFO] [stderr] 16 | velocity_factor: velocity_factor [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `velocity_factor` [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/particles.rs:63:13 [INFO] [stderr] | [INFO] [stderr] 63 | config: config, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `config` [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/particles.rs:145:17 [INFO] [stderr] | [INFO] [stderr] 145 | opacity: opacity [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `opacity` [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/particles.rs:150:13 [INFO] [stderr] | [INFO] [stderr] 150 | nodes: nodes, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `nodes` [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/particles.rs:151:13 [INFO] [stderr] | [INFO] [stderr] 151 | edges: edges [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `edges` [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/particles.rs:161:13 [INFO] [stderr] | [INFO] [stderr] 161 | x: x, [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/particles.rs:162:13 [INFO] [stderr] | [INFO] [stderr] 162 | y: y, [INFO] [stderr] | ^^^^ help: replace it with: `y` [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/particles.rs:194:17 [INFO] [stderr] | [INFO] [stderr] 194 | left: left, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `left` [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/particles.rs:195:17 [INFO] [stderr] | [INFO] [stderr] 195 | right: right [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `right` [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/particles_api.rs:12:9 [INFO] [stderr] | [INFO] [stderr] 12 | height: height, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `height` [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/particles_api.rs:13:9 [INFO] [stderr] | [INFO] [stderr] 13 | width: width, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `width` [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/particles_api.rs:14:9 [INFO] [stderr] | [INFO] [stderr] 14 | n_particles: n_particles, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_particles` [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/particles_api.rs:15:9 [INFO] [stderr] | [INFO] [stderr] 15 | max_edge_len: max_edge_len, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_edge_len` [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/particles_api.rs:16:9 [INFO] [stderr] | [INFO] [stderr] 16 | velocity_factor: velocity_factor [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `velocity_factor` [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: this if statement can be collapsed [INFO] [stderr] --> src/particles.rs:111:17 [INFO] [stderr] | [INFO] [stderr] 111 | / if left_particle.euclidean_distance(right_particle) < self.config.max_edge_len { [INFO] [stderr] 112 | | if imports::rand01() > 0.5 { [INFO] [stderr] 113 | | edges.insert(Edge::new(left, right)); [INFO] [stderr] 114 | | } [INFO] [stderr] 115 | | } [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 111 | if left_particle.euclidean_distance(right_particle) < self.config.max_edge_len && imports::rand01() > 0.5 { [INFO] [stderr] 112 | edges.insert(Edge::new(left, right)); [INFO] [stderr] 113 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/glue.rs:38:17 [INFO] [stderr] | [INFO] [stderr] 38 | for i in 0..10000000 { [INFO] [stderr] | ^^^^^^^^ help: consider: `10_000_000` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/particles.rs:111:17 [INFO] [stderr] | [INFO] [stderr] 111 | / if left_particle.euclidean_distance(right_particle) < self.config.max_edge_len { [INFO] [stderr] 112 | | if imports::rand01() > 0.5 { [INFO] [stderr] 113 | | edges.insert(Edge::new(left, right)); [INFO] [stderr] 114 | | } [INFO] [stderr] 115 | | } [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 111 | if left_particle.euclidean_distance(right_particle) < self.config.max_edge_len && imports::rand01() > 0.5 { [INFO] [stderr] 112 | edges.insert(Edge::new(left, right)); [INFO] [stderr] 113 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] error: unsafe vector initialization [INFO] [stderr] --> src/glue.rs:13:5 [INFO] [stderr] | [INFO] [stderr] 12 | let mut v: Vec = Vec::with_capacity(len + ptr_size); [INFO] [stderr] | ---------------------------------- help: consider replace allocation with: `vec![0; len + ptr_size]` [INFO] [stderr] 13 | v.set_len(len + ptr_size); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unsafe_vector_initialization)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unsafe_vector_initialization [INFO] [stderr] [INFO] [stderr] error: casting from `*mut u8` to a more-strictly-aligned pointer (`*mut usize`) [INFO] [stderr] --> src/glue.rs:17:6 [INFO] [stderr] | [INFO] [stderr] 17 | *(&mut v[0] as *mut u8 as *mut usize) = len; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::cast_ptr_alignment)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment [INFO] [stderr] [INFO] [stderr] error: casting from `*const u8` to a more-strictly-aligned pointer (`*const usize`) [INFO] [stderr] --> src/glue.rs:29:16 [INFO] [stderr] | [INFO] [stderr] 29 | let len = *(mem as *const u8 as *const usize); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment [INFO] [stderr] [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/particles.rs:171:108 [INFO] [stderr] | [INFO] [stderr] 171 | } else if self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len { [INFO] [stderr] | ____________________________________________________________________________________________________________^ [INFO] [stderr] 172 | | true [INFO] [stderr] 173 | | } else { [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/particles.rs:169:102 [INFO] [stderr] | [INFO] [stderr] 169 | if self.x < 0.0 - config.max_edge_len || self.x > config.height as f64 + config.max_edge_len { [INFO] [stderr] | ______________________________________________________________________________________________________^ [INFO] [stderr] 170 | | true [INFO] [stderr] 171 | | } else if self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len { [INFO] [stderr] | |_________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/particles.rs:171:16 [INFO] [stderr] | [INFO] [stderr] 171 | } else if self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len { [INFO] [stderr] | ________________^ [INFO] [stderr] 172 | | true [INFO] [stderr] 173 | | } else { [INFO] [stderr] 174 | | false [INFO] [stderr] 175 | | } [INFO] [stderr] | |_________^ help: you can reduce it to: `self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/particles_api.rs:30:41 [INFO] [stderr] | [INFO] [stderr] 30 | let config = unsafe { Box::from_raw(config) }; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::not_unsafe_ptr_arg_deref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/particles_api.rs:85:8 [INFO] [stderr] | [INFO] [stderr] 85 | if rendered.nodes.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `rendered.nodes.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/particles_api.rs:96:8 [INFO] [stderr] | [INFO] [stderr] 96 | if rendered.edges.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `rendered.edges.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: unsafe vector initialization [INFO] [stderr] --> src/glue.rs:13:5 [INFO] [stderr] | [INFO] [stderr] 12 | let mut v: Vec = Vec::with_capacity(len + ptr_size); [INFO] [stderr] | ---------------------------------- help: consider replace allocation with: `vec![0; len + ptr_size]` [INFO] [stderr] 13 | v.set_len(len + ptr_size); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unsafe_vector_initialization)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unsafe_vector_initialization [INFO] [stderr] [INFO] [stderr] error: casting from `*mut u8` to a more-strictly-aligned pointer (`*mut usize`) [INFO] [stderr] --> src/glue.rs:17:6 [INFO] [stderr] | [INFO] [stderr] 17 | *(&mut v[0] as *mut u8 as *mut usize) = len; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::cast_ptr_alignment)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment [INFO] [stderr] [INFO] [stderr] error: casting from `*const u8` to a more-strictly-aligned pointer (`*const usize`) [INFO] [stderr] --> src/glue.rs:29:16 [INFO] [stderr] | [INFO] [stderr] 29 | let len = *(mem as *const u8 as *const usize); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment [INFO] [stderr] [INFO] [stderr] error: aborting due to 5 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `particles`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/particles.rs:171:108 [INFO] [stderr] | [INFO] [stderr] 171 | } else if self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len { [INFO] [stderr] | ____________________________________________________________________________________________________________^ [INFO] [stderr] 172 | | true [INFO] [stderr] 173 | | } else { [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/particles.rs:169:102 [INFO] [stderr] | [INFO] [stderr] 169 | if self.x < 0.0 - config.max_edge_len || self.x > config.height as f64 + config.max_edge_len { [INFO] [stderr] | ______________________________________________________________________________________________________^ [INFO] [stderr] 170 | | true [INFO] [stderr] 171 | | } else if self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len { [INFO] [stderr] | |_________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/particles.rs:171:16 [INFO] [stderr] | [INFO] [stderr] 171 | } else if self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len { [INFO] [stderr] | ________________^ [INFO] [stderr] 172 | | true [INFO] [stderr] 173 | | } else { [INFO] [stderr] 174 | | false [INFO] [stderr] 175 | | } [INFO] [stderr] | |_________^ help: you can reduce it to: `self.y < 0.0 - config.max_edge_len || self.y > config.width as f64 + config.max_edge_len` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/particles_api.rs:30:41 [INFO] [stderr] | [INFO] [stderr] 30 | let config = unsafe { Box::from_raw(config) }; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::not_unsafe_ptr_arg_deref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/particles_api.rs:85:8 [INFO] [stderr] | [INFO] [stderr] 85 | if rendered.nodes.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `rendered.nodes.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/particles_api.rs:96:8 [INFO] [stderr] | [INFO] [stderr] 96 | if rendered.edges.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `rendered.edges.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: aborting due to 5 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `particles`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "68bf14026be509a05234872a3011c7cc4fc666b1b03f27694b464880c3bb9ca2"` [INFO] running `"docker" "rm" "-f" "68bf14026be509a05234872a3011c7cc4fc666b1b03f27694b464880c3bb9ca2"` [INFO] [stdout] 68bf14026be509a05234872a3011c7cc4fc666b1b03f27694b464880c3bb9ca2