[INFO] cloning repository https://github.com/Xzdes/ultracode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Xzdes/ultracode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXzdes%2Fultracode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXzdes%2Fultracode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] eb195c329e921caaacfe4bd7325a9334dafb9a56 [INFO] linting Xzdes/ultracode against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXzdes%2Fultracode" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Xzdes/ultracode [INFO] finished tweaking git repo https://github.com/Xzdes/ultracode [INFO] tweaked toml for git repo https://github.com/Xzdes/ultracode written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Xzdes/ultracode 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] crate git repo https://github.com/Xzdes/ultracode already has a lockfile, it will not be regenerated [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] Downloading crates ... [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.103 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.103 [INFO] [stderr] Downloaded js-sys v0.3.80 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.103 [INFO] [stderr] Downloaded clap v4.5.48 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.103 [INFO] [stderr] Downloaded wasm-bindgen v0.2.103 [INFO] [stderr] Downloaded clap_builder v4.5.48 [INFO] [stderr] Downloaded web-sys v0.3.80 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 4dba5da682385dd0c47908730a381e40667552a0310542e48029d17f9031676e [INFO] running `Command { std: "docker" "start" "-a" "4dba5da682385dd0c47908730a381e40667552a0310542e48029d17f9031676e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4dba5da682385dd0c47908730a381e40667552a0310542e48029d17f9031676e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4dba5da682385dd0c47908730a381e40667552a0310542e48029d17f9031676e", kill_on_drop: false }` [INFO] [stdout] 4dba5da682385dd0c47908730a381e40667552a0310542e48029d17f9031676e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] d121e2ecb0e49aed24a09b5204e3fb7bf14c5a8a2fb7f066a0f5cb1f49d17196 [INFO] running `Command { std: "docker" "start" "-a" "d121e2ecb0e49aed24a09b5204e3fb7bf14c5a8a2fb7f066a0f5cb1f49d17196", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling serde_core v1.0.226 [INFO] [stderr] Compiling serde v1.0.226 [INFO] [stderr] Compiling rayon-core v1.13.0 [INFO] [stderr] Checking regex-syntax v0.8.6 [INFO] [stderr] Checking plotters-backend v0.3.7 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking clap_builder v4.5.48 [INFO] [stderr] Checking cast v0.3.0 [INFO] [stderr] Checking ultracode v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking anes v0.1.6 [INFO] [stderr] Checking oorandom v11.1.5 [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> src/qr/format.rs:44:26 [INFO] [stdout] | [INFO] [stdout] 44 | const BCH15_5_GEN: u16 = 0b1_0100_1101_11; // 0x537 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider: `0b101_0011_0111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] = note: `#[warn(clippy::unusual_byte_groupings)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking plotters-svg v0.3.7 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/core/types.rs:45:19 [INFO] [stdout] | [INFO] [stdout] 45 | let win = window.max(3).min(63) | 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `window.clamp(3, 63)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `row` [INFO] [stdout] --> src/core/types.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..win.min(w) { [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] 49 - for i in 0..win.min(w) { [INFO] [stdout] 49 + for in row.iter().take(win.min(w)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/core/types.rs:86:19 [INFO] [stdout] | [INFO] [stdout] 86 | let win = window.max(3).min(63) | 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `window.clamp(3, 63)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `col` [INFO] [stdout] --> src/core/types.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 0..win.min(h) { [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 [INFO] [stdout] | [INFO] [stdout] 90 - for i in 0..win.min(h) { [INFO] [stdout] 90 + for in col.iter().take(win.min(h)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/binarize.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | / if win < 8 { [INFO] [stdout] 53 | | win = 8; [INFO] [stdout] 54 | | } [INFO] [stdout] 55 | | if win > 64 { [INFO] [stdout] 56 | | win = 64; [INFO] [stdout] 57 | | } [INFO] [stdout] | |_____^ help: replace with clamp: `win = win.clamp(8, 64);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `row` [INFO] [stdout] --> src/binarize.rs:68:14 [INFO] [stdout] | [INFO] [stdout] 68 | for i in 0..n { [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] 68 - for i in 0..n { [INFO] [stdout] 68 + for (i, ) in row.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/binarize.rs:115:32 [INFO] [stdout] | [INFO] [stdout] 115 | let thin_slice = &sorted[..(sorted.len().max(1) + 1) / 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `sorted.len().max(1).div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:320:5 [INFO] [stdout] | [INFO] [stdout] 320 | (p[0] as i32 - q[0] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[0] as i32 - q[0] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:321:11 [INFO] [stdout] | [INFO] [stdout] 321 | + (p[1] as i32 - q[1] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[1] as i32 - q[1] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:322:11 [INFO] [stdout] | [INFO] [stdout] 322 | + (p[2] as i32 - q[2] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[2] as i32 - q[2] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:323:11 [INFO] [stdout] | [INFO] [stdout] 323 | + (p[3] as i32 - q[3] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[3] as i32 - q[3] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:324:11 [INFO] [stdout] | [INFO] [stdout] 324 | + (p[4] as i32 - q[4] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[4] as i32 - q[4] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:325:11 [INFO] [stdout] | [INFO] [stdout] 325 | + (p[5] as i32 - q[5] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[5] as i32 - q[5] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:330:5 [INFO] [stdout] | [INFO] [stdout] 330 | (p[0] as i32 - q[0] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[0] as i32 - q[0] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:331:11 [INFO] [stdout] | [INFO] [stdout] 331 | + (p[1] as i32 - q[1] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[1] as i32 - q[1] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:332:11 [INFO] [stdout] | [INFO] [stdout] 332 | + (p[2] as i32 - q[2] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[2] as i32 - q[2] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:333:11 [INFO] [stdout] | [INFO] [stdout] 333 | + (p[3] as i32 - q[3] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[3] as i32 - q[3] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:334:11 [INFO] [stdout] | [INFO] [stdout] 334 | + (p[4] as i32 - q[4] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[4] as i32 - q[4] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:335:11 [INFO] [stdout] | [INFO] [stdout] 335 | + (p[5] as i32 - q[5] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[5] as i32 - q[5] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:336:11 [INFO] [stdout] | [INFO] [stdout] 336 | + (p[6] as i32 - q[6] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[6] as i32 - q[6] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/one_d/code128.rs:393:17 [INFO] [stdout] | [INFO] [stdout] 393 | text.len() % 2 == 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `text.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `d` is only used to index `right_digits` [INFO] [stdout] --> src/one_d/ean13.rs:119:14 [INFO] [stdout] | [INFO] [stdout] 119 | for d in 0..6 { [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 [INFO] [stdout] | [INFO] [stdout] 119 - for d in 0..6 { [INFO] [stdout] 119 + for in &mut right_digits { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/one_d/ean13.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 143 | / for k in 0..6 { [INFO] [stdout] 144 | | digits[1 + k] = left_digits[k]; [INFO] [stdout] 145 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `digits[1..(6 + 1)].copy_from_slice(&left_digits);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/one_d/ean13.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | / for k in 0..6 { [INFO] [stdout] 147 | | digits[7 + k] = right_digits[k]; [INFO] [stdout] 148 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `digits[7..(6 + 7)].copy_from_slice(&right_digits);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/one_d/ean13.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | / for i in 0..m.len().saturating_sub(2) { [INFO] [stdout] 173 | | if m[i] == 1 && m[i + 1] == 1 && m[i + 2] == 1 { [INFO] [stdout] 174 | | return Some(i); [INFO] [stdout] ... | [INFO] [stdout] 177 | | None [INFO] [stdout] | |________^ help: replace with an iterator: `(0..m.len().saturating_sub(2)).find(|&i| m[i] == 1 && m[i + 1] == 1 && m[i + 2] == 1)` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:203:5 [INFO] [stdout] | [INFO] [stdout] 203 | (p.0 as i32 - q.0 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.0 as i32 - q.0 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:204:11 [INFO] [stdout] | [INFO] [stdout] 204 | + (p.1 as i32 - q.1 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.1 as i32 - q.1 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:205:11 [INFO] [stdout] | [INFO] [stdout] 205 | + (p.2 as i32 - q.2 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.2 as i32 - q.2 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:206:11 [INFO] [stdout] | [INFO] [stdout] 206 | + (p.3 as i32 - q.3 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.3 as i32 - q.3 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `d` [INFO] [stdout] --> src/one_d/ean13.rs:226:14 [INFO] [stdout] | [INFO] [stdout] 226 | for i in 0..12 { [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] 226 - for i in 0..12 { [INFO] [stdout] 226 + for (i, ) in d.iter().enumerate().take(12) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/qr/bytes.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | let mut out = Vec::with_capacity((bits.len()+7)/8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `bits.len().div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/qr/bytes.rs:85:8 [INFO] [stdout] | [INFO] [stdout] 85 | if data_cw.len() < 1 { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `data_cw.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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/bytes.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | if self.i % 8 == 0 { self.b = self.cw[self.i/8]; } [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `self.i.is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/qr/encode.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | bits.push(false); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![false;SIZE]` [INFO] [stdout] = help: or `bits.extend(std::iter::repeat_n(false, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/encode.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | while bits.len() % 8 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!bits.len().is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/qr/encode.rs:120:31 [INFO] [stdout] | [INFO] [stdout] 120 | let in_core = (dx >= 2 && dx <= 4) && (dy >= 2 && dy <= 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(2..=4).contains(&dx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/qr/encode.rs:120:55 [INFO] [stdout] | [INFO] [stdout] 120 | let in_core = (dx >= 2 && dx <= 4) && (dy >= 2 && dy <= 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(2..=4).contains(&dy)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `FORMAT_READ_PATHS_V1` [INFO] [stdout] --> src/qr/encode.rs:142:14 [INFO] [stdout] | [INFO] [stdout] 142 | for i in 0..15 { [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] 142 - for i in 0..15 { [INFO] [stdout] 142 + for (i, ) in FORMAT_READ_PATHS_V1.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/finder.rs:71:31 [INFO] [stdout] | [INFO] [stdout] 71 | if starts_black { idx % 2 == 0 } else { idx % 2 == 1 } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `idx.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/finder.rs:108:31 [INFO] [stdout] | [INFO] [stdout] 108 | if starts_black { idx % 2 == 0 } else { idx % 2 == 1 } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `idx.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is used to index `p` [INFO] [stdout] --> src/qr/rs.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | for k in 1..p.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] 118 - for k in 1..p.len() { [INFO] [stdout] 118 + for (k, ) in p.iter().enumerate().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/qr/rs.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | pub fn rs_correct_codeword_block(codewords: &mut [u8], data_len: usize, ec_len: usize) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `codewords` [INFO] [stdout] --> src/qr/rs.rs:227:18 [INFO] [stdout] | [INFO] [stdout] 227 | for i in 0..n { [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] 227 - for i in 0..n { [INFO] [stdout] 227 + for (i, ) in codewords.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:85:8 [INFO] [stdout] | [INFO] [stdout] 85 | if img.width % 29 != 0 || img.height % 29 != 0 { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!img.width.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:85:31 [INFO] [stdout] | [INFO] [stdout] 85 | if img.width % 29 != 0 || img.height % 29 != 0 { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `!img.height.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:225:9 [INFO] [stdout] | [INFO] [stdout] 225 | if (img.width % 29 == 0 && img.height % 29 == 0) && is_near_axis_aligned(ux, uy) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `img.width.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:225:32 [INFO] [stdout] | [INFO] [stdout] 225 | if (img.width % 29 == 0 && img.height % 29 == 0) && is_near_axis_aligned(ux, uy) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `img.height.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/qr/data.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 8 | let (x, y) = (x as i32, y as i32); [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/qr/data.rs:8:29 [INFO] [stdout] | [INFO] [stdout] 8 | let (x, y) = (x as i32, y as i32); [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/qr/data.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if (x <= 8 && y <= 8) [INFO] [stdout] | ________^ [INFO] [stdout] 28 | | || (x >= N1 - 9 && y <= 8) [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] 27 - if (x <= 8 && y <= 8) [INFO] [stdout] 28 - || (x >= N1 - 9 && y <= 8) [INFO] [stdout] 27 + if !(y > 8 || x > 8 && x < N1 - 9) [INFO] [stdout] | [INFO] [stdout] 27 - if (x <= 8 && y <= 8) [INFO] [stdout] 28 - || (x >= N1 - 9 && y <= 8) [INFO] [stdout] 27 + if (x >= N1 - 9 || x <= 8) && y <= 8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/qr/data.rs:62:32 [INFO] [stdout] | [INFO] [stdout] 62 | let x = (col - dx as i32) as usize; [INFO] [stdout] | ^^^^^^^^^ help: try: `dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/qr/data.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | let y = y as usize; [INFO] [stdout] | ^^^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/qr/mod.rs:54:44 [INFO] [stdout] | [INFO] [stdout] 54 | word = (word << 1) | if matrix[y as usize][x as usize] { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ y }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/qr/mod.rs:54:56 [INFO] [stdout] | [INFO] [stdout] 54 | word = (word << 1) | if matrix[y as usize][x as usize] { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/api.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | return vec![sym]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 307 - return vec![sym]; [INFO] [stdout] 307 + vec![sym] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking regex-automata v0.4.10 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking clap v4.5.48 [INFO] [stderr] Checking regex v1.11.2 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Compiling serde_derive v1.0.226 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> src/qr/format.rs:44:26 [INFO] [stdout] | [INFO] [stdout] 44 | const BCH15_5_GEN: u16 = 0b1_0100_1101_11; // 0x537 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider: `0b101_0011_0111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] = note: `#[warn(clippy::unusual_byte_groupings)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/core/types.rs:45:19 [INFO] [stdout] | [INFO] [stdout] 45 | let win = window.max(3).min(63) | 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `window.clamp(3, 63)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `row` [INFO] [stdout] --> src/core/types.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..win.min(w) { [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] 49 - for i in 0..win.min(w) { [INFO] [stdout] 49 + for in row.iter().take(win.min(w)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/core/types.rs:86:19 [INFO] [stdout] | [INFO] [stdout] 86 | let win = window.max(3).min(63) | 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `window.clamp(3, 63)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `col` [INFO] [stdout] --> src/core/types.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 0..win.min(h) { [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 [INFO] [stdout] | [INFO] [stdout] 90 - for i in 0..win.min(h) { [INFO] [stdout] 90 + for in col.iter().take(win.min(h)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/binarize.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | / if win < 8 { [INFO] [stdout] 53 | | win = 8; [INFO] [stdout] 54 | | } [INFO] [stdout] 55 | | if win > 64 { [INFO] [stdout] 56 | | win = 64; [INFO] [stdout] 57 | | } [INFO] [stdout] | |_____^ help: replace with clamp: `win = win.clamp(8, 64);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `row` [INFO] [stdout] --> src/binarize.rs:68:14 [INFO] [stdout] | [INFO] [stdout] 68 | for i in 0..n { [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] 68 - for i in 0..n { [INFO] [stdout] 68 + for (i, ) in row.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/binarize.rs:115:32 [INFO] [stdout] | [INFO] [stdout] 115 | let thin_slice = &sorted[..(sorted.len().max(1) + 1) / 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `sorted.len().max(1).div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/binarize.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | assert_eq!(starts_black, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 164 - assert_eq!(starts_black, true); [INFO] [stdout] 164 + assert!(starts_black); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:320:5 [INFO] [stdout] | [INFO] [stdout] 320 | (p[0] as i32 - q[0] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[0] as i32 - q[0] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:321:11 [INFO] [stdout] | [INFO] [stdout] 321 | + (p[1] as i32 - q[1] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[1] as i32 - q[1] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:322:11 [INFO] [stdout] | [INFO] [stdout] 322 | + (p[2] as i32 - q[2] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[2] as i32 - q[2] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:323:11 [INFO] [stdout] | [INFO] [stdout] 323 | + (p[3] as i32 - q[3] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[3] as i32 - q[3] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:324:11 [INFO] [stdout] | [INFO] [stdout] 324 | + (p[4] as i32 - q[4] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[4] as i32 - q[4] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:325:11 [INFO] [stdout] | [INFO] [stdout] 325 | + (p[5] as i32 - q[5] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[5] as i32 - q[5] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:330:5 [INFO] [stdout] | [INFO] [stdout] 330 | (p[0] as i32 - q[0] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[0] as i32 - q[0] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:331:11 [INFO] [stdout] | [INFO] [stdout] 331 | + (p[1] as i32 - q[1] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[1] as i32 - q[1] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:332:11 [INFO] [stdout] | [INFO] [stdout] 332 | + (p[2] as i32 - q[2] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[2] as i32 - q[2] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:333:11 [INFO] [stdout] | [INFO] [stdout] 333 | + (p[3] as i32 - q[3] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[3] as i32 - q[3] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:334:11 [INFO] [stdout] | [INFO] [stdout] 334 | + (p[4] as i32 - q[4] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[4] as i32 - q[4] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:335:11 [INFO] [stdout] | [INFO] [stdout] 335 | + (p[5] as i32 - q[5] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[5] as i32 - q[5] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/code128.rs:336:11 [INFO] [stdout] | [INFO] [stdout] 336 | + (p[6] as i32 - q[6] as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p[6] as i32 - q[6] as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/one_d/code128.rs:393:17 [INFO] [stdout] | [INFO] [stdout] 393 | text.len() % 2 == 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `text.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `d` is only used to index `right_digits` [INFO] [stdout] --> src/one_d/ean13.rs:119:14 [INFO] [stdout] | [INFO] [stdout] 119 | for d in 0..6 { [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 [INFO] [stdout] | [INFO] [stdout] 119 - for d in 0..6 { [INFO] [stdout] 119 + for in &mut right_digits { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/one_d/ean13.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 143 | / for k in 0..6 { [INFO] [stdout] 144 | | digits[1 + k] = left_digits[k]; [INFO] [stdout] 145 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `digits[1..(6 + 1)].copy_from_slice(&left_digits);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/one_d/ean13.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | / for k in 0..6 { [INFO] [stdout] 147 | | digits[7 + k] = right_digits[k]; [INFO] [stdout] 148 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `digits[7..(6 + 7)].copy_from_slice(&right_digits);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/one_d/ean13.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | / for i in 0..m.len().saturating_sub(2) { [INFO] [stdout] 173 | | if m[i] == 1 && m[i + 1] == 1 && m[i + 2] == 1 { [INFO] [stdout] 174 | | return Some(i); [INFO] [stdout] ... | [INFO] [stdout] 177 | | None [INFO] [stdout] | |________^ help: replace with an iterator: `(0..m.len().saturating_sub(2)).find(|&i| m[i] == 1 && m[i + 1] == 1 && m[i + 2] == 1)` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:203:5 [INFO] [stdout] | [INFO] [stdout] 203 | (p.0 as i32 - q.0 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.0 as i32 - q.0 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:204:11 [INFO] [stdout] | [INFO] [stdout] 204 | + (p.1 as i32 - q.1 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.1 as i32 - q.1 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:205:11 [INFO] [stdout] | [INFO] [stdout] 205 | + (p.2 as i32 - q.2 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.2 as i32 - q.2 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/one_d/ean13.rs:206:11 [INFO] [stdout] | [INFO] [stdout] 206 | + (p.3 as i32 - q.3 as i32).abs() as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(p.3 as i32 - q.3 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `d` [INFO] [stdout] --> src/one_d/ean13.rs:226:14 [INFO] [stdout] | [INFO] [stdout] 226 | for i in 0..12 { [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] 226 - for i in 0..12 { [INFO] [stdout] 226 + for (i, ) in d.iter().enumerate().take(12) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/one_d/ean13.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | / for i in 0..12 { [INFO] [stdout] 247 | | ean13[i + 1] = ds[i]; [INFO] [stdout] 248 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `ean13[1..(12 + 1)].copy_from_slice(&ds[..12]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `ean13` [INFO] [stdout] --> src/one_d/ean13.rs:251:18 [INFO] [stdout] | [INFO] [stdout] 251 | for i in 0..12 { [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] 251 - for i in 0..12 { [INFO] [stdout] 251 + for (i, ) in ean13.iter().enumerate().take(12) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/one_d/ean13.rs:257:9 [INFO] [stdout] | [INFO] [stdout] 257 | / for i in 0..13 { [INFO] [stdout] 258 | | ean13[i] = ds[i]; [INFO] [stdout] 259 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `ean13.copy_from_slice(&ds[..13]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/qr/bytes.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | let mut out = Vec::with_capacity((bits.len()+7)/8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `bits.len().div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/qr/bytes.rs:85:8 [INFO] [stdout] | [INFO] [stdout] 85 | if data_cw.len() < 1 { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `data_cw.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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/bytes.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | if self.i % 8 == 0 { self.b = self.cw[self.i/8]; } [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `self.i.is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/qr/encode.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | bits.push(false); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![false;SIZE]` [INFO] [stdout] = help: or `bits.extend(std::iter::repeat_n(false, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/encode.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | while bits.len() % 8 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!bits.len().is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/qr/encode.rs:120:31 [INFO] [stdout] | [INFO] [stdout] 120 | let in_core = (dx >= 2 && dx <= 4) && (dy >= 2 && dy <= 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(2..=4).contains(&dx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/qr/encode.rs:120:55 [INFO] [stdout] | [INFO] [stdout] 120 | let in_core = (dx >= 2 && dx <= 4) && (dy >= 2 && dy <= 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(2..=4).contains(&dy)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `FORMAT_READ_PATHS_V1` [INFO] [stdout] --> src/qr/encode.rs:142:14 [INFO] [stdout] | [INFO] [stdout] 142 | for i in 0..15 { [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] 142 - for i in 0..15 { [INFO] [stdout] 142 + for (i, ) in FORMAT_READ_PATHS_V1.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/finder.rs:71:31 [INFO] [stdout] | [INFO] [stdout] 71 | if starts_black { idx % 2 == 0 } else { idx % 2 == 1 } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `idx.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/finder.rs:108:31 [INFO] [stdout] | [INFO] [stdout] 108 | if starts_black { idx % 2 == 0 } else { idx % 2 == 1 } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `idx.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is used to index `p` [INFO] [stdout] --> src/qr/rs.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | for k in 1..p.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] 118 - for k in 1..p.len() { [INFO] [stdout] 118 + for (k, ) in p.iter().enumerate().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/qr/rs.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | pub fn rs_correct_codeword_block(codewords: &mut [u8], data_len: usize, ec_len: usize) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `codewords` [INFO] [stdout] --> src/qr/rs.rs:227:18 [INFO] [stdout] | [INFO] [stdout] 227 | for i in 0..n { [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] 227 - for i in 0..n { [INFO] [stdout] 227 + for (i, ) in codewords.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `cw` [INFO] [stdout] --> src/qr/rs.rs:307:18 [INFO] [stdout] | [INFO] [stdout] 307 | for i in 0..19 { cw[i] = i as u8 ^ 0xA5; } [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] 307 - for i in 0..19 { cw[i] = i as u8 ^ 0xA5; } [INFO] [stdout] 307 + for (i, ) in cw.iter_mut().enumerate().take(19) { cw[i] = i as u8 ^ 0xA5; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:85:8 [INFO] [stdout] | [INFO] [stdout] 85 | if img.width % 29 != 0 || img.height % 29 != 0 { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!img.width.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:85:31 [INFO] [stdout] | [INFO] [stdout] 85 | if img.width % 29 != 0 || img.height % 29 != 0 { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `!img.height.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:225:9 [INFO] [stdout] | [INFO] [stdout] 225 | if (img.width % 29 == 0 && img.height % 29 == 0) && is_near_axis_aligned(ux, uy) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `img.width.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/qr/sample.rs:225:32 [INFO] [stdout] | [INFO] [stdout] 225 | if (img.width % 29 == 0 && img.height % 29 == 0) && is_near_axis_aligned(ux, uy) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `img.height.is_multiple_of(29)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/qr/data.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 8 | let (x, y) = (x as i32, y as i32); [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/qr/data.rs:8:29 [INFO] [stdout] | [INFO] [stdout] 8 | let (x, y) = (x as i32, y as i32); [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/qr/data.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if (x <= 8 && y <= 8) [INFO] [stdout] | ________^ [INFO] [stdout] 28 | | || (x >= N1 - 9 && y <= 8) [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] 27 - if (x <= 8 && y <= 8) [INFO] [stdout] 28 - || (x >= N1 - 9 && y <= 8) [INFO] [stdout] 27 + if !(y > 8 || x > 8 && x < N1 - 9) [INFO] [stdout] | [INFO] [stdout] 27 - if (x <= 8 && y <= 8) [INFO] [stdout] 28 - || (x >= N1 - 9 && y <= 8) [INFO] [stdout] 27 + if (x >= N1 - 9 || x <= 8) && y <= 8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/qr/data.rs:62:32 [INFO] [stdout] | [INFO] [stdout] 62 | let x = (col - dx as i32) as usize; [INFO] [stdout] | ^^^^^^^^^ help: try: `dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/qr/data.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | let y = y as usize; [INFO] [stdout] | ^^^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/qr/mod.rs:54:44 [INFO] [stdout] | [INFO] [stdout] 54 | word = (word << 1) | if matrix[y as usize][x as usize] { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ y }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/qr/mod.rs:54:56 [INFO] [stdout] | [INFO] [stdout] 54 | word = (word << 1) | if matrix[y as usize][x as usize] { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/api.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | return vec![sym]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 307 - return vec![sym]; [INFO] [stdout] 307 + vec![sym] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.77s [INFO] running `Command { std: "docker" "inspect" "d121e2ecb0e49aed24a09b5204e3fb7bf14c5a8a2fb7f066a0f5cb1f49d17196", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d121e2ecb0e49aed24a09b5204e3fb7bf14c5a8a2fb7f066a0f5cb1f49d17196", kill_on_drop: false }` [INFO] [stdout] d121e2ecb0e49aed24a09b5204e3fb7bf14c5a8a2fb7f066a0f5cb1f49d17196