[INFO] updating cached repository isaacazuelos/mobula [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/isaacazuelos/mobula [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/isaacazuelos/mobula" "work/ex/clippy-test-run/sources/stable/gh/isaacazuelos/mobula"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/isaacazuelos/mobula'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/isaacazuelos/mobula" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/isaacazuelos/mobula"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/isaacazuelos/mobula'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 8c5a747ea5a7a47c6fea31db513669fe428a6418 [INFO] sha for GitHub repo isaacazuelos/mobula: 8c5a747ea5a7a47c6fea31db513669fe428a6418 [INFO] validating manifest of isaacazuelos/mobula 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 isaacazuelos/mobula 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 isaacazuelos/mobula [INFO] finished frobbing isaacazuelos/mobula [INFO] frobbed toml for isaacazuelos/mobula written to work/ex/clippy-test-run/sources/stable/gh/isaacazuelos/mobula/Cargo.toml [INFO] started frobbing isaacazuelos/mobula [INFO] finished frobbing isaacazuelos/mobula [INFO] frobbed toml for isaacazuelos/mobula written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/isaacazuelos/mobula/Cargo.toml [INFO] crate isaacazuelos/mobula has a lockfile. skipping [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 isaacazuelos/mobula 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-0/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/gh/isaacazuelos/mobula:/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] b898d72834466dfc51eb9bc79cfc49ba7430966fbc4551173f8cce63cabb626f [INFO] running `"docker" "start" "-a" "b898d72834466dfc51eb9bc79cfc49ba7430966fbc4551173f8cce63cabb626f"` [INFO] [stderr] Checking mobula v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/mobula/camera.rs:46:13 [INFO] [stderr] | [INFO] [stderr] 46 | u: u, [INFO] [stderr] | ^^^^ help: replace it with: `u` [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/mobula/camera.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | v: v, [INFO] [stderr] | ^^^^ help: replace it with: `v` [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/mobula/material.rs:25:29 [INFO] [stderr] | [INFO] [stderr] 25 | fuzz: fuzz, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `fuzz` [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/mobula/material.rs:30:43 [INFO] [stderr] | [INFO] [stderr] 30 | Material::Dialectric(Dialectric { refractive_index: refractive_index }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `refractive_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/mobula/point.rs:28:17 [INFO] [stderr] | [INFO] [stderr] 28 | Point { x: x, y: y, z: z } [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/mobula/point.rs:28:23 [INFO] [stderr] | [INFO] [stderr] 28 | Point { x: x, y: y, z: z } [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/mobula/point.rs:28:29 [INFO] [stderr] | [INFO] [stderr] 28 | Point { x: x, y: y, z: z } [INFO] [stderr] | ^^^^ help: replace it with: `z` [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/mobula/ray.rs:15:13 [INFO] [stderr] | [INFO] [stderr] 15 | origin: origin, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `origin` [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/mobula/ray.rs:16:13 [INFO] [stderr] | [INFO] [stderr] 16 | direction: direction, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `direction` [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/mobula/v3.rs:17:14 [INFO] [stderr] | [INFO] [stderr] 17 | V3 { x: x, y: y, z: z } [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/mobula/v3.rs:17:20 [INFO] [stderr] | [INFO] [stderr] 17 | V3 { x: x, y: y, z: z } [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/mobula/v3.rs:17:26 [INFO] [stderr] | [INFO] [stderr] 17 | V3 { x: x, y: y, z: z } [INFO] [stderr] | ^^^^ help: replace it with: `z` [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/mobula/shape/sphere.rs:16:13 [INFO] [stderr] | [INFO] [stderr] 16 | centre: centre, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `centre` [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/mobula/shape/sphere.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | radius: radius, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `radius` [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/mobula/shape/sphere.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | material: material, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `material` [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/mobula/camera.rs:46:13 [INFO] [stderr] | [INFO] [stderr] 46 | u: u, [INFO] [stderr] | ^^^^ help: replace it with: `u` [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/mobula/camera.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | v: v, [INFO] [stderr] | ^^^^ help: replace it with: `v` [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/mobula/material.rs:25:29 [INFO] [stderr] | [INFO] [stderr] 25 | fuzz: fuzz, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `fuzz` [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/mobula/material.rs:30:43 [INFO] [stderr] | [INFO] [stderr] 30 | Material::Dialectric(Dialectric { refractive_index: refractive_index }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `refractive_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/mobula/point.rs:28:17 [INFO] [stderr] | [INFO] [stderr] 28 | Point { x: x, y: y, z: z } [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/mobula/point.rs:28:23 [INFO] [stderr] | [INFO] [stderr] 28 | Point { x: x, y: y, z: z } [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/mobula/point.rs:28:29 [INFO] [stderr] | [INFO] [stderr] 28 | Point { x: x, y: y, z: z } [INFO] [stderr] | ^^^^ help: replace it with: `z` [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/mobula/ray.rs:15:13 [INFO] [stderr] | [INFO] [stderr] 15 | origin: origin, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `origin` [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/mobula/ray.rs:16:13 [INFO] [stderr] | [INFO] [stderr] 16 | direction: direction, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `direction` [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/mobula/v3.rs:17:14 [INFO] [stderr] | [INFO] [stderr] 17 | V3 { x: x, y: y, z: z } [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/mobula/v3.rs:17:20 [INFO] [stderr] | [INFO] [stderr] 17 | V3 { x: x, y: y, z: z } [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/mobula/v3.rs:17:26 [INFO] [stderr] | [INFO] [stderr] 17 | V3 { x: x, y: y, z: z } [INFO] [stderr] | ^^^^ help: replace it with: `z` [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/mobula/shape/sphere.rs:16:13 [INFO] [stderr] | [INFO] [stderr] 16 | centre: centre, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `centre` [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/mobula/shape/sphere.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | radius: radius, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `radius` [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/mobula/shape/sphere.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | material: material, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `material` [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 argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/mobula/material.rs:100:16 [INFO] [stderr] | [INFO] [stderr] 100 | fn schlick(&self, cosine: f64) -> f64 { [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/mobula/material.rs:114:9 [INFO] [stderr] | [INFO] [stderr] 114 | / let cosine: f64; [INFO] [stderr] 115 | | [INFO] [stderr] 116 | | if ray.direction().dot(hit.normal) > 0.0 { [INFO] [stderr] 117 | | outward_normal = -hit.normal; [INFO] [stderr] ... | [INFO] [stderr] 124 | | cosine = -ray.direction().dot(hit.normal) / ray.direction().magnitude().powf(2.0); [INFO] [stderr] 125 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] help: it is more idiomatic to write [INFO] [stderr] | [INFO] [stderr] 114 | let cosine = if ray.direction().dot(hit.normal) > 0.0 { ..; self.refractive_index * ray.direction().dot(hit.normal) / [INFO] [stderr] 115 | ray.direction().magnitude().powf(2.0) } else { ..; -ray.direction().dot(hit.normal) / ray.direction().magnitude().powf(2.0) }; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/mobula/world.rs:6:27 [INFO] [stderr] | [INFO] [stderr] 6 | pub fn nearest_hit(world: &World, ray: &Ray, t_min: f64, t_max: f64) -> Option { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:42:28 [INFO] [stderr] | [INFO] [stderr] 42 | fn colour(ray: Ray, world: &World, depth: u32) -> V3 { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:85:30 [INFO] [stderr] | [INFO] [stderr] 85 | IMAGE_WIDTH as f64 / IMAGE_HEIGHT as f64, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_WIDTH)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:85:51 [INFO] [stderr] | [INFO] [stderr] 85 | IMAGE_WIDTH as f64 / IMAGE_HEIGHT as f64, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:111:17 [INFO] [stderr] | [INFO] [stderr] 111 | let u = (i as f64) / (IMAGE_WIDTH as f64); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(i)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:111:30 [INFO] [stderr] | [INFO] [stderr] 111 | let u = (i as f64) / (IMAGE_WIDTH as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_WIDTH)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:112:17 [INFO] [stderr] | [INFO] [stderr] 112 | let v = ((IMAGE_HEIGHT - j) as f64) / (IMAGE_HEIGHT as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT - j)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:112:47 [INFO] [stderr] | [INFO] [stderr] 112 | let v = ((IMAGE_HEIGHT - j) as f64) / (IMAGE_HEIGHT as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:116:52 [INFO] [stderr] | [INFO] [stderr] 116 | let h_sample = rand::random::() / (IMAGE_WIDTH as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_WIDTH)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:117:52 [INFO] [stderr] | [INFO] [stderr] --> src/mobula/material.rs:100:16 [INFO] [stderr] 117 | let v_sample = rand::random::() / (IMAGE_HEIGHT as f64); [INFO] [stderr] | [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT)` [INFO] [stderr] 100 | fn schlick(&self, cosine: f64) -> f64 { [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] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:121:27 [INFO] [stderr] | [INFO] [stderr] 121 | c = c.scale(1.0 / (SAMPLES as f64)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try: `f64::from(SAMPLES)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/mobula/material.rs:114:9 [INFO] [stderr] | [INFO] [stderr] 114 | / let cosine: f64; [INFO] [stderr] 115 | | [INFO] [stderr] 116 | | if ray.direction().dot(hit.normal) > 0.0 { [INFO] [stderr] 117 | | outward_normal = -hit.normal; [INFO] [stderr] ... | [INFO] [stderr] 124 | | cosine = -ray.direction().dot(hit.normal) / ray.direction().magnitude().powf(2.0); [INFO] [stderr] 125 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] help: it is more idiomatic to write [INFO] [stderr] | [INFO] [stderr] 114 | let cosine = if ray.direction().dot(hit.normal) > 0.0 { ..; self.refractive_index * ray.direction().dot(hit.normal) / [INFO] [stderr] 115 | ray.direction().magnitude().powf(2.0) } else { ..; -ray.direction().dot(hit.normal) / ray.direction().magnitude().powf(2.0) }; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/mobula/world.rs:6:27 [INFO] [stderr] | [INFO] [stderr] 6 | pub fn nearest_hit(world: &World, ray: &Ray, t_min: f64, t_max: f64) -> Option { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:42:28 [INFO] [stderr] | [INFO] [stderr] 42 | fn colour(ray: Ray, world: &World, depth: u32) -> V3 { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:85:30 [INFO] [stderr] | [INFO] [stderr] 85 | IMAGE_WIDTH as f64 / IMAGE_HEIGHT as f64, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_WIDTH)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:85:51 [INFO] [stderr] | [INFO] [stderr] 85 | IMAGE_WIDTH as f64 / IMAGE_HEIGHT as f64, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:111:17 [INFO] [stderr] | [INFO] [stderr] 111 | let u = (i as f64) / (IMAGE_WIDTH as f64); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(i)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:111:30 [INFO] [stderr] | [INFO] [stderr] 111 | let u = (i as f64) / (IMAGE_WIDTH as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_WIDTH)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:112:17 [INFO] [stderr] | [INFO] [stderr] 112 | let v = ((IMAGE_HEIGHT - j) as f64) / (IMAGE_HEIGHT as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT - j)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:112:47 [INFO] [stderr] | [INFO] [stderr] 112 | let v = ((IMAGE_HEIGHT - j) as f64) / (IMAGE_HEIGHT as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:116:52 [INFO] [stderr] | [INFO] [stderr] 116 | let h_sample = rand::random::() / (IMAGE_WIDTH as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_WIDTH)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:117:52 [INFO] [stderr] | [INFO] [stderr] 117 | let v_sample = rand::random::() / (IMAGE_HEIGHT as f64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(IMAGE_HEIGHT)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:121:27 [INFO] [stderr] | [INFO] [stderr] 121 | c = c.scale(1.0 / (SAMPLES as f64)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try: `f64::from(SAMPLES)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.16s [INFO] running `"docker" "inspect" "b898d72834466dfc51eb9bc79cfc49ba7430966fbc4551173f8cce63cabb626f"` [INFO] running `"docker" "rm" "-f" "b898d72834466dfc51eb9bc79cfc49ba7430966fbc4551173f8cce63cabb626f"` [INFO] [stdout] b898d72834466dfc51eb9bc79cfc49ba7430966fbc4551173f8cce63cabb626f