[INFO] fetching crate pithy 0.1.7... [INFO] linting pithy-0.1.7 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate pithy 0.1.7 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate pithy 0.1.7 [INFO] finished tweaking crates.io crate pithy 0.1.7 [INFO] tweaked toml for crates.io crate pithy 0.1.7 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate pithy 0.1.7 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate pithy 0.1.7 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded crossbeam-epoch v0.9.6 [INFO] [stderr] Downloaded crossbeam-channel v0.5.2 [INFO] [stderr] Downloaded libc v0.2.113 [INFO] [stderr] Downloaded regex v1.4.6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 438c75d25daade7ea0d59c563e28309d2d27b77527de2a5449a69e0e84fab901 [INFO] running `Command { std: "docker" "start" "-a" "438c75d25daade7ea0d59c563e28309d2d27b77527de2a5449a69e0e84fab901", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "438c75d25daade7ea0d59c563e28309d2d27b77527de2a5449a69e0e84fab901", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "438c75d25daade7ea0d59c563e28309d2d27b77527de2a5449a69e0e84fab901", kill_on_drop: false }` [INFO] [stdout] 438c75d25daade7ea0d59c563e28309d2d27b77527de2a5449a69e0e84fab901 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7d0e16fbb822d17a638f4ade4df744cf0976ae242e480b342eb20a02aaa6bc8f [INFO] running `Command { std: "docker" "start" "-a" "7d0e16fbb822d17a638f4ade4df744cf0976ae242e480b342eb20a02aaa6bc8f", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.113 [INFO] [stderr] Compiling crossbeam-utils v0.8.6 [INFO] [stderr] Compiling crossbeam-epoch v0.9.6 [INFO] [stderr] Compiling rayon-core v1.9.1 [INFO] [stderr] Checking regex-syntax v0.6.25 [INFO] [stderr] Checking once_cell v1.9.0 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Compiling rayon v1.5.1 [INFO] [stderr] Checking crossbeam-channel v0.5.2 [INFO] [stderr] Checking terminal_size v0.1.17 [INFO] [stderr] Checking num_cpus v1.13.1 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking console v0.15.0 [INFO] [stderr] Checking colored v2.0.0 [INFO] [stderr] Checking crossbeam-deque v0.8.1 [INFO] [stderr] Checking regex v1.4.6 [INFO] [stderr] Checking indicatif v0.16.2 [INFO] [stderr] Checking pithy v0.1.7 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | words: words, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `words` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:181:21 [INFO] [stdout] | [INFO] [stdout] 181 | words: words, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `words` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:285:13 [INFO] [stdout] | [INFO] [stdout] 285 | sentences: sentences, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sentences` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | words: words, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `words` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:181:21 [INFO] [stdout] | [INFO] [stdout] 181 | words: words, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `words` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:285:13 [INFO] [stdout] | [INFO] [stdout] 285 | sentences: sentences, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sentences` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length_of_sentences_as_u32` [INFO] [stdout] --> src/lib.rs:399:13 [INFO] [stdout] | [INFO] [stdout] 399 | let length_of_sentences_as_u32 = length_of_sentences as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_length_of_sentences_as_u32` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length_of_sentences_as_u32` [INFO] [stdout] --> src/lib.rs:399:13 [INFO] [stdout] | [INFO] [stdout] 399 | let length_of_sentences_as_u32 = length_of_sentences as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_length_of_sentences_as_u32` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Summariser<'a>` [INFO] [stdout] --> src/lib.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn new() -> Summariser<'a> { [INFO] [stdout] 28 | | Summariser { [INFO] [stdout] 29 | | sentences: HashMap::new(), [INFO] [stdout] 30 | | bias_list: HashSet::new(), [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl<'a> Default for Summariser<'a> { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Summariser<'a>` [INFO] [stdout] --> src/lib.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn new() -> Summariser<'a> { [INFO] [stdout] 28 | | Summariser { [INFO] [stdout] 29 | | sentences: HashMap::new(), [INFO] [stdout] 30 | | bias_list: HashSet::new(), [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl<'a> Default for Summariser<'a> { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/lib.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | for sentence in all_sentences.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, sentence) in (self.sentences.len()..).zip(all_sentences.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/lib.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | for sentence in all_sentences.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, sentence) in (self.sentences.len()..).zip(all_sentences.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return sorted_sentences; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 - return sorted_sentences; [INFO] [stdout] 131 + sorted_sentences [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return sorted_sentences; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 - return sorted_sentences; [INFO] [stdout] 131 + sorted_sentences [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:185:17 [INFO] [stdout] | [INFO] [stdout] 176 | / let sentence = Sentence { [INFO] [stdout] 177 | | index: 0, [INFO] [stdout] 178 | | length: sentence.len(), [INFO] [stdout] 179 | | outgoing_connections: Some(outgoing_connections), [INFO] [stdout] ... | [INFO] [stdout] 183 | | originating_file: filename.clone(), [INFO] [stdout] 184 | | }; [INFO] [stdout] | |__________________- unnecessary `let` binding [INFO] [stdout] 185 | sentence [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 176 ~ [INFO] [stdout] 177 ~ Sentence { [INFO] [stdout] 178 + index: 0, [INFO] [stdout] 179 + length: sentence.len(), [INFO] [stdout] 180 + outgoing_connections: Some(outgoing_connections), [INFO] [stdout] 181 + text: sentence.to_string(), [INFO] [stdout] 182 + words: words, [INFO] [stdout] 183 + number_of_connections: 0.0, [INFO] [stdout] 184 + originating_file: filename.clone(), [INFO] [stdout] 185 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:185:17 [INFO] [stdout] | [INFO] [stdout] 176 | / let sentence = Sentence { [INFO] [stdout] 177 | | index: 0, [INFO] [stdout] 178 | | length: sentence.len(), [INFO] [stdout] 179 | | outgoing_connections: Some(outgoing_connections), [INFO] [stdout] ... | [INFO] [stdout] 183 | | originating_file: filename.clone(), [INFO] [stdout] 184 | | }; [INFO] [stdout] | |__________________- unnecessary `let` binding [INFO] [stdout] 185 | sentence [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 176 ~ [INFO] [stdout] 177 ~ Sentence { [INFO] [stdout] 178 + index: 0, [INFO] [stdout] 179 + length: sentence.len(), [INFO] [stdout] 180 + outgoing_connections: Some(outgoing_connections), [INFO] [stdout] 181 + text: sentence.to_string(), [INFO] [stdout] 182 + words: words, [INFO] [stdout] 183 + number_of_connections: 0.0, [INFO] [stdout] 184 + originating_file: filename.clone(), [INFO] [stdout] 185 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:316:12 [INFO] [stdout] | [INFO] [stdout] 316 | if !force_sum_all && length_of_sentences > 2000 [INFO] [stdout] | ____________^ [INFO] [stdout] 317 | | || !force_sum_all && return_summaries_for_each [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 316 - if !force_sum_all && length_of_sentences > 2000 [INFO] [stdout] 317 - || !force_sum_all && return_summaries_for_each [INFO] [stdout] 316 + if !(force_sum_all || length_of_sentences <= 2000 && !return_summaries_for_each) [INFO] [stdout] | [INFO] [stdout] 316 - if !force_sum_all && length_of_sentences > 2000 [INFO] [stdout] 317 - || !force_sum_all && return_summaries_for_each [INFO] [stdout] 316 + if (return_summaries_for_each || length_of_sentences > 2000) && !force_sum_all [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib.rs:292:5 [INFO] [stdout] | [INFO] [stdout] 292 | / pub fn top_sentences( [INFO] [stdout] 293 | | &mut self, [INFO] [stdout] 294 | | number_of_sentences_to_return: usize, [INFO] [stdout] 295 | | return_summaries_for_each: bool, [INFO] [stdout] ... | [INFO] [stdout] 304 | | filename_filter: String, [INFO] [stdout] 305 | | ) -> Vec { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:316:12 [INFO] [stdout] | [INFO] [stdout] 316 | if !force_sum_all && length_of_sentences > 2000 [INFO] [stdout] | ____________^ [INFO] [stdout] 317 | | || !force_sum_all && return_summaries_for_each [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 316 - if !force_sum_all && length_of_sentences > 2000 [INFO] [stdout] 317 - || !force_sum_all && return_summaries_for_each [INFO] [stdout] 316 + if !(force_sum_all || length_of_sentences <= 2000 && !return_summaries_for_each) [INFO] [stdout] | [INFO] [stdout] 316 - if !force_sum_all && length_of_sentences > 2000 [INFO] [stdout] 317 - || !force_sum_all && return_summaries_for_each [INFO] [stdout] 316 + if (return_summaries_for_each || length_of_sentences > 2000) && !force_sum_all [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/lib.rs:292:5 [INFO] [stdout] | [INFO] [stdout] 292 | / pub fn top_sentences( [INFO] [stdout] 293 | | &mut self, [INFO] [stdout] 294 | | number_of_sentences_to_return: usize, [INFO] [stdout] 295 | | return_summaries_for_each: bool, [INFO] [stdout] ... | [INFO] [stdout] 304 | | filename_filter: String, [INFO] [stdout] 305 | | ) -> Vec { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:311:34 [INFO] [stdout] | [INFO] [stdout] 311 | self.bias_strength = bias_strength.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `bias_strength` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/lib.rs:321:36 [INFO] [stdout] | [INFO] [stdout] 321 | let final_chunk_size = match chunk_size { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 322 | | Some(chunk_size) => chunk_size, [INFO] [stdout] 323 | | None => 500, [INFO] [stdout] 324 | | }; [INFO] [stdout] | |_____________^ help: replace with: `chunk_size.unwrap_or(500)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:311:34 [INFO] [stdout] | [INFO] [stdout] 311 | self.bias_strength = bias_strength.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `bias_strength` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/lib.rs:321:36 [INFO] [stdout] | [INFO] [stdout] 321 | let final_chunk_size = match chunk_size { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 322 | | Some(chunk_size) => chunk_size, [INFO] [stdout] 323 | | None => 500, [INFO] [stdout] 324 | | }; [INFO] [stdout] | |_____________^ help: replace with: `chunk_size.unwrap_or(500)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:330:25 [INFO] [stdout] | [INFO] [stdout] 330 | .chunks(final_chunk_size.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `final_chunk_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `initial` is used as a loop counter [INFO] [stdout] --> src/lib.rs:334:21 [INFO] [stdout] | [INFO] [stdout] 334 | for (_, sentence) in chunk { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (initial, (_, sentence)) in chunk.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:330:25 [INFO] [stdout] | [INFO] [stdout] 330 | .chunks(final_chunk_size.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `final_chunk_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `initial` is used as a loop counter [INFO] [stdout] --> src/lib.rs:334:21 [INFO] [stdout] | [INFO] [stdout] 334 | for (_, sentence) in chunk { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (initial, (_, sentence)) in chunk.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:335:46 [INFO] [stdout] | [INFO] [stdout] 335 | new_sentences.insert(initial.clone(), sentence.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `initial` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:335:46 [INFO] [stdout] | [INFO] [stdout] 335 | new_sentences.insert(initial.clone(), sentence.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `initial` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/lib.rs:379:37 [INFO] [stdout] | [INFO] [stdout] 379 | .enumerate() [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 380 | | .map(|(index, sentence)| (index, sentence)) [INFO] [stdout] | |___________________________________________________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/lib.rs:379:37 [INFO] [stdout] | [INFO] [stdout] 379 | .enumerate() [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 380 | | .map(|(index, sentence)| (index, sentence)) [INFO] [stdout] | |___________________________________________________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:426:21 [INFO] [stdout] | [INFO] [stdout] 426 | return (i, summed_scores) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 426 - return (i, summed_scores) [INFO] [stdout] 426 + (i, summed_scores) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:426:21 [INFO] [stdout] | [INFO] [stdout] 426 | return (i, summed_scores) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 426 - return (i, summed_scores) [INFO] [stdout] 426 + (i, summed_scores) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `scores` [INFO] [stdout] --> src/lib.rs:417:30 [INFO] [stdout] | [INFO] [stdout] 417 | for j in (i+1)..length_of_sentences { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 417 - for j in (i+1)..length_of_sentences { [INFO] [stdout] 417 + for (j, ) in scores.iter_mut().enumerate().take(length_of_sentences).skip((i+1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `scores` [INFO] [stdout] --> src/lib.rs:417:30 [INFO] [stdout] | [INFO] [stdout] 417 | for j in (i+1)..length_of_sentences { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 417 - for j in (i+1)..length_of_sentences { [INFO] [stdout] 417 + for (j, ) in scores.iter_mut().enumerate().take(length_of_sentences).skip((i+1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:418:32 [INFO] [stdout] | [INFO] [stdout] 418 | if let Some(_) = self.sentences.get(&j.clone()) { [INFO] [stdout] | -------^^^^^^^--------------------------------- help: try: `if self.sentences.get(&j.clone()).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/lib.rs:419:41 [INFO] [stdout] | [INFO] [stdout] 419 | ... scores[j] = (self.number_of_word_connections(i.clone(), j.clone()) as f32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.number_of_word_connections(i.clone(), j.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:419:74 [INFO] [stdout] | [INFO] [stdout] 419 | ... scores[j] = (self.number_of_word_connections(i.clone(), j.clone()) as f32) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:419:85 [INFO] [stdout] | [INFO] [stdout] 419 | ... scores[j] = (self.number_of_word_connections(i.clone(), j.clone()) as f32) [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:418:32 [INFO] [stdout] | [INFO] [stdout] 418 | if let Some(_) = self.sentences.get(&j.clone()) { [INFO] [stdout] | -------^^^^^^^--------------------------------- help: try: `if self.sentences.get(&j.clone()).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/lib.rs:419:41 [INFO] [stdout] | [INFO] [stdout] 419 | ... scores[j] = (self.number_of_word_connections(i.clone(), j.clone()) as f32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.number_of_word_connections(i.clone(), j.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:419:74 [INFO] [stdout] | [INFO] [stdout] 419 | ... scores[j] = (self.number_of_word_connections(i.clone(), j.clone()) as f32) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:419:85 [INFO] [stdout] | [INFO] [stdout] 419 | ... scores[j] = (self.number_of_word_connections(i.clone(), j.clone()) as f32) [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:431:22 [INFO] [stdout] | [INFO] [stdout] 431 | .map(|x| x.0.clone()) [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*x.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:431:22 [INFO] [stdout] | [INFO] [stdout] 431 | .map(|x| x.0.clone()) [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*x.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/lib.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | progress_bar: bool, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_progress_bar` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/lib.rs:360:25 [INFO] [stdout] | [INFO] [stdout] 360 | progress_bar, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 393 | progress_bar, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/lib.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | progress_bar: bool, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_progress_bar` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/lib.rs:360:25 [INFO] [stdout] | [INFO] [stdout] 360 | progress_bar, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 393 | progress_bar, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:471:17 [INFO] [stdout] | [INFO] [stdout] 471 | / return intersection_length as f32 [INFO] [stdout] 472 | | * (1.0 [INFO] [stdout] 473 | | + (overlapping_words_with_b_length as f32 * 3.0) [INFO] [stdout] 474 | | .powf(self.bias_strength.unwrap())); [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 471 ~ intersection_length as f32 [INFO] [stdout] 472 + * (1.0 [INFO] [stdout] 473 + + (overlapping_words_with_b_length as f32 * 3.0) [INFO] [stdout] 474 ~ .powf(self.bias_strength.unwrap())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:476:17 [INFO] [stdout] | [INFO] [stdout] 476 | return 0.0; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 476 - return 0.0; [INFO] [stdout] 476 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:479:13 [INFO] [stdout] | [INFO] [stdout] 479 | return 0.0; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 479 - return 0.0; [INFO] [stdout] 479 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:461:20 [INFO] [stdout] | [INFO] [stdout] 461 | if self.bias_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.bias_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:471:17 [INFO] [stdout] | [INFO] [stdout] 471 | / return intersection_length as f32 [INFO] [stdout] 472 | | * (1.0 [INFO] [stdout] 473 | | + (overlapping_words_with_b_length as f32 * 3.0) [INFO] [stdout] 474 | | .powf(self.bias_strength.unwrap())); [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 471 ~ intersection_length as f32 [INFO] [stdout] 472 + * (1.0 [INFO] [stdout] 473 + + (overlapping_words_with_b_length as f32 * 3.0) [INFO] [stdout] 474 ~ .powf(self.bias_strength.unwrap())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:476:17 [INFO] [stdout] | [INFO] [stdout] 476 | return 0.0; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 476 - return 0.0; [INFO] [stdout] 476 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:479:13 [INFO] [stdout] | [INFO] [stdout] 479 | return 0.0; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 479 - return 0.0; [INFO] [stdout] 479 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:461:20 [INFO] [stdout] | [INFO] [stdout] 461 | if self.bias_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.bias_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> bin/pithy.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> bin/pithy.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use pithy; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> bin/pithy.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> bin/pithy.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use pithy; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `second_file` after checking its variant with `is_some` [INFO] [stdout] --> bin/pithy.rs:243:48 [INFO] [stdout] | [INFO] [stdout] 242 | if second_file.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = second_file` [INFO] [stdout] 243 | let raw_text = std::fs::read_to_string(second_file.unwrap().clone()).expect("Could not open the file"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `second_file` after checking its variant with `is_some` [INFO] [stdout] --> bin/pithy.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 242 | if second_file.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = second_file` [INFO] [stdout] ... [INFO] [stdout] 245 | second_file.unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> bin/pithy.rs:273:9 [INFO] [stdout] | [INFO] [stdout] 260 | / let sum = summariser.top_sentences( [INFO] [stdout] 261 | | number_of_sentences_to_return, [INFO] [stdout] 262 | | by_section, [INFO] [stdout] 263 | | chunk_size, [INFO] [stdout] ... | [INFO] [stdout] 271 | | filename.clone(), [INFO] [stdout] 272 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 273 | sum [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 260 ~ [INFO] [stdout] 261 ~ summariser.top_sentences( [INFO] [stdout] 262 + number_of_sentences_to_return, [INFO] [stdout] 263 + by_section, [INFO] [stdout] 264 + chunk_size, [INFO] [stdout] 265 + force_all, [INFO] [stdout] 266 + length_penalty, [INFO] [stdout] 267 + force_chunk, [INFO] [stdout] 268 + density, [INFO] [stdout] 269 + bias_list, [INFO] [stdout] 270 + bias_strength, [INFO] [stdout] 271 + !use_bar, [INFO] [stdout] 272 + filename.clone(), [INFO] [stdout] 273 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> bin/pithy.rs:280:9 [INFO] [stdout] | [INFO] [stdout] 275 | / let sum = summariser.approximate_top_sentences( [INFO] [stdout] 276 | | number_of_sentences_to_return, [INFO] [stdout] 277 | | density, [INFO] [stdout] 278 | | length_penalty, [INFO] [stdout] 279 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 280 | sum [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 275 ~ [INFO] [stdout] 276 ~ summariser.approximate_top_sentences( [INFO] [stdout] 277 + number_of_sentences_to_return, [INFO] [stdout] 278 + density, [INFO] [stdout] 279 + length_penalty, [INFO] [stdout] 280 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> bin/pithy.rs:298:42 [INFO] [stdout] | [INFO] [stdout] 298 | let previous_sentence_indx = sentence_indices [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 299 | | .iter() [INFO] [stdout] 300 | | .filter(|x| **x < index_number) [INFO] [stdout] 301 | | .last() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 301 - .last() [INFO] [stdout] 301 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> bin/pithy.rs:303:38 [INFO] [stdout] | [INFO] [stdout] 303 | let next_sentence_indx = sentence_indices [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 304 | | .iter() [INFO] [stdout] 305 | | .filter(|x| **x > index_number) [INFO] [stdout] 306 | | .next() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 303 ~ let next_sentence_indx = sentence_indices [INFO] [stdout] 304 + .iter().find(|x| **x > index_number) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(previous_sentence_indx).is_some()` [INFO] [stdout] --> bin/pithy.rs:308:61 [INFO] [stdout] | [INFO] [stdout] 308 | let previous_sentence = if summariser.sentences.get(previous_sentence_indx).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(previous_sentence_indx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(next_sentence_indx).is_some()` [INFO] [stdout] --> bin/pithy.rs:318:57 [INFO] [stdout] | [INFO] [stdout] 318 | let next_sentence = if summariser.sentences.get(next_sentence_indx).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(next_sentence_indx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> bin/pithy.rs:344:13 [INFO] [stdout] | [INFO] [stdout] 344 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> bin/pithy.rs:347:5 [INFO] [stdout] | [INFO] [stdout] 347 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `second_file` after checking its variant with `is_some` [INFO] [stdout] --> bin/pithy.rs:243:48 [INFO] [stdout] | [INFO] [stdout] 242 | if second_file.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = second_file` [INFO] [stdout] 243 | let raw_text = std::fs::read_to_string(second_file.unwrap().clone()).expect("Could not open the file"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `second_file` after checking its variant with `is_some` [INFO] [stdout] --> bin/pithy.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 242 | if second_file.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = second_file` [INFO] [stdout] ... [INFO] [stdout] 245 | second_file.unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> bin/pithy.rs:273:9 [INFO] [stdout] | [INFO] [stdout] 260 | / let sum = summariser.top_sentences( [INFO] [stdout] 261 | | number_of_sentences_to_return, [INFO] [stdout] 262 | | by_section, [INFO] [stdout] 263 | | chunk_size, [INFO] [stdout] ... | [INFO] [stdout] 271 | | filename.clone(), [INFO] [stdout] 272 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 273 | sum [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 260 ~ [INFO] [stdout] 261 ~ summariser.top_sentences( [INFO] [stdout] 262 + number_of_sentences_to_return, [INFO] [stdout] 263 + by_section, [INFO] [stdout] 264 + chunk_size, [INFO] [stdout] 265 + force_all, [INFO] [stdout] 266 + length_penalty, [INFO] [stdout] 267 + force_chunk, [INFO] [stdout] 268 + density, [INFO] [stdout] 269 + bias_list, [INFO] [stdout] 270 + bias_strength, [INFO] [stdout] 271 + !use_bar, [INFO] [stdout] 272 + filename.clone(), [INFO] [stdout] 273 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> bin/pithy.rs:280:9 [INFO] [stdout] | [INFO] [stdout] 275 | / let sum = summariser.approximate_top_sentences( [INFO] [stdout] 276 | | number_of_sentences_to_return, [INFO] [stdout] 277 | | density, [INFO] [stdout] 278 | | length_penalty, [INFO] [stdout] 279 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 280 | sum [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 275 ~ [INFO] [stdout] 276 ~ summariser.approximate_top_sentences( [INFO] [stdout] 277 + number_of_sentences_to_return, [INFO] [stdout] 278 + density, [INFO] [stdout] 279 + length_penalty, [INFO] [stdout] 280 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> bin/pithy.rs:298:42 [INFO] [stdout] | [INFO] [stdout] 298 | let previous_sentence_indx = sentence_indices [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 299 | | .iter() [INFO] [stdout] 300 | | .filter(|x| **x < index_number) [INFO] [stdout] 301 | | .last() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 301 - .last() [INFO] [stdout] 301 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> bin/pithy.rs:303:38 [INFO] [stdout] | [INFO] [stdout] 303 | let next_sentence_indx = sentence_indices [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 304 | | .iter() [INFO] [stdout] 305 | | .filter(|x| **x > index_number) [INFO] [stdout] 306 | | .next() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 303 ~ let next_sentence_indx = sentence_indices [INFO] [stdout] 304 + .iter().find(|x| **x > index_number) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(previous_sentence_indx).is_some()` [INFO] [stdout] --> bin/pithy.rs:308:61 [INFO] [stdout] | [INFO] [stdout] 308 | let previous_sentence = if summariser.sentences.get(previous_sentence_indx).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(previous_sentence_indx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(next_sentence_indx).is_some()` [INFO] [stdout] --> bin/pithy.rs:318:57 [INFO] [stdout] | [INFO] [stdout] 318 | let next_sentence = if summariser.sentences.get(next_sentence_indx).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(next_sentence_indx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> bin/pithy.rs:344:13 [INFO] [stdout] | [INFO] [stdout] 344 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> bin/pithy.rs:347:5 [INFO] [stdout] | [INFO] [stdout] 347 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.82s [INFO] running `Command { std: "docker" "inspect" "7d0e16fbb822d17a638f4ade4df744cf0976ae242e480b342eb20a02aaa6bc8f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7d0e16fbb822d17a638f4ade4df744cf0976ae242e480b342eb20a02aaa6bc8f", kill_on_drop: false }` [INFO] [stdout] 7d0e16fbb822d17a638f4ade4df744cf0976ae242e480b342eb20a02aaa6bc8f