[INFO] updating cached repository feelmyears/eecs-395-hw2 [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/feelmyears/eecs-395-hw2 [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/feelmyears/eecs-395-hw2" "work/ex/clippy-test-run/sources/stable/gh/feelmyears/eecs-395-hw2"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/feelmyears/eecs-395-hw2'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/feelmyears/eecs-395-hw2" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/feelmyears/eecs-395-hw2"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/feelmyears/eecs-395-hw2'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 2076a769e25c9e258db0e3caf978a89d5c276054 [INFO] sha for GitHub repo feelmyears/eecs-395-hw2: 2076a769e25c9e258db0e3caf978a89d5c276054 [INFO] validating manifest of feelmyears/eecs-395-hw2 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 feelmyears/eecs-395-hw2 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 feelmyears/eecs-395-hw2 [INFO] finished frobbing feelmyears/eecs-395-hw2 [INFO] frobbed toml for feelmyears/eecs-395-hw2 written to work/ex/clippy-test-run/sources/stable/gh/feelmyears/eecs-395-hw2/Cargo.toml [INFO] started frobbing feelmyears/eecs-395-hw2 [INFO] finished frobbing feelmyears/eecs-395-hw2 [INFO] frobbed toml for feelmyears/eecs-395-hw2 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/feelmyears/eecs-395-hw2/Cargo.toml [INFO] crate feelmyears/eecs-395-hw2 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 feelmyears/eecs-395-hw2 against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-6/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/feelmyears/eecs-395-hw2:/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] 3bb440531f54ca53e9b6ddb297a8a402bd22dbb3f10f3df0b92da5fa5fea100d [INFO] running `"docker" "start" "-a" "3bb440531f54ca53e9b6ddb297a8a402bd22dbb3f10f3df0b92da5fa5fea100d"` [INFO] [stderr] Checking hw2 v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/counting.rs:24:2 [INFO] [stderr] | [INFO] [stderr] 24 | return counts; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `counts` [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: unneeded return statement [INFO] [stderr] --> src/correcting.rs:24:2 [INFO] [stderr] | [INFO] [stderr] 24 | return known_words; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `known_words` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/correcting.rs:32:17 [INFO] [stderr] | [INFO] [stderr] 32 | const LETTERS: &'static str = "abcdefghijklmnopqrstuvwxyz"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/correcting.rs:47:5 [INFO] [stderr] | [INFO] [stderr] 47 | return splits; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `splits` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/correcting.rs:123:5 [INFO] [stderr] | [INFO] [stderr] 123 | return edits; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `edits` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/correcting.rs:149:2 [INFO] [stderr] | [INFO] [stderr] 149 | return original_word; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `original_word` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:23:2 [INFO] [stderr] | [INFO] [stderr] 23 | return buf_reader [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `buf_reader` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/counting.rs:24:2 [INFO] [stderr] | [INFO] [stderr] 24 | return counts; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `counts` [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: unneeded return statement [INFO] [stderr] --> src/correcting.rs:24:2 [INFO] [stderr] | [INFO] [stderr] 24 | return known_words; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `known_words` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/correcting.rs:32:17 [INFO] [stderr] | [INFO] [stderr] 32 | const LETTERS: &'static str = "abcdefghijklmnopqrstuvwxyz"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/correcting.rs:47:5 [INFO] [stderr] | [INFO] [stderr] 47 | return splits; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `splits` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/correcting.rs:123:5 [INFO] [stderr] | [INFO] [stderr] 123 | return edits; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `edits` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/correcting.rs:149:2 [INFO] [stderr] | [INFO] [stderr] 149 | return original_word; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `original_word` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/correcting.rs:205:3 [INFO] [stderr] | [INFO] [stderr] 205 | return mock; [INFO] [stderr] | ^^^^^^^^^^^^ help: remove `return` as shown: `mock` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:23:2 [INFO] [stderr] | [INFO] [stderr] 23 | return buf_reader [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `buf_reader` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/correcting.rs:35:14 [INFO] [stderr] | [INFO] [stderr] 35 | for i in 0..word.chars().count()+1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `0..=word.chars().count()` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:39:23 [INFO] [stderr] | [INFO] [stderr] 39 | if j < i {word1 = word1 + word.chars().nth(j).unwrap().to_string().as_str();} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `word1 += word.chars().nth(j).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:40:19 [INFO] [stderr] | [INFO] [stderr] 40 | else {word2 = word2 + word.chars().nth(j).unwrap().to_string().as_str();} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `word2 += word.chars().nth(j).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:50:20 [INFO] [stderr] | [INFO] [stderr] 50 | fn deletes(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:56:17 [INFO] [stderr] | [INFO] [stderr] 56 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:63:23 [INFO] [stderr] | [INFO] [stderr] 63 | fn transposes(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | w2 = w2 + w.word2.chars().nth(1).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(1).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:68:13 [INFO] [stderr] | [INFO] [stderr] 68 | w2 = w2 + w.word2.chars().nth(0).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(0).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:70:17 [INFO] [stderr] | [INFO] [stderr] 70 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:77:21 [INFO] [stderr] | [INFO] [stderr] 77 | fn replaces(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:82:17 [INFO] [stderr] | [INFO] [stderr] 82 | w2 = w2 + c.to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += c.to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:84:21 [INFO] [stderr] | [INFO] [stderr] 84 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:92:20 [INFO] [stderr] | [INFO] [stderr] 92 | fn inserts(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:97:17 [INFO] [stderr] | [INFO] [stderr] 97 | w2 = w2 + c.to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += c.to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:99:21 [INFO] [stderr] | [INFO] [stderr] 99 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:107:17 [INFO] [stderr] | [INFO] [stderr] 107 | w2 = w2 + c.to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += c.to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/correcting.rs:138:5 [INFO] [stderr] | [INFO] [stderr] 138 | if candidates.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/correcting.rs:143:5 [INFO] [stderr] | [INFO] [stderr] 143 | if candidates.len() > 0 {return candidates;} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/correcting.rs:146:5 [INFO] [stderr] | [INFO] [stderr] 146 | if candidates.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:19:6 [INFO] [stderr] | [INFO] [stderr] 19 | let ref path = args[1]; [INFO] [stderr] | ----^^^^^^^^----------- help: try: `let path = &args[1];` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/correcting.rs:35:14 [INFO] [stderr] | [INFO] [stderr] 35 | for i in 0..word.chars().count()+1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `0..=word.chars().count()` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:39:23 [INFO] [stderr] | [INFO] [stderr] 39 | if j < i {word1 = word1 + word.chars().nth(j).unwrap().to_string().as_str();} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `word1 += word.chars().nth(j).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:40:19 [INFO] [stderr] | [INFO] [stderr] 40 | else {word2 = word2 + word.chars().nth(j).unwrap().to_string().as_str();} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `word2 += word.chars().nth(j).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:50:20 [INFO] [stderr] | [INFO] [stderr] 50 | fn deletes(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:56:17 [INFO] [stderr] | [INFO] [stderr] 56 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:63:23 [INFO] [stderr] | [INFO] [stderr] 63 | fn transposes(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | w2 = w2 + w.word2.chars().nth(1).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(1).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:68:13 [INFO] [stderr] | [INFO] [stderr] 68 | w2 = w2 + w.word2.chars().nth(0).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(0).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:70:17 [INFO] [stderr] | [INFO] [stderr] 70 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:77:21 [INFO] [stderr] | [INFO] [stderr] 77 | fn replaces(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:82:17 [INFO] [stderr] | [INFO] [stderr] 82 | w2 = w2 + c.to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += c.to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:84:21 [INFO] [stderr] | [INFO] [stderr] 84 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/correcting.rs:92:20 [INFO] [stderr] | [INFO] [stderr] 92 | fn inserts(splits: &Vec, bucket: &mut WordSet) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[WordSplits]` [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: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:97:17 [INFO] [stderr] | [INFO] [stderr] 97 | w2 = w2 + c.to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += c.to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:99:21 [INFO] [stderr] | [INFO] [stderr] 99 | w2 = w2 + w.word2.chars().nth(i).unwrap().to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += w.word2.chars().nth(i).unwrap().to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/correcting.rs:107:17 [INFO] [stderr] | [INFO] [stderr] 107 | w2 = w2 + c.to_string().as_str(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `w2 += c.to_string().as_str()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/correcting.rs:138:5 [INFO] [stderr] | [INFO] [stderr] 138 | if candidates.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/correcting.rs:143:5 [INFO] [stderr] | [INFO] [stderr] 143 | if candidates.len() > 0 {return candidates;} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/correcting.rs:146:5 [INFO] [stderr] | [INFO] [stderr] 146 | if candidates.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/correcting.rs:172:3 [INFO] [stderr] | [INFO] [stderr] 172 | assert_eq!(0., word_probability("nope", &counts)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::float_cmp)] on by default [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/correcting.rs:172:3 [INFO] [stderr] | [INFO] [stderr] 172 | assert_eq!(0., word_probability("nope", &counts)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/correcting.rs:180:3 [INFO] [stderr] | [INFO] [stderr] 180 | assert_eq!(0., word_probability("nope", &counts)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/correcting.rs:180:3 [INFO] [stderr] | [INFO] [stderr] 180 | assert_eq!(0., word_probability("nope", &counts)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/correcting.rs:188:3 [INFO] [stderr] | [INFO] [stderr] 188 | assert_eq!(0.5, word_probability("hello", &counts)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/correcting.rs:188:3 [INFO] [stderr] | [INFO] [stderr] 188 | assert_eq!(0.5, word_probability("hello", &counts)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:19:6 [INFO] [stderr] | [INFO] [stderr] 19 | let ref path = args[1]; [INFO] [stderr] | ----^^^^^^^^----------- help: try: `let path = &args[1];` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `hw2`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "3bb440531f54ca53e9b6ddb297a8a402bd22dbb3f10f3df0b92da5fa5fea100d"` [INFO] running `"docker" "rm" "-f" "3bb440531f54ca53e9b6ddb297a8a402bd22dbb3f10f3df0b92da5fa5fea100d"` [INFO] [stdout] 3bb440531f54ca53e9b6ddb297a8a402bd22dbb3f10f3df0b92da5fa5fea100d