[INFO] cloning repository https://github.com/azizka85/azizka_rust_i18n [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/azizka85/azizka_rust_i18n" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fazizka85%2Fazizka_rust_i18n", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fazizka85%2Fazizka_rust_i18n'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] adcfe45e75fb1568b39f63172a49f91a887e1df5 [INFO] linting azizka85/azizka_rust_i18n against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fazizka85%2Fazizka_rust_i18n" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/azizka85/azizka_rust_i18n [INFO] finished tweaking git repo https://github.com/azizka85/azizka_rust_i18n [INFO] tweaked toml for git repo https://github.com/azizka85/azizka_rust_i18n written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/azizka85/azizka_rust_i18n on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/azizka85/azizka_rust_i18n 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 58c9c94ebcd600540643df171136ad0054d6aa13aca686389a617e3a3e085a8a [INFO] running `Command { std: "docker" "start" "-a" "58c9c94ebcd600540643df171136ad0054d6aa13aca686389a617e3a3e085a8a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "58c9c94ebcd600540643df171136ad0054d6aa13aca686389a617e3a3e085a8a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "58c9c94ebcd600540643df171136ad0054d6aa13aca686389a617e3a3e085a8a", kill_on_drop: false }` [INFO] [stdout] 58c9c94ebcd600540643df171136ad0054d6aa13aca686389a617e3a3e085a8a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 567aaa901952386b9b1b1d8125806530f115da51afaf19d291b3de02ad031138 [INFO] running `Command { std: "docker" "start" "-a" "567aaa901952386b9b1b1d8125806530f115da51afaf19d291b3de02ad031138", kill_on_drop: false }` [INFO] [stderr] Compiling syn v1.0.91 [INFO] [stderr] Compiling serde v1.0.136 [INFO] [stderr] Compiling proc-macro2 v1.0.37 [INFO] [stderr] Compiling quote v1.0.17 [INFO] [stderr] Compiling serde_derive v1.0.136 [INFO] [stderr] Checking azizka_rust_i18n v0.3.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | extension: Option, [INFO] [stdout] 51 | | formatting: Option<&'a HashMap<&'a str, &'a str>>, [INFO] [stdout] 52 | | data: Option<&'a HashMap<&'a str, &'a str>> [INFO] [stdout] 53 | | ) -> String> [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:130:37 [INFO] [stdout] | [INFO] [stdout] 130 | let actual = translator.translate(&key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:175:5 [INFO] [stdout] | [INFO] [stdout] 175 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:197:5 [INFO] [stdout] | [INFO] [stdout] 197 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:262:5 [INFO] [stdout] | [INFO] [stdout] 262 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/lib.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / ... data_contexts [INFO] [stdout] 81 | | ... .iter() [INFO] [stdout] 82 | | ... .map(|context| context.clone()) [INFO] [stdout] | |_________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 80 ~ data_contexts [INFO] [stdout] 81 ~ .iter().cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | extension: fn( [INFO] [stdout] | ____________________^ [INFO] [stdout] 119 | | text: &'a str, [INFO] [stdout] 120 | | num: Option, [INFO] [stdout] 121 | | formatting: Option<&'a HashMap<&'a str, &'a str>>, [INFO] [stdout] 122 | | data: Option<&'a HashMap<&'a str, &'a str>> [INFO] [stdout] 123 | | ) -> String [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:180:3 [INFO] [stdout] | [INFO] [stdout] 180 | return self.translate_text(text, num, formatting, context); [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] 180 - return self.translate_text(text, num, formatting, context); [INFO] [stdout] 180 + self.translate_text(text, num, formatting, context) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/lib.rs:145:7 [INFO] [stdout] | [INFO] [stdout] 145 | / if let NumOrFormatting::Formatting(default_context) = num_or_formatting_or_context_val { [INFO] [stdout] 146 | | context = default_context; [INFO] [stdout] 147 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/lib.rs:144:18 [INFO] [stdout] | [INFO] [stdout] 144 | if let Some(num_or_formatting_or_context_val) = num_or_formatting_or_context { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 145 | if let NumOrFormatting::Formatting(default_context) = num_or_formatting_or_context_val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/lib.rs:154:7 [INFO] [stdout] | [INFO] [stdout] 154 | / if let NumOrFormatting::Formatting(default_formatting) = num_or_formatting_or_context_val { [INFO] [stdout] 155 | | formatting = Some(default_formatting); [INFO] [stdout] 156 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/lib.rs:153:18 [INFO] [stdout] | [INFO] [stdout] 153 | if let Some(num_or_formatting_or_context_val) = num_or_formatting_or_context { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 154 | if let NumOrFormatting::Formatting(default_formatting) = num_or_formatting_or_context_val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:272:7 [INFO] [stdout] | [INFO] [stdout] 272 | / !num_is_null && ( [INFO] [stdout] 273 | | !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 | | low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 | | ) { [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] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + !(num_is_null || !low_is_null && num_val < low || low_is_null && high_is_null || !high_is_null && num_val > high) { [INFO] [stdout] | [INFO] [stdout] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + (num_val <= high || high_is_null) && (!high_is_null || !low_is_null) && (num_val >= low || low_is_null) && !num_is_null { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:272:23 [INFO] [stdout] | [INFO] [stdout] 272 | !num_is_null && ( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 273 | | !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 | | low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 | | ) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + !num_is_null && !(!low_is_null && num_val < low || low_is_null && high_is_null || !high_is_null && num_val > high) { [INFO] [stdout] | [INFO] [stdout] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + !num_is_null && (num_val <= high || high_is_null) && (!high_is_null || !low_is_null) && (num_val >= low || low_is_null) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib.rs:236:39 [INFO] [stdout] | [INFO] [stdout] 236 | let text = apply_numbers(&text, if let Some(num) = num { num } else { 0 }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | let text = apply_numbers(&triple.2, num_val); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `triple.2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:296:3 [INFO] [stdout] | [INFO] [stdout] 296 | return translator; [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] 296 - return translator; [INFO] [stdout] 296 + translator [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/lib.rs:300:22 [INFO] [stdout] | [INFO] [stdout] 300 | pub fn apply_numbers<'a>(str: &'a str, num: i64) -> String { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 300 - pub fn apply_numbers<'a>(str: &'a str, num: i64) -> String { [INFO] [stdout] 300 + pub fn apply_numbers(str: &str, num: i64) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:303:2 [INFO] [stdout] | [INFO] [stdout] 303 | return str.replace("%n", &num.to_string()); [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] 303 - return str.replace("%n", &num.to_string()); [INFO] [stdout] 303 + str.replace("%n", &num.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:315:2 [INFO] [stdout] | [INFO] [stdout] 315 | return text; [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] 315 - return text; [INFO] [stdout] 315 + text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:335:2 [INFO] [stdout] | [INFO] [stdout] 335 | return None; [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] 335 - return None; [INFO] [stdout] 335 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type [INFO] [stdout] --> src/lib.rs:66:36 [INFO] [stdout] | [INFO] [stdout] 66 | ... .map(|(key, value)| (key.clone(), value.clone())) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/lib.rs:96:33 [INFO] [stdout] | [INFO] [stdout] 96 | self.global_context.insert(key.clone(), value.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/lib.rs:96:48 [INFO] [stdout] | [INFO] [stdout] 96 | self.global_context.insert(key.clone(), value.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:287:5 [INFO] [stdout] | [INFO] [stdout] 287 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:353:5 [INFO] [stdout] | [INFO] [stdout] 353 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:377:5 [INFO] [stdout] | [INFO] [stdout] 377 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:446:5 [INFO] [stdout] | [INFO] [stdout] 446 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:455:5 [INFO] [stdout] | [INFO] [stdout] 455 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:464:5 [INFO] [stdout] | [INFO] [stdout] 464 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:473:5 [INFO] [stdout] | [INFO] [stdout] 473 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests.rs:482:5 [INFO] [stdout] | [INFO] [stdout] 482 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | extension: Option, [INFO] [stdout] 51 | | formatting: Option<&'a HashMap<&'a str, &'a str>>, [INFO] [stdout] 52 | | data: Option<&'a HashMap<&'a str, &'a str>> [INFO] [stdout] 53 | | ) -> String> [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/lib.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / ... data_contexts [INFO] [stdout] 81 | | ... .iter() [INFO] [stdout] 82 | | ... .map(|context| context.clone()) [INFO] [stdout] | |_________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 80 ~ data_contexts [INFO] [stdout] 81 ~ .iter().cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | extension: fn( [INFO] [stdout] | ____________________^ [INFO] [stdout] 119 | | text: &'a str, [INFO] [stdout] 120 | | num: Option, [INFO] [stdout] 121 | | formatting: Option<&'a HashMap<&'a str, &'a str>>, [INFO] [stdout] 122 | | data: Option<&'a HashMap<&'a str, &'a str>> [INFO] [stdout] 123 | | ) -> String [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:180:3 [INFO] [stdout] | [INFO] [stdout] 180 | return self.translate_text(text, num, formatting, context); [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] 180 - return self.translate_text(text, num, formatting, context); [INFO] [stdout] 180 + self.translate_text(text, num, formatting, context) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/lib.rs:145:7 [INFO] [stdout] | [INFO] [stdout] 145 | / if let NumOrFormatting::Formatting(default_context) = num_or_formatting_or_context_val { [INFO] [stdout] 146 | | context = default_context; [INFO] [stdout] 147 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/lib.rs:144:18 [INFO] [stdout] | [INFO] [stdout] 144 | if let Some(num_or_formatting_or_context_val) = num_or_formatting_or_context { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 145 | if let NumOrFormatting::Formatting(default_context) = num_or_formatting_or_context_val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/lib.rs:154:7 [INFO] [stdout] | [INFO] [stdout] 154 | / if let NumOrFormatting::Formatting(default_formatting) = num_or_formatting_or_context_val { [INFO] [stdout] 155 | | formatting = Some(default_formatting); [INFO] [stdout] 156 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/lib.rs:153:18 [INFO] [stdout] | [INFO] [stdout] 153 | if let Some(num_or_formatting_or_context_val) = num_or_formatting_or_context { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 154 | if let NumOrFormatting::Formatting(default_formatting) = num_or_formatting_or_context_val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:272:7 [INFO] [stdout] | [INFO] [stdout] 272 | / !num_is_null && ( [INFO] [stdout] 273 | | !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 | | low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 | | ) { [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] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + !(num_is_null || !low_is_null && num_val < low || low_is_null && high_is_null || !high_is_null && num_val > high) { [INFO] [stdout] | [INFO] [stdout] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + (num_val <= high || high_is_null) && (!high_is_null || !low_is_null) && (num_val >= low || low_is_null) && !num_is_null { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:272:23 [INFO] [stdout] | [INFO] [stdout] 272 | !num_is_null && ( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 273 | | !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 | | low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 | | ) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + !num_is_null && !(!low_is_null && num_val < low || low_is_null && high_is_null || !high_is_null && num_val > high) { [INFO] [stdout] | [INFO] [stdout] 272 - !num_is_null && ( [INFO] [stdout] 273 - !low_is_null && num_val >= low && (high_is_null || num_val <= high) || [INFO] [stdout] 274 - low_is_null && !high_is_null && num_val <= high [INFO] [stdout] 275 - ) { [INFO] [stdout] 272 + !num_is_null && (num_val <= high || high_is_null) && (!high_is_null || !low_is_null) && (num_val >= low || low_is_null) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib.rs:236:39 [INFO] [stdout] | [INFO] [stdout] 236 | let text = apply_numbers(&text, if let Some(num) = num { num } else { 0 }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | let text = apply_numbers(&triple.2, num_val); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `triple.2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:296:3 [INFO] [stdout] | [INFO] [stdout] 296 | return translator; [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] 296 - return translator; [INFO] [stdout] 296 + translator [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/lib.rs:300:22 [INFO] [stdout] | [INFO] [stdout] 300 | pub fn apply_numbers<'a>(str: &'a str, num: i64) -> String { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 300 - pub fn apply_numbers<'a>(str: &'a str, num: i64) -> String { [INFO] [stdout] 300 + pub fn apply_numbers(str: &str, num: i64) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:303:2 [INFO] [stdout] | [INFO] [stdout] 303 | return str.replace("%n", &num.to_string()); [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] 303 - return str.replace("%n", &num.to_string()); [INFO] [stdout] 303 + str.replace("%n", &num.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:315:2 [INFO] [stdout] | [INFO] [stdout] 315 | return text; [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] 315 - return text; [INFO] [stdout] 315 + text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:335:2 [INFO] [stdout] | [INFO] [stdout] 335 | return None; [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] 335 - return None; [INFO] [stdout] 335 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tests.rs:425:17 [INFO] [stdout] | [INFO] [stdout] 425 | else if vec![2, 3, 4].contains(&(num % 10)) && !vec![12, 13, 14].contains(&(num % 100)) { "few" } [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `[2, 3, 4]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tests.rs:425:57 [INFO] [stdout] | [INFO] [stdout] 425 | else if vec![2, 3, 4].contains(&(num % 10)) && !vec![12, 13, 14].contains(&(num % 100)) { "few" } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `[12, 13, 14]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tests.rs:426:34 [INFO] [stdout] | [INFO] [stdout] 426 | else if num % 10 == 0 || vec![5, 6, 7, 8, 9].contains(&(num % 10)) || vec![11, 12, 13, 14].contains(&(num % 100)) { "many" } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[5, 6, 7, 8, 9]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tests.rs:426:79 [INFO] [stdout] | [INFO] [stdout] 426 | else if num % 10 == 0 || vec![5, 6, 7, 8, 9].contains(&(num % 10)) || vec![11, 12, 13, 14].contains(&(num % 100)) { "many" } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[11, 12, 13, 14]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type [INFO] [stdout] --> src/lib.rs:66:36 [INFO] [stdout] | [INFO] [stdout] 66 | ... .map(|(key, value)| (key.clone(), value.clone())) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/lib.rs:96:33 [INFO] [stdout] | [INFO] [stdout] 96 | self.global_context.insert(key.clone(), value.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/lib.rs:96:48 [INFO] [stdout] | [INFO] [stdout] 96 | self.global_context.insert(key.clone(), value.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:15:15 [INFO] [stdout] | [INFO] [stdout] 15 | (key.clone(), Value::Single(value.clone())) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:15:44 [INFO] [stdout] | [INFO] [stdout] 15 | (key.clone(), Value::Single(value.clone())) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | (key.clone(), Value::List( [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | (key.clone(), Value::List( [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:228:19 [INFO] [stdout] | [INFO] [stdout] 228 | (key.clone(), Value::Single("%{name} updated his profile")) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:236:19 [INFO] [stdout] | [INFO] [stdout] 236 | (key.clone(), Value::Single("%{name} updated her profile")) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:310:19 [INFO] [stdout] | [INFO] [stdout] 310 | (key.clone(), Value::List( [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:322:19 [INFO] [stdout] | [INFO] [stdout] 322 | (key.clone(), Value::List( [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tests.rs:401:15 [INFO] [stdout] | [INFO] [stdout] 401 | (key.clone(), Value::Map( [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.28s [INFO] running `Command { std: "docker" "inspect" "567aaa901952386b9b1b1d8125806530f115da51afaf19d291b3de02ad031138", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "567aaa901952386b9b1b1d8125806530f115da51afaf19d291b3de02ad031138", kill_on_drop: false }` [INFO] [stdout] 567aaa901952386b9b1b1d8125806530f115da51afaf19d291b3de02ad031138