[INFO] updating cached repository finalfire/RustMPED [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/finalfire/RustMPED [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/finalfire/RustMPED" "work/ex/clippy-test-run/sources/stable/gh/finalfire/RustMPED"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/finalfire/RustMPED'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/finalfire/RustMPED" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/finalfire/RustMPED"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/finalfire/RustMPED'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 6f39c50c664b259b49071e366e8c15eca47536a4 [INFO] sha for GitHub repo finalfire/RustMPED: 6f39c50c664b259b49071e366e8c15eca47536a4 [INFO] validating manifest of finalfire/RustMPED 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 finalfire/RustMPED 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 finalfire/RustMPED [INFO] finished frobbing finalfire/RustMPED [INFO] frobbed toml for finalfire/RustMPED written to work/ex/clippy-test-run/sources/stable/gh/finalfire/RustMPED/Cargo.toml [INFO] started frobbing finalfire/RustMPED [INFO] finished frobbing finalfire/RustMPED [INFO] frobbed toml for finalfire/RustMPED written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/finalfire/RustMPED/Cargo.toml [INFO] crate finalfire/RustMPED 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 finalfire/RustMPED 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-5/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/finalfire/RustMPED:/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] 0e117f66e6a3c39647b43697e803062d97442911b928ad292f5392fd05a93e62 [INFO] running `"docker" "start" "-a" "0e117f66e6a3c39647b43697e803062d97442911b928ad292f5392fd05a93e62"` [INFO] [stderr] Checking MPED v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/main.rs:184:13 [INFO] [stderr] | [INFO] [stderr] 184 | let mut d: Vec = vec![0; a.len()+1]; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: 6th binding whose name is just one char [INFO] [stderr] --> src/main.rs:196:13 [INFO] [stderr] | [INFO] [stderr] 196 | let c = b[j-1]; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/main.rs:240:13 [INFO] [stderr] | [INFO] [stderr] 240 | let mut d: u32 = edit_distance_enhanced(&a, &b, &sig1, &sig2, &mut matrix, &m); [INFO] [stderr] | ^ [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/main.rs:184:13 [INFO] [stderr] | [INFO] [stderr] 184 | let mut d: Vec = vec![0; a.len()+1]; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: 6th binding whose name is just one char [INFO] [stderr] --> src/main.rs:196:13 [INFO] [stderr] | [INFO] [stderr] 196 | let c = b[j-1]; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/main.rs:240:13 [INFO] [stderr] | [INFO] [stderr] 240 | let mut d: u32 = edit_distance_enhanced(&a, &b, &sig1, &sig2, &mut matrix, &m); [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/main.rs:65:9 [INFO] [stderr] | [INFO] [stderr] 65 | / if i >= p { [INFO] [stderr] 66 | | if last_min > current_min { [INFO] [stderr] 67 | | return false [INFO] [stderr] 68 | | } [INFO] [stderr] 69 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 65 | if i >= p && last_min > current_min { [INFO] [stderr] 66 | return false [INFO] [stderr] 67 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:231:5 [INFO] [stderr] | [INFO] [stderr] 231 | return -1; [INFO] [stderr] | ^^^^^^^^^^ help: remove `return` as shown: `-1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/main.rs:65:9 [INFO] [stderr] | [INFO] [stderr] 65 | / if i >= p { [INFO] [stderr] 66 | | if last_min > current_min { [INFO] [stderr] 67 | | return false [INFO] [stderr] 68 | | } [INFO] [stderr] 69 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 65 | if i >= p && last_min > current_min { [INFO] [stderr] 66 | return false [INFO] [stderr] 67 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:231:5 [INFO] [stderr] | [INFO] [stderr] 231 | return -1; [INFO] [stderr] | ^^^^^^^^^^ help: remove `return` as shown: `-1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: value assigned to `j` is never read [INFO] [stderr] --> src/main.rs:82:13 [INFO] [stderr] | [INFO] [stderr] 82 | let mut j: usize = 0; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_assignments)] on by default [INFO] [stderr] [INFO] [stderr] warning: value assigned to `t` is never read [INFO] [stderr] --> src/main.rs:83:13 [INFO] [stderr] | [INFO] [stderr] 83 | let mut t: usize = 0; [INFO] [stderr] | ^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `temp` is never read [INFO] [stderr] --> src/main.rs:255:13 [INFO] [stderr] | [INFO] [stderr] 255 | let mut temp: usize = 0; [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `k_shuffle` is never read [INFO] [stderr] --> src/main.rs:258:13 [INFO] [stderr] | [INFO] [stderr] 258 | let mut k_shuffle: usize = 0; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `isig2_o` is never read [INFO] [stderr] --> src/main.rs:295:25 [INFO] [stderr] | [INFO] [stderr] 295 | isig2_o = isig2_t.clone(); [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `isig1_min_min` is never read [INFO] [stderr] --> src/main.rs:311:17 [INFO] [stderr] | [INFO] [stderr] 311 | isig1_min_min = isig1_min.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `isig2_min_min` is never read [INFO] [stderr] --> src/main.rs:312:17 [INFO] [stderr] | [INFO] [stderr] 312 | isig2_min_min = isig2_min.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `j` is never read [INFO] [stderr] --> src/main.rs:82:13 [INFO] [stderr] | [INFO] [stderr] 82 | let mut j: usize = 0; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_assignments)] on by default [INFO] [stderr] [INFO] [stderr] warning: value assigned to `t` is never read [INFO] [stderr] --> src/main.rs:83:13 [INFO] [stderr] | [INFO] [stderr] 83 | let mut t: usize = 0; [INFO] [stderr] | ^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `temp` is never read [INFO] [stderr] --> src/main.rs:255:13 [INFO] [stderr] | [INFO] [stderr] 255 | let mut temp: usize = 0; [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `k_shuffle` is never read [INFO] [stderr] --> src/main.rs:258:13 [INFO] [stderr] | [INFO] [stderr] 258 | let mut k_shuffle: usize = 0; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `isig2_o` is never read [INFO] [stderr] --> src/main.rs:295:25 [INFO] [stderr] | [INFO] [stderr] 295 | isig2_o = isig2_t.clone(); [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `isig1_min_min` is never read [INFO] [stderr] --> src/main.rs:311:17 [INFO] [stderr] | [INFO] [stderr] 311 | isig1_min_min = isig1_min.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: value assigned to `isig2_min_min` is never read [INFO] [stderr] --> src/main.rs:312:17 [INFO] [stderr] | [INFO] [stderr] 312 | isig2_min_min = isig2_min.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/main.rs:187:9 [INFO] [stderr] | [INFO] [stderr] 187 | let mut boundary = min(a.len() as isize, threshold as isize)+1; [INFO] [stderr] | ----^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/main.rs:240:9 [INFO] [stderr] | [INFO] [stderr] 240 | let mut d: u32 = edit_distance_enhanced(&a, &b, &sig1, &sig2, &mut matrix, &m); [INFO] [stderr] | ----^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] [INFO] [stderr] warning: crate `MPED` should have a snake case name such as `mped` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(non_snake_case)] on by default [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/main.rs:187:9 [INFO] [stderr] | [INFO] [stderr] 187 | let mut boundary = min(a.len() as isize, threshold as isize)+1; [INFO] [stderr] | ----^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:17:5 [INFO] [stderr] | [INFO] [stderr] 17 | io::stdin().read_line(a); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_must_use)] on by default [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:18:5 [INFO] [stderr] | [INFO] [stderr] 18 | io::stdin().read_line(b); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/main.rs:240:9 [INFO] [stderr] | [INFO] [stderr] 240 | let mut d: u32 = edit_distance_enhanced(&a, &b, &sig1, &sig2, &mut matrix, &m); [INFO] [stderr] | ----^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:24:21 [INFO] [stderr] | [INFO] [stderr] 24 | fn extract_sigma(a: &String) -> String { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: the loop variable `x` is used to index `array` [INFO] [stderr] --> src/main.rs:31:14 [INFO] [stderr] | [INFO] [stderr] 31 | for x in 0.._ASCII_LEN { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 31 | for (x, ) in array.iter().enumerate().take(_ASCII_LEN) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: equality checks against true are unnecessary [INFO] [stderr] --> src/main.rs:32:12 [INFO] [stderr] | [INFO] [stderr] 32 | if array[x] == true { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `array[x]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:40:26 [INFO] [stderr] | [INFO] [stderr] 40 | fn define_mapping(sigma: &String, map: &mut HashMap) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: the variable `i` is used as a loop counter. Consider using `for (i, item) in sigma.chars().enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:42:14 [INFO] [stderr] | [INFO] [stderr] 42 | for c in sigma.chars() { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:48:63 [INFO] [stderr] | [INFO] [stderr] 48 | fn map_vec(map: &HashMap, v: &mut Vec, s: &String) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: the variable `i` is used as a loop counter. Consider using `for (i, item) in s.chars().enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:50:14 [INFO] [stderr] | [INFO] [stderr] 50 | for c in s.chars() { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [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:56:16 [INFO] [stderr] | [INFO] [stderr] 56 | fn is_valid(s: &Vec, p: usize) -> bool{ [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: crate `MPED` should have a snake case name such as `mped` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(non_snake_case)] on by default [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `s` [INFO] [stderr] --> src/main.rs:60:14 [INFO] [stderr] | [INFO] [stderr] 60 | for i in 0..s.len() { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 60 | for (i, ) in s.iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:119:36 [INFO] [stderr] | [INFO] [stderr] 119 | fn init_general(&mut self, p1: &usize, p2: &usize) { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:119:48 [INFO] [stderr] | [INFO] [stderr] 119 | fn init_general(&mut self, p1: &usize, p2: &usize) { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/main.rs:125:32 [INFO] [stderr] | [INFO] [stderr] 125 | self.set(i, j, if *p1 != 0 && *p2 != 0 && (i/p2_u == j/p1_u) {false} else {true}) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!(*p1 != 0 && *p2 != 0 && (i/p2_u == j/p1_u))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:30 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:46 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:65 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:84 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: the loop variable `i` is used to index `matrix` [INFO] [stderr] --> src/main.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | for i in 0..len_a+1 { matrix[i][0] = i as u32; } [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 150 | for (i, ) in matrix.iter_mut().enumerate().take(len_a+1) { matrix[i][0] = i as u32; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | for i in 0..len_a+1 { matrix[i][0] = i as u32; } [INFO] [stderr] | ^^^^^^^^^^ help: use: `0..=len_a` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:151:14 [INFO] [stderr] | [INFO] [stderr] 151 | for j in 0..len_b+1 { matrix[0][j] = j as u32; } [INFO] [stderr] | ^^^^^^^^^^ help: use: `0..=len_b` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:17:5 [INFO] [stderr] | [INFO] [stderr] 17 | io::stdin().read_line(a); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_must_use)] on by default [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:18:5 [INFO] [stderr] | [INFO] [stderr] 18 | io::stdin().read_line(b); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:153:14 [INFO] [stderr] | [INFO] [stderr] 153 | for i in 1..len_a+1 { [INFO] [stderr] | ^^^^^^^^^^ help: use: `1..=len_a` [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:24:21 [INFO] [stderr] | [INFO] [stderr] 24 | fn extract_sigma(a: &String) -> String { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:154:18 [INFO] [stderr] | [INFO] [stderr] 154 | for j in 1..len_b+1 { [INFO] [stderr] | ^^^^^^^^^^ help: use: `1..=len_b` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [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:170:39 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:170:55 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:170:74 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:170:93 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [INFO] [stderr] warning: the loop variable `x` is used to index `array` [INFO] [stderr] --> src/main.rs:31:14 [INFO] [stderr] | [INFO] [stderr] 31 | for x in 0.._ASCII_LEN { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 31 | for (x, ) in array.iter().enumerate().take(_ASCII_LEN) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: equality checks against true are unnecessary [INFO] [stderr] --> src/main.rs:32:12 [INFO] [stderr] | [INFO] [stderr] 32 | if array[x] == true { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `array[x]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [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: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:40:26 [INFO] [stderr] | [INFO] [stderr] 40 | fn define_mapping(sigma: &String, map: &mut HashMap) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: the variable `i` is used as a loop counter. Consider using `for (i, item) in sigma.chars().enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:42:14 [INFO] [stderr] | [INFO] [stderr] 42 | for c in sigma.chars() { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:48:63 [INFO] [stderr] | [INFO] [stderr] 48 | fn map_vec(map: &HashMap, v: &mut Vec, s: &String) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: the variable `i` is used as a loop counter. Consider using `for (i, item) in s.chars().enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:50:14 [INFO] [stderr] | [INFO] [stderr] 50 | for c in s.chars() { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [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:56:16 [INFO] [stderr] | [INFO] [stderr] 56 | fn is_valid(s: &Vec, p: usize) -> bool{ [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: the loop variable `i` is used to index `s` [INFO] [stderr] --> src/main.rs:60:14 [INFO] [stderr] | [INFO] [stderr] 60 | for i in 0..s.len() { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 60 | for (i, ) in s.iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:119:36 [INFO] [stderr] | [INFO] [stderr] 119 | fn init_general(&mut self, p1: &usize, p2: &usize) { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:119:48 [INFO] [stderr] | [INFO] [stderr] 119 | fn init_general(&mut self, p1: &usize, p2: &usize) { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: variable `MAX` should have a snake case name such as `max` [INFO] [stderr] --> src/main.rs:172:9 [INFO] [stderr] | [INFO] [stderr] 172 | let MAX: i32 = i32::max_value(); [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: comparison is useless due to type limits [INFO] [stderr] --> src/main.rs:174:72 [INFO] [stderr] | [INFO] [stderr] 174 | if ((a.len() - b.len()) as isize).abs() >= (threshold as isize) || threshold < 0 { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_comparisons)] on by default [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/main.rs:174:72 [INFO] [stderr] | [INFO] [stderr] 174 | if ((a.len() - b.len()) as isize).abs() >= (threshold as isize) || threshold < 0 { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because 0 is the minimum value for this type, this comparison is always false [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/main.rs:125:32 [INFO] [stderr] | [INFO] [stderr] 125 | self.set(i, j, if *p1 != 0 && *p2 != 0 && (i/p2_u == j/p1_u) {false} else {true}) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!(*p1 != 0 && *p2 != 0 && (i/p2_u == j/p1_u))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:30 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:46 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:65 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:142:84 [INFO] [stderr] | [INFO] [stderr] 142 | fn edit_distance_enhanced(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, matrix: &mut Vec>, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: the loop variable `i` is only used to index `p`. [INFO] [stderr] --> src/main.rs:191:14 [INFO] [stderr] | [INFO] [stderr] 191 | for i in (boundary as usize)..a.len()+1 { p[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 191 | for in p.iter_mut().take(a.len()+1).skip((boundary as usize)) { p[i] = MAX; } [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:191:14 [INFO] [stderr] | [INFO] [stderr] 191 | for i in (boundary as usize)..a.len()+1 { p[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(boundary as usize)..=a.len()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `d`. [INFO] [stderr] --> src/main.rs:192:14 [INFO] [stderr] | [INFO] [stderr] 192 | for i in 0..a.len()+1 { d[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 192 | for in d.iter_mut().take(a.len()+1) { d[i] = MAX; } [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:192:14 [INFO] [stderr] | [INFO] [stderr] 192 | for i in 0..a.len()+1 { d[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `0..=a.len()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:195:14 [INFO] [stderr] | [INFO] [stderr] 195 | for j in 1..b.len()+1 { [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `1..=b.len()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `matrix` [INFO] [stderr] --> src/main.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | for i in 0..len_a+1 { matrix[i][0] = i as u32; } [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 150 | for (i, ) in matrix.iter_mut().enumerate().take(len_a+1) { matrix[i][0] = i as u32; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | for i in 0..len_a+1 { matrix[i][0] = i as u32; } [INFO] [stderr] | ^^^^^^^^^^ help: use: `0..=len_a` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:151:14 [INFO] [stderr] | [INFO] [stderr] 151 | for j in 0..len_b+1 { matrix[0][j] = j as u32; } [INFO] [stderr] | ^^^^^^^^^^ help: use: `0..=len_b` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:213:18 [INFO] [stderr] | [INFO] [stderr] 213 | for i in min_v..max_v+1 { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: use: `min_v..=max_v` [INFO] [stderr] | [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:153:14 [INFO] [stderr] | [INFO] [stderr] 153 | for i in 1..len_a+1 { [INFO] [stderr] | ^^^^^^^^^^ help: use: `1..=len_a` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:154:18 [INFO] [stderr] | [INFO] [stderr] 154 | for j in 1..len_b+1 { [INFO] [stderr] | ^^^^^^^^^^ help: use: `1..=len_b` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: it looks like you're manually copying between slices [INFO] [stderr] --> src/main.rs:221:18 [INFO] [stderr] | [INFO] [stderr] 221 | for x in 0..a.len()+1 { [INFO] [stderr] | ^^^^^^^^^^^^ help: try replacing the loop by: `p[..a.len()+1].clone_from_slice(&d[..a.len()+1])` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::manual_memcpy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:221:18 [INFO] [stderr] | [INFO] [stderr] 221 | for x in 0..a.len()+1 { [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `0..=a.len()` [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:170:39 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:170:55 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:170:74 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:170:93 [INFO] [stderr] | [INFO] [stderr] 170 | fn edit_distance_enhanced_diagonal(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, m: &MatchingSchema, threshold: u32) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [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:234:21 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:234:37 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:234:56 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:234:75 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:234:91 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: variable `MAX` should have a snake case name such as `max` [INFO] [stderr] --> src/main.rs:172:9 [INFO] [stderr] | [INFO] [stderr] 172 | let MAX: i32 = i32::max_value(); [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: comparison is useless due to type limits [INFO] [stderr] --> src/main.rs:174:72 [INFO] [stderr] | [INFO] [stderr] 174 | if ((a.len() - b.len()) as isize).abs() >= (threshold as isize) || threshold < 0 { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_comparisons)] on by default [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/main.rs:174:72 [INFO] [stderr] | [INFO] [stderr] 174 | if ((a.len() - b.len()) as isize).abs() >= (threshold as isize) || threshold < 0 { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because 0 is the minimum value for this type, this comparison is always false [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `p`. [INFO] [stderr] --> src/main.rs:191:14 [INFO] [stderr] | [INFO] [stderr] 191 | for i in (boundary as usize)..a.len()+1 { p[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 191 | for in p.iter_mut().take(a.len()+1).skip((boundary as usize)) { p[i] = MAX; } [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:191:14 [INFO] [stderr] | [INFO] [stderr] 191 | for i in (boundary as usize)..a.len()+1 { p[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(boundary as usize)..=a.len()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `d`. [INFO] [stderr] --> src/main.rs:192:14 [INFO] [stderr] | [INFO] [stderr] 192 | for i in 0..a.len()+1 { d[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 192 | for in d.iter_mut().take(a.len()+1) { d[i] = MAX; } [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:192:14 [INFO] [stderr] | [INFO] [stderr] 192 | for i in 0..a.len()+1 { d[i] = MAX; } [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `0..=a.len()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig1_o` [INFO] [stderr] --> src/main.rs:245:65 [INFO] [stderr] | [INFO] [stderr] 245 | let mut isig1_o: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:195:14 [INFO] [stderr] | [INFO] [stderr] 195 | for j in 1..b.len()+1 { [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `1..=b.len()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 245 | let mut isig1_o: Vec = vec![0; sig1.len()]; for (i, ) in isig1_o.iter_mut().enumerate().take(sig1.len()) { isig1_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_o` [INFO] [stderr] --> src/main.rs:246:65 [INFO] [stderr] | [INFO] [stderr] 246 | let mut isig2_o: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 246 | let mut isig2_o: Vec = vec![0; sig2.len()]; for (i, ) in isig2_o.iter_mut().enumerate().take(sig2.len()) { isig2_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig1_t` [INFO] [stderr] --> src/main.rs:247:65 [INFO] [stderr] | [INFO] [stderr] 247 | let mut isig1_t: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_t[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:213:18 [INFO] [stderr] | [INFO] [stderr] 213 | for i in min_v..max_v+1 { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: use: `min_v..=max_v` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 247 | let mut isig1_t: Vec = vec![0; sig1.len()]; for (i, ) in isig1_t.iter_mut().enumerate().take(sig1.len()) { isig1_t[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: it looks like you're manually copying between slices [INFO] [stderr] --> src/main.rs:221:18 [INFO] [stderr] | [INFO] [stderr] 221 | for x in 0..a.len()+1 { [INFO] [stderr] | ^^^^^^^^^^^^ help: try replacing the loop by: `p[..a.len()+1].clone_from_slice(&d[..a.len()+1])` [INFO] [stderr] | [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_t` [INFO] [stderr] --> src/main.rs:248:65 [INFO] [stderr] | [INFO] [stderr] 248 | let mut isig2_t: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_t[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] = note: #[warn(clippy::manual_memcpy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:221:18 [INFO] [stderr] | [INFO] [stderr] 221 | for x in 0..a.len()+1 { [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `0..=a.len()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 248 | let mut isig2_t: Vec = vec![0; sig2.len()]; for (i, ) in isig2_t.iter_mut().enumerate().take(sig2.len()) { isig2_t[i] = i; } [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/main.rs:234:21 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: the loop variable `i` is used to index `isig1_min` [INFO] [stderr] --> src/main.rs:250:67 [INFO] [stderr] | [INFO] [stderr] 250 | let mut isig1_min: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [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:234:37 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:234:56 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:234:75 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[usize]` [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] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 250 | let mut isig1_min: Vec = vec![0; sig1.len()]; for (i, ) in isig1_min.iter_mut().enumerate().take(sig1.len()) { isig1_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_min` [INFO] [stderr] --> src/main.rs:251:67 [INFO] [stderr] | [INFO] [stderr] 251 | let mut isig2_min: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 251 | let mut isig2_min: Vec = vec![0; sig2.len()]; for (i, ) in isig2_min.iter_mut().enumerate().take(sig2.len()) { isig2_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:234:91 [INFO] [stderr] | [INFO] [stderr] 234 | fn hill_climbing(a: &Vec, b: &Vec, sig1: &Vec, sig2: &Vec, p: &usize, m: &MatchingSchema) -> u32 { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig1_min_min` [INFO] [stderr] --> src/main.rs:252:71 [INFO] [stderr] | [INFO] [stderr] 252 | let mut isig1_min_min: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 252 | let mut isig1_min_min: Vec = vec![0; sig1.len()]; for (i, ) in isig1_min_min.iter_mut().enumerate().take(sig1.len()) { isig1_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_min_min` [INFO] [stderr] --> src/main.rs:253:71 [INFO] [stderr] | [INFO] [stderr] 253 | let mut isig2_min_min: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 253 | let mut isig2_min_min: Vec = vec![0; sig2.len()]; for (i, ) in isig2_min_min.iter_mut().enumerate().take(sig2.len()) { isig2_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig1_o` [INFO] [stderr] --> src/main.rs:245:65 [INFO] [stderr] | [INFO] [stderr] 245 | let mut isig1_o: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 245 | let mut isig1_o: Vec = vec![0; sig1.len()]; for (i, ) in isig1_o.iter_mut().enumerate().take(sig1.len()) { isig1_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_o` [INFO] [stderr] --> src/main.rs:246:65 [INFO] [stderr] | [INFO] [stderr] 246 | let mut isig2_o: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 246 | let mut isig2_o: Vec = vec![0; sig2.len()]; for (i, ) in isig2_o.iter_mut().enumerate().take(sig2.len()) { isig2_o[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig1_t` [INFO] [stderr] --> src/main.rs:247:65 [INFO] [stderr] | [INFO] [stderr] 247 | let mut isig1_t: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_t[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 247 | let mut isig1_t: Vec = vec![0; sig1.len()]; for (i, ) in isig1_t.iter_mut().enumerate().take(sig1.len()) { isig1_t[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_t` [INFO] [stderr] --> src/main.rs:248:65 [INFO] [stderr] | [INFO] [stderr] 248 | let mut isig2_t: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_t[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 248 | let mut isig2_t: Vec = vec![0; sig2.len()]; for (i, ) in isig2_t.iter_mut().enumerate().take(sig2.len()) { isig2_t[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig1_min` [INFO] [stderr] --> src/main.rs:250:67 [INFO] [stderr] | [INFO] [stderr] 250 | let mut isig1_min: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 250 | let mut isig1_min: Vec = vec![0; sig1.len()]; for (i, ) in isig1_min.iter_mut().enumerate().take(sig1.len()) { isig1_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_min` [INFO] [stderr] --> src/main.rs:251:67 [INFO] [stderr] | [INFO] [stderr] 251 | let mut isig2_min: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 251 | let mut isig2_min: Vec = vec![0; sig2.len()]; for (i, ) in isig2_min.iter_mut().enumerate().take(sig2.len()) { isig2_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig1_min_min` [INFO] [stderr] --> src/main.rs:252:71 [INFO] [stderr] | [INFO] [stderr] 252 | let mut isig1_min_min: Vec = vec![0; sig1.len()]; for i in 0..sig1.len() { isig1_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 252 | let mut isig1_min_min: Vec = vec![0; sig1.len()]; for (i, ) in isig1_min_min.iter_mut().enumerate().take(sig1.len()) { isig1_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isig2_min_min` [INFO] [stderr] --> src/main.rs:253:71 [INFO] [stderr] | [INFO] [stderr] 253 | let mut isig2_min_min: Vec = vec![0; sig2.len()]; for i in 0..sig2.len() { isig2_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] warning: the loop variable `i` is used to index `isigma1` [INFO] [stderr] --> src/main.rs:378:14 [INFO] [stderr] | [INFO] [stderr] 378 | for i in 0..sigma1.len() { isigma1[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] | [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 253 | let mut isig2_min_min: Vec = vec![0; sig2.len()]; for (i, ) in isig2_min_min.iter_mut().enumerate().take(sig2.len()) { isig2_min_min[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 378 | for (i, ) in isigma1.iter_mut().enumerate().take(sigma1.len()) { isigma1[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isigma2` [INFO] [stderr] --> src/main.rs:379:14 [INFO] [stderr] | [INFO] [stderr] 379 | for i in 0..sigma2.len() { isigma2[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 379 | for (i, ) in isigma2.iter_mut().enumerate().take(sigma2.len()) { isigma2[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isigma1` [INFO] [stderr] --> src/main.rs:378:14 [INFO] [stderr] | [INFO] [stderr] 378 | for i in 0..sigma1.len() { isigma1[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 378 | for (i, ) in isigma1.iter_mut().enumerate().take(sigma1.len()) { isigma1[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `isigma2` [INFO] [stderr] --> src/main.rs:379:14 [INFO] [stderr] | [INFO] [stderr] 379 | for i in 0..sigma2.len() { isigma2[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 379 | for (i, ) in isigma2.iter_mut().enumerate().take(sigma2.len()) { isigma2[i] = i; } [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `MPED`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: Could not compile `MPED`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "0e117f66e6a3c39647b43697e803062d97442911b928ad292f5392fd05a93e62"` [INFO] running `"docker" "rm" "-f" "0e117f66e6a3c39647b43697e803062d97442911b928ad292f5392fd05a93e62"` [INFO] [stdout] 0e117f66e6a3c39647b43697e803062d97442911b928ad292f5392fd05a93e62