[INFO] cloning repository https://github.com/Freyskeyd/nlp [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Freyskeyd/nlp" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFreyskeyd%2Fnlp", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFreyskeyd%2Fnlp'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 534dcc63a77c7399e83f4cbff7e8a2a95cef873f [INFO] linting Freyskeyd/nlp against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFreyskeyd%2Fnlp" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Freyskeyd/nlp [INFO] finished tweaking git repo https://github.com/Freyskeyd/nlp [INFO] tweaked toml for git repo https://github.com/Freyskeyd/nlp written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Freyskeyd/nlp 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/Freyskeyd/nlp 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded itertools v0.4.3 [INFO] [stderr] Downloaded clippy v0.0.35 [INFO] [stderr] Downloaded unicode-normalization v0.1.1 [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] 00d9ec6ac3836c34d4d34dc9a72c0000a627e319304393008bd758cf952989f8 [INFO] running `Command { std: "docker" "start" "-a" "00d9ec6ac3836c34d4d34dc9a72c0000a627e319304393008bd758cf952989f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "00d9ec6ac3836c34d4d34dc9a72c0000a627e319304393008bd758cf952989f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "00d9ec6ac3836c34d4d34dc9a72c0000a627e319304393008bd758cf952989f8", kill_on_drop: false }` [INFO] [stdout] 00d9ec6ac3836c34d4d34dc9a72c0000a627e319304393008bd758cf952989f8 [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] d447dbc9adc0e12dd306b4530bc21409ef067079e681e38ccf5f345d9f1d8e0d [INFO] running `Command { std: "docker" "start" "-a" "d447dbc9adc0e12dd306b4530bc21409ef067079e681e38ccf5f345d9f1d8e0d", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking itertools v0.4.3 [INFO] [stderr] Checking nlp v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition value: `dev` [INFO] [stdout] --> src/lib.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | #![cfg_attr(feature = "dev", allow(unstable_features))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `clippy` [INFO] [stdout] = help: consider adding `dev` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `dev` [INFO] [stdout] --> src/lib.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | #![cfg_attr(feature = "dev", feature(plugin))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `clippy` [INFO] [stdout] = help: consider adding `dev` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `dev` [INFO] [stdout] --> src/lib.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | #![cfg_attr(feature = "dev", plugin(clippy))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `clippy` [INFO] [stdout] = help: consider adding `dev` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `#[macro_use]` import [INFO] [stdout] --> src/lib.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | #[macro_use] extern crate itertools; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | static VOWELS: &'static str = "AEIOUY"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:2:22 [INFO] [stdout] | [INFO] [stdout] 2 | static VOWELS_NO_Y: &'static str = "AEIOU"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/phonetics/soundex.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | first_char: first_char, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `first_char` [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/phonetics/soundex.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | soundex_chars: soundex_chars [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `soundex_chars` [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: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | static L_R_N_M_B_H_F_V_W_SPACE: &'static [&'static str] = &["L", "R", "N", "M", "B", "H", "F", "V", "W", "SPACE"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:4:44 [INFO] [stdout] | [INFO] [stdout] 4 | static L_R_N_M_B_H_F_V_W_SPACE: &'static [&'static str] = &["L", "R", "N", "M", "B", "H", "F", "V", "W", "SPACE"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:1:43 [INFO] [stdout] | [INFO] [stdout] 1 | static ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER: &'static [&'static str] = &["ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:1:53 [INFO] [stdout] | [INFO] [stdout] 1 | static ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER: &'static [&'static str] = &["ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:2:26 [INFO] [stdout] | [INFO] [stdout] 2 | static L_T_K_S_N_M_B_Z: &'static [&'static str] = &["L", "T", "K", "S", "N", "M", "B", "Z"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:2:36 [INFO] [stdout] | [INFO] [stdout] 2 | static L_T_K_S_N_M_B_Z: &'static [&'static str] = &["L", "T", "K", "S", "N", "M", "B", "Z"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:5:23 [INFO] [stdout] | [INFO] [stdout] 5 | static SILENT_START: &'static [&'static str] = &["GN", "KN", "PN", "WR", "PS"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:5:33 [INFO] [stdout] | [INFO] [stdout] 5 | static SILENT_START: &'static [&'static str] = &["GN", "KN", "PN", "WR", "PS"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:27:36 [INFO] [stdout] | [INFO] [stdout] 27 | while !result.is_complete() && index <= value.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `index < value.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | static FRONTV: &'static str = "EIY"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | static VARSON: &'static str = "CSPTG"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + !(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED"))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `dev` [INFO] [stdout] --> src/lib.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | #![cfg_attr(feature = "dev", allow(unstable_features))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `clippy` [INFO] [stdout] = help: consider adding `dev` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `dev` [INFO] [stdout] --> src/lib.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | #![cfg_attr(feature = "dev", feature(plugin))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `clippy` [INFO] [stdout] = help: consider adding `dev` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `dev` [INFO] [stdout] --> src/lib.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | #![cfg_attr(feature = "dev", plugin(clippy))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `clippy` [INFO] [stdout] = help: consider adding `dev` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `#[macro_use]` import [INFO] [stdout] --> src/lib.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | #[macro_use] extern crate itertools; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | static VOWELS: &'static str = "AEIOUY"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:2:22 [INFO] [stdout] | [INFO] [stdout] 2 | static VOWELS_NO_Y: &'static str = "AEIOU"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/phonetics/soundex.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | first_char: first_char, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `first_char` [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/phonetics/soundex.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | soundex_chars: soundex_chars [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `soundex_chars` [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: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | static L_R_N_M_B_H_F_V_W_SPACE: &'static [&'static str] = &["L", "R", "N", "M", "B", "H", "F", "V", "W", "SPACE"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:4:44 [INFO] [stdout] | [INFO] [stdout] 4 | static L_R_N_M_B_H_F_V_W_SPACE: &'static [&'static str] = &["L", "R", "N", "M", "B", "H", "F", "V", "W", "SPACE"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:1:43 [INFO] [stdout] | [INFO] [stdout] 1 | static ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER: &'static [&'static str] = &["ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:1:53 [INFO] [stdout] | [INFO] [stdout] 1 | static ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER: &'static [&'static str] = &["ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:2:26 [INFO] [stdout] | [INFO] [stdout] 2 | static L_T_K_S_N_M_B_Z: &'static [&'static str] = &["L", "T", "K", "S", "N", "M", "B", "Z"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:2:36 [INFO] [stdout] | [INFO] [stdout] 2 | static L_T_K_S_N_M_B_Z: &'static [&'static str] = &["L", "T", "K", "S", "N", "M", "B", "Z"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:5:23 [INFO] [stdout] | [INFO] [stdout] 5 | static SILENT_START: &'static [&'static str] = &["GN", "KN", "PN", "WR", "PS"]; [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:5:33 [INFO] [stdout] | [INFO] [stdout] 5 | static SILENT_START: &'static [&'static str] = &["GN", "KN", "PN", "WR", "PS"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:27:36 [INFO] [stdout] | [INFO] [stdout] 27 | while !result.is_complete() && index <= value.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `index < value.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | static FRONTV: &'static str = "EIY"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | static VARSON: &'static str = "CSPTG"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + !(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED"))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/distance.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | if a.len() == 0 || b.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.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: length comparison to zero [INFO] [stdout] --> src/distance.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | if a.len() == 0 || b.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `b.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] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/distance.rs:44:37 [INFO] [stdout] | [INFO] [stdout] 44 | let mut b_consumed: Vec = repeat(false).take(b.len()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(false, b.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` 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/distance.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | match a.cmp(&b) { [INFO] [stdout] | ^^ help: change this to: `b` [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: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/distance.rs:133:46 [INFO] [stdout] | [INFO] [stdout] 133 | let mut curr_distances = repeat(0).take(b.len()+1).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, b.len()+1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/distance.rs:262:31 [INFO] [stdout] | [INFO] [stdout] 262 | assert!((0.411 - jaro(&"Friedrich Nietzsche".to_owned(), &"Jean-Paul Sartre".to_owned())).abs() < 0.001) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"Friedrich Nietzsche"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/distance.rs:262:66 [INFO] [stdout] | [INFO] [stdout] 262 | assert!((0.411 - jaro(&"Friedrich Nietzsche".to_owned(), &"Jean-Paul Sartre".to_owned())).abs() < 0.001) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"Jean-Paul Sartre"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/distance.rs:271:21 [INFO] [stdout] | [INFO] [stdout] 271 | vv.push(&v); [INFO] [stdout] | ^^ help: change this to: `v` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn contains(value: &String, start: usize, len: usize, search: &str) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - pub fn contains(value: &String, start: usize, len: usize, search: &str) -> bool { [INFO] [stdout] 18 + pub fn contains(value: &str, start: usize, len: usize, search: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:30:10 [INFO] [stdout] | [INFO] [stdout] 30 | .fold(false, |acc, x| acc || x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x)` [INFO] [stdout] | [INFO] [stdout] = note: the `any` method is short circuiting and may change the program semantics if the iterator has side effects [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn char_at(value: &String, index: usize) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 33 - pub fn char_at(value: &String, index: usize) -> Option { [INFO] [stdout] 33 + pub fn char_at(value: &str, index: usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / match char_at(value, index) { [INFO] [stdout] 39 | | Some(v) if v == search => true, [INFO] [stdout] 40 | | _ => false [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 38 - match char_at(value, index) { [INFO] [stdout] 39 - Some(v) if v == search => true, [INFO] [stdout] 40 - _ => false [INFO] [stdout] 41 - } [INFO] [stdout] 38 + matches!(char_at(value, index), Some(v) if v == search) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `phonetics::soundex::SoundexWord` [INFO] [stdout] --> src/phonetics/soundex.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / fn to_string(&self) -> String { [INFO] [stdout] 76 | | self.first_char.to_string() + [INFO] [stdout] 77 | | &self.soundex_chars.iter().map(|x| { [INFO] [stdout] 78 | | match *x { [INFO] [stdout] ... | [INFO] [stdout] 88 | | }).join("") [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `phonetics::soundex::SoundexWord` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | } else if index <= 1 { [INFO] [stdout] | __________________________^ [INFO] [stdout] 10 | | false [INFO] [stdout] 11 | | } else if is_vowel(&value, index - 2) || [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:12:47 [INFO] [stdout] | [INFO] [stdout] 12 | !contains(&value, index -1, 3, "ACH") { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 13 | | false [INFO] [stdout] 14 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` 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/phonetics/metaphone/conditions.rs:7:17 [INFO] [stdout] | [INFO] [stdout] 7 | if contains(&value, index, 4, "CHIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | } else if is_vowel(&value, index - 2) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:12:19 [INFO] [stdout] | [INFO] [stdout] 12 | !contains(&value, index -1, 3, "ACH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:15:31 [INFO] [stdout] | [INFO] [stdout] 15 | ... (!char_at_match_after(&value, index, 2, 'I') && !char_at_match_after(&value, index, 2, 'E')) || contains_at_least_one(&value, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:15:78 [INFO] [stdout] | [INFO] [stdout] 15 | ... (!char_at_match_after(&value, index, 2, 'I') && !char_at_match_after(&value, index, 2, 'E')) || contains_at_least_one(&value, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:15:127 [INFO] [stdout] | [INFO] [stdout] 15 | ...lue, index, 2, 'E')) || contains_at_least_one(&value, index - 2, 6, &["BACHER", "MACHER"]) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | if index != 0 { [INFO] [stdout] | ___________________^ [INFO] [stdout] 21 | | false [INFO] [stdout] 22 | | } else if [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:24:85 [INFO] [stdout] | [INFO] [stdout] 24 | !contains_at_least_one(&value, index + 1, 3, &["HOR", "HYM", "HIA", "HEM"]) { [INFO] [stdout] | _____________________________________________________________________________________^ [INFO] [stdout] 25 | | false [INFO] [stdout] 26 | | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:24:85 [INFO] [stdout] | [INFO] [stdout] 24 | !contains_at_least_one(&value, index + 1, 3, &["HOR", "HYM", "HIA", "HEM"]) { [INFO] [stdout] | _____________________________________________________________________________________^ [INFO] [stdout] 25 | | false [INFO] [stdout] 26 | | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:26:47 [INFO] [stdout] | [INFO] [stdout] 26 | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 27 | | false [INFO] [stdout] 28 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:23:32 [INFO] [stdout] | [INFO] [stdout] 23 | !contains_at_least_one(&value, index + 1, 5, &["HARAC", "HARIS"]) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: length comparison to zero [INFO] [stdout] --> src/distance.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | if a.len() == 0 || b.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.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: length comparison to zero [INFO] [stdout] --> src/distance.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | if a.len() == 0 || b.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `b.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:24:32 [INFO] [stdout] | [INFO] [stdout] 24 | !contains_at_least_one(&value, index + 1, 3, &["HOR", "HYM", "HIA", "HEM"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | ____________^ [INFO] [stdout] 27 | | false [INFO] [stdout] 28 | | } else { [INFO] [stdout] 29 | | true [INFO] [stdout] 30 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ !contains(&value, 0, 5, "CHORE") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/distance.rs:44:37 [INFO] [stdout] | [INFO] [stdout] 44 | let mut b_consumed: Vec = repeat(false).take(b.len()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(false, b.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` 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/phonetics/metaphone/conditions.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:34:35 [INFO] [stdout] | [INFO] [stdout] 34 | let a = contains_at_least_one(&value, 0, 4, &["VAN", "VON"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:35:48 [INFO] [stdout] | [INFO] [stdout] 35 | let b = index > 1 && contains_at_least_one(&value, index - 2, 6, &["ORCHES", "ARCHIT", "ORCHID"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:36:35 [INFO] [stdout] | [INFO] [stdout] 36 | let c = contains_at_least_one(&value, index + 2, 1, &["T", "S"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:37:48 [INFO] [stdout] | [INFO] [stdout] 37 | let d = index > 0 && contains_at_least_one(&value, index - 1, 1, &["A", "O", "U", "E"]) || index == 0; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:38:35 [INFO] [stdout] | [INFO] [stdout] 38 | let e = contains_at_least_one(&value, index + 2, 1, L_R_N_M_B_H_F_V_W_SPACE) || index + 1 == value.len() - 1; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 45 | | Some(v) => v, [INFO] [stdout] 46 | | _ => '_' [INFO] [stdout] 47 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:44:38 [INFO] [stdout] | [INFO] [stdout] 44 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:52:31 [INFO] [stdout] | [INFO] [stdout] 52 | index > 0 && contains(&value, index - 1, 3, "UMB") && (index + 1 == value.len() -1 || contains(&value, index + 2, 2, "ER")) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/distance.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | match a.cmp(&b) { [INFO] [stdout] | ^^ help: change this to: `b` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:52:104 [INFO] [stdout] | [INFO] [stdout] 52 | index > 0 && contains(&value, index - 1, 3, "UMB") && (index + 1 == value.len() -1 || contains(&value, index + 2, 2, "ER")) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `repeat().take()` can be written more concisely [INFO] [stdout] --> src/distance.rs:133:46 [INFO] [stdout] | [INFO] [stdout] 133 | let mut curr_distances = repeat(0).take(b.len()+1).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, b.len()+1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:57:107 [INFO] [stdout] | [INFO] [stdout] 57 | if index == value.len() - 3 && contains_at_least_one(&value, index - 1, 4, &["ILLO", "ILLA", "ALLE"]) { [INFO] [stdout] | ___________________________________________________________________________________________________________^ [INFO] [stdout] 58 | | true [INFO] [stdout] 59 | | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, ... [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:59:190 [INFO] [stdout] | [INFO] [stdout] 59 | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") { [INFO] [stdout] | ______________________________________________________________________________________________________________________________________________________________________________________________^ [INFO] [stdout] 60 | | true [INFO] [stdout] 61 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:57:58 [INFO] [stdout] | [INFO] [stdout] 57 | if index == value.len() - 3 && contains_at_least_one(&value, index - 1, 4, &["ILLO", "ILLA", "ALLE"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn contains(value: &String, start: usize, len: usize, search: &str) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - pub fn contains(value: &String, start: usize, len: usize, search: &str) -> bool { [INFO] [stdout] 18 + pub fn contains(value: &str, start: usize, len: usize, search: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, ... [INFO] [stdout] | ____________^ [INFO] [stdout] 60 | | true [INFO] [stdout] 61 | | } else { [INFO] [stdout] 62 | | false [INFO] [stdout] 63 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1,... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:59:106 [INFO] [stdout] | [INFO] [stdout] 59 | ...2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:59:160 [INFO] [stdout] | [INFO] [stdout] 59 | ...value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:30:10 [INFO] [stdout] | [INFO] [stdout] 30 | .fold(false, |acc, x| acc || x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x)` [INFO] [stdout] | [INFO] [stdout] = note: the `any` method is short circuiting and may change the program semantics if the iterator has side effects [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` 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/phonetics/metaphone/handler.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | if condition_c0(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn char_at(value: &String, index: usize) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 33 - pub fn char_at(value: &String, index: usize) -> Option { [INFO] [stdout] 33 + pub fn char_at(value: &str, index: usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:29:38 [INFO] [stdout] | [INFO] [stdout] 29 | } else if index == 0 && contains(&value, index, 6, "CAESAR") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/phonetics/utils/metaphone_utils.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / match char_at(value, index) { [INFO] [stdout] 39 | | Some(v) if v == search => true, [INFO] [stdout] 40 | | _ => false [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 38 - match char_at(value, index) { [INFO] [stdout] 39 - Some(v) if v == search => true, [INFO] [stdout] 40 - _ => false [INFO] [stdout] 41 - } [INFO] [stdout] 38 + matches!(char_at(value, index), Some(v) if v == search) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | } else if contains(&value, index, 2, "CH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:33:27 [INFO] [stdout] | [INFO] [stdout] 33 | handle_ch(result, &value, index) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:34:24 [INFO] [stdout] | [INFO] [stdout] 34 | } else if contains(&value, index, 2, "CZ") && !(index > 1 && contains(&value, index - 2, 4, "WICZ")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:34:75 [INFO] [stdout] | [INFO] [stdout] 34 | } else if contains(&value, index, 2, "CZ") && !(index > 1 && contains(&value, index - 2, 4, "WICZ")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | } else if contains(&value, index + 1, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | } else if contains(&value, index, 2, "CC") && ! (index == 1 && char_at_match(&value, 0, 'M')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:44:82 [INFO] [stdout] | [INFO] [stdout] 44 | } else if contains(&value, index, 2, "CC") && ! (index == 1 && char_at_match(&value, 0, 'M')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:46:27 [INFO] [stdout] | [INFO] [stdout] 46 | handle_cc(result, &value, index) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:47:24 [INFO] [stdout] | [INFO] [stdout] 47 | } else if contains(&value, index, 2, "CK") || contains(&value, index, 2, "CG") || contains(&value, index, 2, "CQ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:47:60 [INFO] [stdout] | [INFO] [stdout] 47 | } else if contains(&value, index, 2, "CK") || contains(&value, index, 2, "CG") || contains(&value, index, 2, "CQ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:47:96 [INFO] [stdout] | [INFO] [stdout] 47 | } else if contains(&value, index, 2, "CK") || contains(&value, index, 2, "CG") || contains(&value, index, 2, "CQ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | } else if contains(&value, index, 2, "CI") || contains(&value, index, 2, "CE") || contains(&value, index, 2, "CY") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:50:60 [INFO] [stdout] | [INFO] [stdout] 50 | } else if contains(&value, index, 2, "CI") || contains(&value, index, 2, "CE") || contains(&value, index, 2, "CY") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:50:96 [INFO] [stdout] | [INFO] [stdout] 50 | } else if contains(&value, index, 2, "CI") || contains(&value, index, 2, "CE") || contains(&value, index, 2, "CY") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | if contains(&value, index, 3, "CIO") || contains(&value, index, 3, "CIE") || contains(&value, index, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:52:58 [INFO] [stdout] | [INFO] [stdout] 52 | if contains(&value, index, 3, "CIO") || contains(&value, index, 3, "CIE") || contains(&value, index, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:52:95 [INFO] [stdout] | [INFO] [stdout] 52 | if contains(&value, index, 3, "CIO") || contains(&value, index, 3, "CIE") || contains(&value, index, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | if contains(&value, index + 1, 2, " C") || contains(&value, index + 1, 2, " Q") || contains(&value, index + 1, 2, " G") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:62:61 [INFO] [stdout] | [INFO] [stdout] 62 | if contains(&value, index + 1, 2, " C") || contains(&value, index + 1, 2, " Q") || contains(&value, index + 1, 2, " G") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:62:101 [INFO] [stdout] | [INFO] [stdout] 62 | if contains(&value, index + 1, 2, " C") || contains(&value, index + 1, 2, " Q") || contains(&value, index + 1, 2, " G") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: implementation of inherent method `to_string(&self) -> String` for type `phonetics::soundex::SoundexWord` [INFO] [stdout] --> src/phonetics/soundex.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / fn to_string(&self) -> String { [INFO] [stdout] 76 | | self.first_char.to_string() + [INFO] [stdout] 77 | | &self.soundex_chars.iter().map(|x| { [INFO] [stdout] 78 | | match *x { [INFO] [stdout] ... | [INFO] [stdout] 88 | | }).join("") [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `phonetics::soundex::SoundexWord` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` 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/phonetics/metaphone/handler.rs:66:23 [INFO] [stdout] | [INFO] [stdout] 66 | (contains(&value, index + 1, 1, "C") || contains(&value, index + 1, 1, "K") || contains(&value, index + 1, 1, "Q")) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:66:62 [INFO] [stdout] | [INFO] [stdout] 66 | (contains(&value, index + 1, 1, "C") || contains(&value, index + 1, 1, "K") || contains(&value, index + 1, 1, "Q")) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:66:101 [INFO] [stdout] | [INFO] [stdout] 66 | (contains(&value, index + 1, 1, "C") || contains(&value, index + 1, 1, "K") || contains(&value, index + 1, 1, "Q")) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:67:29 [INFO] [stdout] | [INFO] [stdout] 67 | ! (contains(&value, index + 1, 2, "CE") || contains(&value, index + 1, 2, "CI")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:67:69 [INFO] [stdout] | [INFO] [stdout] 67 | ! (contains(&value, index + 1, 2, "CE") || contains(&value, index + 1, 2, "CI")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:76:30 [INFO] [stdout] | [INFO] [stdout] 76 | if contains_at_least_one(&value, index + 2, 1, &["I", "E", "H"]) && !contains(&value, index + 2, 2, "HU") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:76:83 [INFO] [stdout] | [INFO] [stdout] 76 | if contains_at_least_one(&value, index + 2, 1, &["I", "E", "H"]) && !contains(&value, index + 2, 2, "HU") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:78:48 [INFO] [stdout] | [INFO] [stdout] 78 | ... if (index == 1 && char_at_match_before(&value, index, 1, 'A')) || (contains_at_least_one(&value, index - 1, 5, &["UCCEE", "UCC... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | } else if index <= 1 { [INFO] [stdout] | __________________________^ [INFO] [stdout] 10 | | false [INFO] [stdout] 11 | | } else if is_vowel(&value, index - 2) || [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:12:47 [INFO] [stdout] | [INFO] [stdout] 12 | !contains(&value, index -1, 3, "ACH") { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 13 | | false [INFO] [stdout] 14 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` 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/phonetics/metaphone/handler.rs:78:98 [INFO] [stdout] | [INFO] [stdout] 78 | ...ue, index, 1, 'A')) || (contains_at_least_one(&value, index - 1, 5, &["UCCEE", "UCCES"])) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:94:30 [INFO] [stdout] | [INFO] [stdout] 94 | if index > 0 && contains(&value, index, 4, "CHAE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:7:17 [INFO] [stdout] | [INFO] [stdout] 7 | if contains(&value, index, 4, "CHIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | } else if is_vowel(&value, index - 2) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:12:19 [INFO] [stdout] | [INFO] [stdout] 12 | !contains(&value, index -1, 3, "ACH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:15:31 [INFO] [stdout] | [INFO] [stdout] 15 | ... (!char_at_match_after(&value, index, 2, 'I') && !char_at_match_after(&value, index, 2, 'E')) || contains_at_least_one(&value, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:98:29 [INFO] [stdout] | [INFO] [stdout] 98 | } else if condition_ch0(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:15:78 [INFO] [stdout] | [INFO] [stdout] 15 | ... (!char_at_match_after(&value, index, 2, 'I') && !char_at_match_after(&value, index, 2, 'E')) || contains_at_least_one(&value, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | } else if condition_ch1(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:15:127 [INFO] [stdout] | [INFO] [stdout] 15 | ...lue, index, 2, 'E')) || contains_at_least_one(&value, index - 2, 6, &["BACHER", "MACHER"]) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:108:25 [INFO] [stdout] | [INFO] [stdout] 108 | if contains(&value, 0, 2, "MC") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | if index != 0 { [INFO] [stdout] | ___________________^ [INFO] [stdout] 21 | | false [INFO] [stdout] 22 | | } else if [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:24:85 [INFO] [stdout] | [INFO] [stdout] 24 | !contains_at_least_one(&value, index + 1, 3, &["HOR", "HYM", "HIA", "HEM"]) { [INFO] [stdout] | _____________________________________________________________________________________^ [INFO] [stdout] 25 | | false [INFO] [stdout] 26 | | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:24:85 [INFO] [stdout] | [INFO] [stdout] 24 | !contains_at_least_one(&value, index + 1, 3, &["HOR", "HYM", "HIA", "HEM"]) { [INFO] [stdout] | _____________________________________________________________________________________^ [INFO] [stdout] 25 | | false [INFO] [stdout] 26 | | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:26:47 [INFO] [stdout] | [INFO] [stdout] 26 | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 27 | | false [INFO] [stdout] 28 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:23:32 [INFO] [stdout] | [INFO] [stdout] 23 | !contains_at_least_one(&value, index + 1, 5, &["HARAC", "HARIS"]) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:24:32 [INFO] [stdout] | [INFO] [stdout] 24 | !contains_at_least_one(&value, index + 1, 3, &["HOR", "HYM", "HIA", "HEM"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | ____________^ [INFO] [stdout] 27 | | false [INFO] [stdout] 28 | | } else { [INFO] [stdout] 29 | | true [INFO] [stdout] 30 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ !contains(&value, 0, 5, "CHORE") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` 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/phonetics/metaphone/conditions.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | } else if contains(&value, 0, 5, "CHORE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:34:35 [INFO] [stdout] | [INFO] [stdout] 34 | let a = contains_at_least_one(&value, 0, 4, &["VAN", "VON"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:35:48 [INFO] [stdout] | [INFO] [stdout] 35 | let b = index > 1 && contains_at_least_one(&value, index - 2, 6, &["ORCHES", "ARCHIT", "ORCHID"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:36:35 [INFO] [stdout] | [INFO] [stdout] 36 | let c = contains_at_least_one(&value, index + 2, 1, &["T", "S"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:37:48 [INFO] [stdout] | [INFO] [stdout] 37 | let d = index > 0 && contains_at_least_one(&value, index - 1, 1, &["A", "O", "U", "E"]) || index == 0; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:38:35 [INFO] [stdout] | [INFO] [stdout] 38 | let e = contains_at_least_one(&value, index + 2, 1, L_R_N_M_B_H_F_V_W_SPACE) || index + 1 == value.len() - 1; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 45 | | Some(v) => v, [INFO] [stdout] 46 | | _ => '_' [INFO] [stdout] 47 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:123:17 [INFO] [stdout] | [INFO] [stdout] 123 | if contains(&value, index, 2, "DG") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:125:34 [INFO] [stdout] | [INFO] [stdout] 125 | if contains_at_least_one(&value, index + 2, 1, &["I", "E", "Y"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:134:37 [INFO] [stdout] | [INFO] [stdout] 134 | } else if contains_at_least_one(&value, index, 2, &["DT", "DD"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:44:38 [INFO] [stdout] | [INFO] [stdout] 44 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:148:24 [INFO] [stdout] | [INFO] [stdout] 148 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 149 | | Some(v) => v, [INFO] [stdout] 150 | | None => '_' [INFO] [stdout] 151 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:148:38 [INFO] [stdout] | [INFO] [stdout] 148 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:156:35 [INFO] [stdout] | [INFO] [stdout] 156 | if index == 1 && is_vowel(&value, 0) && !slavo_germanic { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:160:29 [INFO] [stdout] | [INFO] [stdout] 160 | } else if !contains(&value, index + 2, 2, "EY") && !slavo_germanic { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:170:24 [INFO] [stdout] | [INFO] [stdout] 170 | } else if contains(&value, index + 1, 2, "LI") && !slavo_germanic { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:52:31 [INFO] [stdout] | [INFO] [stdout] 52 | index > 0 && contains(&value, index - 1, 3, "UMB") && (index + 1 == value.len() -1 || contains(&value, index + 2, 2, "ER")) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:52:104 [INFO] [stdout] | [INFO] [stdout] 52 | index > 0 && contains(&value, index - 1, 3, "UMB") && (index + 1 == value.len() -1 || contains(&value, index + 2, 2, "ER")) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:57:107 [INFO] [stdout] | [INFO] [stdout] 57 | if index == value.len() - 3 && contains_at_least_one(&value, index - 1, 4, &["ILLO", "ILLA", "ALLE"]) { [INFO] [stdout] | ___________________________________________________________________________________________________________^ [INFO] [stdout] 58 | | true [INFO] [stdout] 59 | | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, ... [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:59:190 [INFO] [stdout] | [INFO] [stdout] 59 | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") { [INFO] [stdout] | ______________________________________________________________________________________________________________________________________________________________________________________________^ [INFO] [stdout] 60 | | true [INFO] [stdout] 61 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:175:75 [INFO] [stdout] | [INFO] [stdout] 175 | } else if index == 0 && (current_char == 'Y' || contains_at_least_one(&value, index + 1, 2, ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER)) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:57:58 [INFO] [stdout] | [INFO] [stdout] 57 | if index == value.len() - 3 && contains_at_least_one(&value, index - 1, 4, &["ILLO", "ILLA", "ALLE"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | } else if(contains(&value, index + 1, 2, "ER") || current_char == 'Y') && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:181:32 [INFO] [stdout] | [INFO] [stdout] 181 | !contains_at_least_one(&value, 0, 6, &["DANGER", "RANGER", "MANGER"]) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:182:32 [INFO] [stdout] | [INFO] [stdout] 182 | !contains_at_least_one(&value, index - 1, 1, &["E", "I"]) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:183:32 [INFO] [stdout] | [INFO] [stdout] 183 | !contains_at_least_one(&value, index - 1, 3, &["RGY", "OGY"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:188:37 [INFO] [stdout] | [INFO] [stdout] 188 | } else if contains_at_least_one(&value, index + 1, 1, &["E", "I", "Y"]) || (index > 0 && contains_at_least_one(&value, index -1... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, ... [INFO] [stdout] | ____________^ [INFO] [stdout] 60 | | true [INFO] [stdout] 61 | | } else { [INFO] [stdout] 62 | | false [INFO] [stdout] 63 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/conditions.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | } else if (contains_at_least_one(&value, value.len() - 2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1,... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:188:116 [INFO] [stdout] | [INFO] [stdout] 188 | ... "Y"]) || (index > 0 && contains_at_least_one(&value, index -1, 4, &["AGGI", "OGGI"])) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:59:106 [INFO] [stdout] | [INFO] [stdout] 59 | ...2, 2, &["AS", "OS"]) || contains_at_least_one(&value, value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:190:34 [INFO] [stdout] | [INFO] [stdout] 190 | ... if contains_at_least_one(&value, 0, 4, &["VAN ", "VON "]) || contains(&value, 0, 3, "SCH") || contains(&value, index + 1, 2, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/conditions.rs:59:160 [INFO] [stdout] | [INFO] [stdout] 59 | ...value.len() - 1, 1, &["A", "O"])) && contains(&value, index - 1, 4, "ALLE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:190:79 [INFO] [stdout] | [INFO] [stdout] 190 | ... if contains_at_least_one(&value, 0, 4, &["VAN ", "VON "]) || contains(&value, 0, 3, "SCH") || contains(&value, index + 1, 2, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:190:112 [INFO] [stdout] | [INFO] [stdout] 190 | ... || contains(&value, 0, 3, "SCH") || contains(&value, index + 1, 2, "ET") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:193:28 [INFO] [stdout] | [INFO] [stdout] 193 | } else if contains(&value, index + 1, 3, "IER") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:212:32 [INFO] [stdout] | [INFO] [stdout] 212 | if index > 0 && ! is_vowel(&value, index - 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | if condition_c0(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:216:29 [INFO] [stdout] | [INFO] [stdout] 216 | let char_plus_two = match char_at(&value, index + 2) { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 217 | | Some(v) => v, [INFO] [stdout] 218 | | None => '_' [INFO] [stdout] 219 | | }; [INFO] [stdout] | |_________^ help: replace with: `char_at(&value, index + 2).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:29:38 [INFO] [stdout] | [INFO] [stdout] 29 | } else if index == 0 && contains(&value, index, 6, "CAESAR") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:216:43 [INFO] [stdout] | [INFO] [stdout] 216 | let char_plus_two = match char_at(&value, index + 2) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | } else if contains(&value, index, 2, "CH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:33:27 [INFO] [stdout] | [INFO] [stdout] 33 | handle_ch(result, &value, index) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:228:51 [INFO] [stdout] | [INFO] [stdout] 228 | } else if (index > 1 && contains_at_least_one(&value, index - 2, 1, &["B", "H", "D"])) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:34:24 [INFO] [stdout] | [INFO] [stdout] 34 | } else if contains(&value, index, 2, "CZ") && !(index > 1 && contains(&value, index - 2, 4, "WICZ")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:229:45 [INFO] [stdout] | [INFO] [stdout] 229 | (index > 2 && contains_at_least_one(&value, index - 3, 1, &["B", "H", "D"])) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:34:75 [INFO] [stdout] | [INFO] [stdout] 34 | } else if contains(&value, index, 2, "CZ") && !(index > 1 && contains(&value, index - 2, 4, "WICZ")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:230:45 [INFO] [stdout] | [INFO] [stdout] 230 | (index > 3 && contains_at_least_one(&value, index - 4, 1, &["B", "H", "D"])) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | } else if contains(&value, index + 1, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | } else if contains(&value, index, 2, "CC") && ! (index == 1 && char_at_match(&value, 0, 'M')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:234:50 [INFO] [stdout] | [INFO] [stdout] 234 | ... if index > 2 && char_at_match_before(&value, index, 1, 'U') && contains_at_least_one(&value, index - 3, 1, &["C", "G", "L", "... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:44:82 [INFO] [stdout] | [INFO] [stdout] 44 | } else if contains(&value, index, 2, "CC") && ! (index == 1 && char_at_match(&value, 0, 'M')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:234:98 [INFO] [stdout] | [INFO] [stdout] 234 | ... if index > 2 && char_at_match_before(&value, index, 1, 'U') && contains_at_least_one(&value, index - 3, 1, &["C", "G", "L", "... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:46:27 [INFO] [stdout] | [INFO] [stdout] 46 | handle_cc(result, &value, index) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:47:24 [INFO] [stdout] | [INFO] [stdout] 47 | } else if contains(&value, index, 2, "CK") || contains(&value, index, 2, "CG") || contains(&value, index, 2, "CQ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:47:60 [INFO] [stdout] | [INFO] [stdout] 47 | } else if contains(&value, index, 2, "CK") || contains(&value, index, 2, "CG") || contains(&value, index, 2, "CQ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:47:96 [INFO] [stdout] | [INFO] [stdout] 47 | } else if contains(&value, index, 2, "CK") || contains(&value, index, 2, "CG") || contains(&value, index, 2, "CQ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:237:58 [INFO] [stdout] | [INFO] [stdout] 237 | } else if index > 0 && !char_at_match_before(&value, index, 1, 'I') { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:246:32 [INFO] [stdout] | [INFO] [stdout] 246 | if (index == 0 || is_vowel(&value, index - 1)) && is_vowel(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | } else if contains(&value, index, 2, "CI") || contains(&value, index, 2, "CE") || contains(&value, index, 2, "CY") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:246:64 [INFO] [stdout] | [INFO] [stdout] 246 | if (index == 0 || is_vowel(&value, index - 1)) && is_vowel(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:50:60 [INFO] [stdout] | [INFO] [stdout] 50 | } else if contains(&value, index, 2, "CI") || contains(&value, index, 2, "CE") || contains(&value, index, 2, "CY") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:50:96 [INFO] [stdout] | [INFO] [stdout] 50 | } else if contains(&value, index, 2, "CI") || contains(&value, index, 2, "CE") || contains(&value, index, 2, "CY") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:255:17 [INFO] [stdout] | [INFO] [stdout] 255 | if contains(&value, index, 4, "JOSE") || contains(&value, 0, 4, "SAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | if contains(&value, index, 3, "CIO") || contains(&value, index, 3, "CIE") || contains(&value, index, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:255:55 [INFO] [stdout] | [INFO] [stdout] 255 | if contains(&value, index, 4, "JOSE") || contains(&value, 0, 4, "SAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:52:58 [INFO] [stdout] | [INFO] [stdout] 52 | if contains(&value, index, 3, "CIO") || contains(&value, index, 3, "CIE") || contains(&value, index, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:257:62 [INFO] [stdout] | [INFO] [stdout] 257 | ... if (index == 0 && (index > 4 && char_at_match_after(&value, index, 4, ' ')) || value.len() == 4) || contains(&value, 0, 4, "... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:52:95 [INFO] [stdout] | [INFO] [stdout] 52 | if contains(&value, index, 3, "CIO") || contains(&value, index, 3, "CIE") || contains(&value, index, 3, "CIA") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:257:119 [INFO] [stdout] | [INFO] [stdout] 257 | ...ex, 4, ' ')) || value.len() == 4) || contains(&value, 0, 4, "SAN ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:266:36 [INFO] [stdout] | [INFO] [stdout] 266 | if index == 0 && !contains(&value, index, 4, "JOSE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:269:28 [INFO] [stdout] | [INFO] [stdout] 269 | ... } else if is_vowel(&value, index - 1) && !slavo_germanic && (char_at_match_after(&value, index, 1, 'A') || char_at_match_afte... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | if contains(&value, index + 1, 2, " C") || contains(&value, index + 1, 2, " Q") || contains(&value, index + 1, 2, " G") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:62:61 [INFO] [stdout] | [INFO] [stdout] 62 | if contains(&value, index + 1, 2, " C") || contains(&value, index + 1, 2, " Q") || contains(&value, index + 1, 2, " G") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:62:101 [INFO] [stdout] | [INFO] [stdout] 62 | if contains(&value, index + 1, 2, " C") || contains(&value, index + 1, 2, " Q") || contains(&value, index + 1, 2, " G") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:269:90 [INFO] [stdout] | [INFO] [stdout] 269 | ... } else if is_vowel(&value, index - 1) && !slavo_germanic && (char_at_match_after(&value, index, 1, 'A') || char_at_match_afte... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:66:23 [INFO] [stdout] | [INFO] [stdout] 66 | (contains(&value, index + 1, 1, "C") || contains(&value, index + 1, 1, "K") || contains(&value, index + 1, 1, "Q")) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:269:136 [INFO] [stdout] | [INFO] [stdout] 269 | ...&value, index, 1, 'A') || char_at_match_after(&value, index, 1, 'O')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:66:62 [INFO] [stdout] | [INFO] [stdout] 66 | (contains(&value, index + 1, 1, "C") || contains(&value, index + 1, 1, "K") || contains(&value, index + 1, 1, "Q")) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:66:101 [INFO] [stdout] | [INFO] [stdout] 66 | (contains(&value, index + 1, 1, "C") || contains(&value, index + 1, 1, "K") || contains(&value, index + 1, 1, "Q")) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:275:42 [INFO] [stdout] | [INFO] [stdout] 275 | ... } else if !contains_at_least_one(&value, index + 1, 1, L_T_K_S_N_M_B_Z) && !contains_at_least_one(&value, index - 1, 1, &["S"... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:67:29 [INFO] [stdout] | [INFO] [stdout] 67 | ! (contains(&value, index + 1, 2, "CE") || contains(&value, index + 1, 2, "CI")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:275:107 [INFO] [stdout] | [INFO] [stdout] 275 | ...1, L_T_K_S_N_M_B_Z) && !contains_at_least_one(&value, index - 1, 1, &["S", "K", "L"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:67:69 [INFO] [stdout] | [INFO] [stdout] 67 | ! (contains(&value, index + 1, 2, "CE") || contains(&value, index + 1, 2, "CI")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:280:24 [INFO] [stdout] | [INFO] [stdout] 280 | Some(v) if v == 'J' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 280 - Some(v) if v == 'J' => index + 2, [INFO] [stdout] 280 + Some('J') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:279:23 [INFO] [stdout] | [INFO] [stdout] 279 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:76:30 [INFO] [stdout] | [INFO] [stdout] 76 | if contains_at_least_one(&value, index + 2, 1, &["I", "E", "H"]) && !contains(&value, index + 2, 2, "HU") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:76:83 [INFO] [stdout] | [INFO] [stdout] 76 | if contains_at_least_one(&value, index + 2, 1, &["I", "E", "H"]) && !contains(&value, index + 2, 2, "HU") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:289:20 [INFO] [stdout] | [INFO] [stdout] 289 | Some(v) if v == 'K' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 289 - Some(v) if v == 'K' => index + 2, [INFO] [stdout] 289 + Some('K') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:78:48 [INFO] [stdout] | [INFO] [stdout] 78 | ... if (index == 1 && char_at_match_before(&value, index, 1, 'A')) || (contains_at_least_one(&value, index - 1, 5, &["UCCEE", "UCC... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:288:19 [INFO] [stdout] | [INFO] [stdout] 288 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:78:98 [INFO] [stdout] | [INFO] [stdout] 78 | ...ue, index, 1, 'A')) || (contains_at_least_one(&value, index - 1, 5, &["UCCEE", "UCCES"])) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:297:13 [INFO] [stdout] | [INFO] [stdout] 297 | / if v == 'L' { [INFO] [stdout] 298 | | if condition_l0(&value, index) { [INFO] [stdout] 299 | | result.append_primary('L'); [INFO] [stdout] 300 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 306 | | index + 1 [INFO] [stdout] 307 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 296 ~ Some(v) [INFO] [stdout] 297 ~ if v == 'L' => { [INFO] [stdout] 298 | if condition_l0(&value, index) { [INFO] [stdout] ... [INFO] [stdout] 303 | index + 2 [INFO] [stdout] 304 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:295:19 [INFO] [stdout] | [INFO] [stdout] 295 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:94:30 [INFO] [stdout] | [INFO] [stdout] 94 | if index > 0 && contains(&value, index, 4, "CHAE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:298:33 [INFO] [stdout] | [INFO] [stdout] 298 | if condition_l0(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:98:29 [INFO] [stdout] | [INFO] [stdout] 98 | } else if condition_ch0(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | } else if condition_ch1(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:318:21 [INFO] [stdout] | [INFO] [stdout] 318 | if condition_m0(&value, index) { index + 2 } else { index + 1 } [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:108:25 [INFO] [stdout] | [INFO] [stdout] 108 | if contains(&value, 0, 2, "MC") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:123:17 [INFO] [stdout] | [INFO] [stdout] 123 | if contains(&value, index, 2, "DG") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:326:24 [INFO] [stdout] | [INFO] [stdout] 326 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 327 | | Some(v) => v, [INFO] [stdout] 328 | | _ => '_' [INFO] [stdout] 329 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:125:34 [INFO] [stdout] | [INFO] [stdout] 125 | if contains_at_least_one(&value, index + 2, 1, &["I", "E", "Y"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:326:38 [INFO] [stdout] | [INFO] [stdout] 326 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:134:37 [INFO] [stdout] | [INFO] [stdout] 134 | } else if contains_at_least_one(&value, index, 2, &["DT", "DD"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:335:34 [INFO] [stdout] | [INFO] [stdout] 335 | if contains_at_least_one(&value, index + 1, 1, &["P", "B"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:148:24 [INFO] [stdout] | [INFO] [stdout] 148 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 149 | | Some(v) => v, [INFO] [stdout] 150 | | None => '_' [INFO] [stdout] 151 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:148:38 [INFO] [stdout] | [INFO] [stdout] 148 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:346:20 [INFO] [stdout] | [INFO] [stdout] 346 | Some(v) if v == 'Q' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 346 - Some(v) if v == 'Q' => index + 2, [INFO] [stdout] 346 + Some('Q') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:156:35 [INFO] [stdout] | [INFO] [stdout] 156 | if index == 1 && is_vowel(&value, 0) && !slavo_germanic { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:345:19 [INFO] [stdout] | [INFO] [stdout] 345 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:160:29 [INFO] [stdout] | [INFO] [stdout] 160 | } else if !contains(&value, index + 2, 2, "EY") && !slavo_germanic { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:352:64 [INFO] [stdout] | [INFO] [stdout] 352 | if index == value.len() - 1 && !slavo_germanic && contains(&value, index - 2, 2, "IE") && !contains_at_least_one(&value, index ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:170:24 [INFO] [stdout] | [INFO] [stdout] 170 | } else if contains(&value, index + 1, 2, "LI") && !slavo_germanic { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:352:118 [INFO] [stdout] | [INFO] [stdout] 352 | ...index - 2, 2, "IE") && !contains_at_least_one(&value, index - 4, 2, &["ME", "MA"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:175:75 [INFO] [stdout] | [INFO] [stdout] 175 | } else if index == 0 && (current_char == 'Y' || contains_at_least_one(&value, index + 1, 2, ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER)) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | } else if(contains(&value, index + 1, 2, "ER") || current_char == 'Y') && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:358:20 [INFO] [stdout] | [INFO] [stdout] 358 | Some(v) if v == 'R' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 358 - Some(v) if v == 'R' => index + 2, [INFO] [stdout] 358 + Some('R') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:357:19 [INFO] [stdout] | [INFO] [stdout] 357 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:181:32 [INFO] [stdout] | [INFO] [stdout] 181 | !contains_at_least_one(&value, 0, 6, &["DANGER", "RANGER", "MANGER"]) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:364:43 [INFO] [stdout] | [INFO] [stdout] 364 | if index > 0 && contains_at_least_one(&value, index - 1, 3, &["ISL", "YSL"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:182:32 [INFO] [stdout] | [INFO] [stdout] 182 | !contains_at_least_one(&value, index - 1, 1, &["E", "I"]) && [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:367:38 [INFO] [stdout] | [INFO] [stdout] 367 | } else if index == 0 && contains(&value, index, 5, "SUGAR") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:183:32 [INFO] [stdout] | [INFO] [stdout] 183 | !contains_at_least_one(&value, index - 1, 3, &["RGY", "OGY"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:372:24 [INFO] [stdout] | [INFO] [stdout] 372 | } else if contains(&value, index, 2, "SH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:373:34 [INFO] [stdout] | [INFO] [stdout] 373 | if contains_at_least_one(&value, index + 1, 4, &["HEIM", "HOEK", "HOLM", "HOLZ"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:381:37 [INFO] [stdout] | [INFO] [stdout] 381 | } else if contains_at_least_one(&value, index, 3, &["SIO", "SIA"]) || contains(&value, index, 4, "SIAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:381:84 [INFO] [stdout] | [INFO] [stdout] 381 | } else if contains_at_least_one(&value, index, 3, &["SIO", "SIA"]) || contains(&value, index, 4, "SIAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:389:52 [INFO] [stdout] | [INFO] [stdout] 389 | } else if (index == 0 && contains_at_least_one(&value, index + 1, 1, &["M", "N", "L", "W"])) || contains(&value, index + 1, 1, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:188:37 [INFO] [stdout] | [INFO] [stdout] 188 | } else if contains_at_least_one(&value, index + 1, 1, &["E", "I", "Y"]) || (index > 0 && contains_at_least_one(&value, index -1... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:389:110 [INFO] [stdout] | [INFO] [stdout] 389 | ...x + 1, 1, &["M", "N", "L", "W"])) || contains(&value, index + 1, 1, "Z") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:188:116 [INFO] [stdout] | [INFO] [stdout] 188 | ... "Y"]) || (index > 0 && contains_at_least_one(&value, index -1, 4, &["AGGI", "OGGI"])) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:396:21 [INFO] [stdout] | [INFO] [stdout] 396 | if contains(&value, index + 1, 1, "Z") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:190:34 [INFO] [stdout] | [INFO] [stdout] 190 | ... if contains_at_least_one(&value, 0, 4, &["VAN ", "VON "]) || contains(&value, 0, 3, "SCH") || contains(&value, index + 1, 2, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:401:24 [INFO] [stdout] | [INFO] [stdout] 401 | } else if contains(&value, index, 2, "SC") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:190:79 [INFO] [stdout] | [INFO] [stdout] 190 | ... if contains_at_least_one(&value, 0, 4, &["VAN ", "VON "]) || contains(&value, 0, 3, "SCH") || contains(&value, index + 1, 2, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:402:27 [INFO] [stdout] | [INFO] [stdout] 402 | handle_sc(result, &value, index) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:190:112 [INFO] [stdout] | [INFO] [stdout] 190 | ... || contains(&value, 0, 3, "SCH") || contains(&value, index + 1, 2, "ET") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:193:28 [INFO] [stdout] | [INFO] [stdout] 193 | } else if contains(&value, index + 1, 3, "IER") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:404:62 [INFO] [stdout] | [INFO] [stdout] 404 | if index == value.len() - 1 && contains_at_least_one(&value, index - 2, 2, &["AI", "OI"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:212:32 [INFO] [stdout] | [INFO] [stdout] 212 | if index > 0 && ! is_vowel(&value, index - 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:411:34 [INFO] [stdout] | [INFO] [stdout] 411 | if contains_at_least_one(&value, index + 1, 1, &["S", "Z"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:216:29 [INFO] [stdout] | [INFO] [stdout] 216 | let char_plus_two = match char_at(&value, index + 2) { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 217 | | Some(v) => v, [INFO] [stdout] 218 | | None => '_' [INFO] [stdout] 219 | | }; [INFO] [stdout] | |_________^ help: replace with: `char_at(&value, index + 2).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:420:24 [INFO] [stdout] | [INFO] [stdout] 420 | let current_char = match char_at(&value, index + 2) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 421 | | Some(v) => v, [INFO] [stdout] 422 | | _ => '_' [INFO] [stdout] 423 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 2).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:216:43 [INFO] [stdout] | [INFO] [stdout] 216 | let char_plus_two = match char_at(&value, index + 2) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:420:38 [INFO] [stdout] | [INFO] [stdout] 420 | let current_char = match char_at(&value, index + 2) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:228:51 [INFO] [stdout] | [INFO] [stdout] 228 | } else if (index > 1 && contains_at_least_one(&value, index - 2, 1, &["B", "H", "D"])) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:426:34 [INFO] [stdout] | [INFO] [stdout] 426 | if contains_at_least_one(&value, index + 3, 2, &["OO", "ER", "EN", "UY", "ED", "EM"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:229:45 [INFO] [stdout] | [INFO] [stdout] 229 | (index > 2 && contains_at_least_one(&value, index - 3, 1, &["B", "H", "D"])) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:428:38 [INFO] [stdout] | [INFO] [stdout] 428 | if contains_at_least_one(&value, index + 3, 2, &["ER", "EN"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:230:45 [INFO] [stdout] | [INFO] [stdout] 230 | (index > 3 && contains_at_least_one(&value, index - 4, 1, &["B", "H", "D"])) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:438:40 [INFO] [stdout] | [INFO] [stdout] 438 | if index == 0 && !is_vowel(&value, 3) && !char_at_match(&value, 3, 'W') { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:234:50 [INFO] [stdout] | [INFO] [stdout] 234 | ... if index > 2 && char_at_match_before(&value, index, 1, 'U') && contains_at_least_one(&value, index - 3, 1, &["C", "G", "L", "... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:438:69 [INFO] [stdout] | [INFO] [stdout] 438 | if index == 0 && !is_vowel(&value, 3) && !char_at_match(&value, 3, 'W') { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:234:98 [INFO] [stdout] | [INFO] [stdout] 234 | ... if index > 2 && char_at_match_before(&value, index, 1, 'U') && contains_at_least_one(&value, index - 3, 1, &["C", "G", "L", "... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:445:37 [INFO] [stdout] | [INFO] [stdout] 445 | } else if contains_at_least_one(&value, index + 2, 1, &["I", "E", "Y"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:237:58 [INFO] [stdout] | [INFO] [stdout] 237 | } else if index > 0 && !char_at_match_before(&value, index, 1, 'I') { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:246:32 [INFO] [stdout] | [INFO] [stdout] 246 | if (index == 0 || is_vowel(&value, index - 1)) && is_vowel(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:456:43 [INFO] [stdout] | [INFO] [stdout] 456 | if contains(&value, index, 4, "TION") { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 457 | | result.append('X'); [INFO] [stdout] 458 | | index + 3 [INFO] [stdout] 459 | | } else if contains_at_least_one(&value, index, 3, &["TIA", "TCH"]) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:459:72 [INFO] [stdout] | [INFO] [stdout] 459 | } else if contains_at_least_one(&value, index, 3, &["TIA", "TCH"]) { [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 460 | | result.append('X'); [INFO] [stdout] 461 | | index + 3 [INFO] [stdout] 462 | | } else if contains(&value, index, 2, "TH") || contains(&value, index, 3, "TTH") { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:246:64 [INFO] [stdout] | [INFO] [stdout] 246 | if (index == 0 || is_vowel(&value, index - 1)) && is_vowel(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:456:17 [INFO] [stdout] | [INFO] [stdout] 456 | if contains(&value, index, 4, "TION") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:459:37 [INFO] [stdout] | [INFO] [stdout] 459 | } else if contains_at_least_one(&value, index, 3, &["TIA", "TCH"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:255:17 [INFO] [stdout] | [INFO] [stdout] 255 | if contains(&value, index, 4, "JOSE") || contains(&value, 0, 4, "SAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:462:24 [INFO] [stdout] | [INFO] [stdout] 462 | } else if contains(&value, index, 2, "TH") || contains(&value, index, 3, "TTH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:255:55 [INFO] [stdout] | [INFO] [stdout] 255 | if contains(&value, index, 4, "JOSE") || contains(&value, 0, 4, "SAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:462:60 [INFO] [stdout] | [INFO] [stdout] 462 | } else if contains(&value, index, 2, "TH") || contains(&value, index, 3, "TTH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:257:62 [INFO] [stdout] | [INFO] [stdout] 257 | ... if (index == 0 && (index > 4 && char_at_match_after(&value, index, 4, ' ')) || value.len() == 4) || contains(&value, 0, 4, "... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:463:34 [INFO] [stdout] | [INFO] [stdout] 463 | if contains_at_least_one(&value, index + 2, 2, &["OM", "AM"]) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:257:119 [INFO] [stdout] | [INFO] [stdout] 257 | ...ex, 4, ' ')) || value.len() == 4) || contains(&value, 0, 4, "SAN ") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:464:35 [INFO] [stdout] | [INFO] [stdout] 464 | contains_at_least_one(&value, 0, 4, &["VAN ", "VON "]) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:465:22 [INFO] [stdout] | [INFO] [stdout] 465 | contains(&value, 0, 3, "SCH") [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:266:36 [INFO] [stdout] | [INFO] [stdout] 266 | if index == 0 && !contains(&value, index, 4, "JOSE") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:269:28 [INFO] [stdout] | [INFO] [stdout] 269 | ... } else if is_vowel(&value, index - 1) && !slavo_germanic && (char_at_match_after(&value, index, 1, 'A') || char_at_match_afte... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:476:34 [INFO] [stdout] | [INFO] [stdout] 476 | if contains_at_least_one(&value, index + 1, 1, &["T", "D"]) { index + 2 } else { index + 1 } [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:269:90 [INFO] [stdout] | [INFO] [stdout] 269 | ... } else if is_vowel(&value, index - 1) && !slavo_germanic && (char_at_match_after(&value, index, 1, 'A') || char_at_match_afte... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:484:20 [INFO] [stdout] | [INFO] [stdout] 484 | Some(v) if v == 'V' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 484 - Some(v) if v == 'V' => index + 2, [INFO] [stdout] 484 + Some('V') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:269:136 [INFO] [stdout] | [INFO] [stdout] 269 | ...&value, index, 1, 'A') || char_at_match_after(&value, index, 1, 'O')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:483:19 [INFO] [stdout] | [INFO] [stdout] 483 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:275:42 [INFO] [stdout] | [INFO] [stdout] 275 | ... } else if !contains_at_least_one(&value, index + 1, 1, L_T_K_S_N_M_B_Z) && !contains_at_least_one(&value, index - 1, 1, &["S"... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:275:107 [INFO] [stdout] | [INFO] [stdout] 275 | ...1, L_T_K_S_N_M_B_Z) && !contains_at_least_one(&value, index - 1, 1, &["S", "K", "L"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:490:17 [INFO] [stdout] | [INFO] [stdout] 490 | if contains(&value, index, 2, "WR") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:280:24 [INFO] [stdout] | [INFO] [stdout] 280 | Some(v) if v == 'J' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 280 - Some(v) if v == 'J' => index + 2, [INFO] [stdout] 280 + Some('J') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:495:36 [INFO] [stdout] | [INFO] [stdout] 495 | if index == 0 && (is_vowel(&value, index +1) || contains(&value, index, 2, "WH")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:279:23 [INFO] [stdout] | [INFO] [stdout] 279 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:495:66 [INFO] [stdout] | [INFO] [stdout] 495 | if index == 0 && (is_vowel(&value, index +1) || contains(&value, index, 2, "WH")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:496:25 [INFO] [stdout] | [INFO] [stdout] 496 | if is_vowel(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:289:20 [INFO] [stdout] | [INFO] [stdout] 289 | Some(v) if v == 'K' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 289 - Some(v) if v == 'K' => index + 2, [INFO] [stdout] 289 + Some('K') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:288:19 [INFO] [stdout] | [INFO] [stdout] 288 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:297:13 [INFO] [stdout] | [INFO] [stdout] 297 | / if v == 'L' { [INFO] [stdout] 298 | | if condition_l0(&value, index) { [INFO] [stdout] 299 | | result.append_primary('L'); [INFO] [stdout] 300 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 306 | | index + 1 [INFO] [stdout] 307 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 296 ~ Some(v) [INFO] [stdout] 297 ~ if v == 'L' => { [INFO] [stdout] 298 | if condition_l0(&value, index) { [INFO] [stdout] ... [INFO] [stdout] 303 | index + 2 [INFO] [stdout] 304 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:295:19 [INFO] [stdout] | [INFO] [stdout] 295 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:505:68 [INFO] [stdout] | [INFO] [stdout] 505 | ... } else if (index > 0 && index == value.len()-1 && is_vowel(&value, index - 1)) || (index > 0 && contains_at_least_one(&value,... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:505:127 [INFO] [stdout] | [INFO] [stdout] 505 | ... - 1)) || (index > 0 && contains_at_least_one(&value, index - 1, 5, &["EWSKI", "EWSKY", "OWSKI", "OWSKY"])) || contains(&value, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:505:201 [INFO] [stdout] | [INFO] [stdout] 505 | ...KI", "EWSKY", "OWSKI", "OWSKY"])) || contains(&value, 0, 3, "SCH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:509:41 [INFO] [stdout] | [INFO] [stdout] 509 | } else if contains_at_least_one(&value, index, 4, &["WICZ", "WITZ"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:298:33 [INFO] [stdout] | [INFO] [stdout] 298 | if condition_l0(&value, index) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:318:21 [INFO] [stdout] | [INFO] [stdout] 318 | if condition_m0(&value, index) { index + 2 } else { index + 1 } [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:528:67 [INFO] [stdout] | [INFO] [stdout] 528 | let contains_iau_eau = index > 2 && contains_at_least_one(&value, index - 3, 3, &["IAU", "EAU"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:529:52 [INFO] [stdout] | [INFO] [stdout] 529 | let contains_au_ou = contains_at_least_one(&value, index - 2, 2, &["AU", "OU"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:326:24 [INFO] [stdout] | [INFO] [stdout] 326 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 327 | | Some(v) => v, [INFO] [stdout] 328 | | _ => '_' [INFO] [stdout] 329 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:326:38 [INFO] [stdout] | [INFO] [stdout] 326 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:536:34 [INFO] [stdout] | [INFO] [stdout] 536 | if contains_at_least_one(&value, index + 1, 1, &["C", "X"]) { index + 2 } else { index + 1 } [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:335:34 [INFO] [stdout] | [INFO] [stdout] 335 | if contains_at_least_one(&value, index + 1, 1, &["P", "B"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:541:24 [INFO] [stdout] | [INFO] [stdout] 541 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 542 | | Some(v) => v, [INFO] [stdout] 543 | | _ => '_' [INFO] [stdout] 544 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:541:38 [INFO] [stdout] | [INFO] [stdout] 541 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:346:20 [INFO] [stdout] | [INFO] [stdout] 346 | Some(v) if v == 'Q' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 346 - Some(v) if v == 'Q' => index + 2, [INFO] [stdout] 346 + Some('Q') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:345:19 [INFO] [stdout] | [INFO] [stdout] 345 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:550:34 [INFO] [stdout] | [INFO] [stdout] 550 | ... if contains_at_least_one(&value, index + 1, 2, &["ZO", "ZI", "ZA"]) || (slavo_germanic && index > 0 && !char_at_match_before(... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:550:134 [INFO] [stdout] | [INFO] [stdout] 550 | ...ermanic && index > 0 && !char_at_match_before(&value, index, 1, 'T')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:352:64 [INFO] [stdout] | [INFO] [stdout] 352 | if index == value.len() - 1 && !slavo_germanic && contains(&value, index - 2, 2, "IE") && !contains_at_least_one(&value, index ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:559:24 [INFO] [stdout] | [INFO] [stdout] 559 | Some(v) if v == 'Z' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 559 - Some(v) if v == 'Z' => index + 2, [INFO] [stdout] 559 + Some('Z') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:352:118 [INFO] [stdout] | [INFO] [stdout] 352 | ...index - 2, 2, "IE") && !contains_at_least_one(&value, index - 4, 2, &["ME", "MA"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:558:23 [INFO] [stdout] | [INFO] [stdout] 558 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:358:20 [INFO] [stdout] | [INFO] [stdout] 358 | Some(v) if v == 'R' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 358 - Some(v) if v == 'R' => index + 2, [INFO] [stdout] 358 + Some('R') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:357:19 [INFO] [stdout] | [INFO] [stdout] 357 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:567:19 [INFO] [stdout] | [INFO] [stdout] 567 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:364:43 [INFO] [stdout] | [INFO] [stdout] 364 | if index > 0 && contains_at_least_one(&value, index - 1, 3, &["ISL", "YSL"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:367:38 [INFO] [stdout] | [INFO] [stdout] 367 | } else if index == 0 && contains(&value, index, 5, "SUGAR") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:372:24 [INFO] [stdout] | [INFO] [stdout] 372 | } else if contains(&value, index, 2, "SH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:373:34 [INFO] [stdout] | [INFO] [stdout] 373 | if contains_at_least_one(&value, index + 1, 4, &["HEIM", "HOEK", "HOLM", "HOLZ"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:381:37 [INFO] [stdout] | [INFO] [stdout] 381 | } else if contains_at_least_one(&value, index, 3, &["SIO", "SIA"]) || contains(&value, index, 4, "SIAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:381:84 [INFO] [stdout] | [INFO] [stdout] 381 | } else if contains_at_least_one(&value, index, 3, &["SIO", "SIA"]) || contains(&value, index, 4, "SIAN") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:389:52 [INFO] [stdout] | [INFO] [stdout] 389 | } else if (index == 0 && contains_at_least_one(&value, index + 1, 1, &["M", "N", "L", "W"])) || contains(&value, index + 1, 1, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `match` expression can be replaced with `?` [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | let value:String = match clean_input(&value) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 14 | | Some(v) => v, [INFO] [stdout] 15 | | None => return None [INFO] [stdout] 16 | | }; [INFO] [stdout] | |_____^ help: try instead: `clean_input(&value)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` 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/phonetics/metaphone/handler.rs:389:110 [INFO] [stdout] | [INFO] [stdout] 389 | ...x + 1, 1, &["M", "N", "L", "W"])) || contains(&value, index + 1, 1, "Z") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/double_metaphone.rs:13:42 [INFO] [stdout] | [INFO] [stdout] 13 | let value:String = match clean_input(&value) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | 'Ñ'|_ => index + 1 [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` 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/phonetics/metaphone/handler.rs:396:21 [INFO] [stdout] | [INFO] [stdout] 396 | if contains(&value, index + 1, 1, "Z") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:401:24 [INFO] [stdout] | [INFO] [stdout] 401 | } else if contains(&value, index, 2, "SC") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:402:27 [INFO] [stdout] | [INFO] [stdout] 402 | handle_sc(result, &value, index) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:404:62 [INFO] [stdout] | [INFO] [stdout] 404 | if index == value.len() - 1 && contains_at_least_one(&value, index - 2, 2, &["AI", "OI"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:411:34 [INFO] [stdout] | [INFO] [stdout] 411 | if contains_at_least_one(&value, index + 1, 1, &["S", "Z"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:420:24 [INFO] [stdout] | [INFO] [stdout] 420 | let current_char = match char_at(&value, index + 2) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 421 | | Some(v) => v, [INFO] [stdout] 422 | | _ => '_' [INFO] [stdout] 423 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 2).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:420:38 [INFO] [stdout] | [INFO] [stdout] 420 | let current_char = match char_at(&value, index + 2) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:426:34 [INFO] [stdout] | [INFO] [stdout] 426 | if contains_at_least_one(&value, index + 3, 2, &["OO", "ER", "EN", "UY", "ED", "EM"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:428:38 [INFO] [stdout] | [INFO] [stdout] 428 | if contains_at_least_one(&value, index + 3, 2, &["ER", "EN"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:438:40 [INFO] [stdout] | [INFO] [stdout] 438 | if index == 0 && !is_vowel(&value, 3) && !char_at_match(&value, 3, 'W') { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:84:10 [INFO] [stdout] | [INFO] [stdout] 84 | .fold(false, |acc, x| acc || x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x)` [INFO] [stdout] | [INFO] [stdout] = note: the `any` method is short circuiting and may change the program semantics if the iterator has side effects [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:438:69 [INFO] [stdout] | [INFO] [stdout] 438 | if index == 0 && !is_vowel(&value, 3) && !char_at_match(&value, 3, 'W') { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: length comparison to zero [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:88:8 [INFO] [stdout] | [INFO] [stdout] 88 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:94:8 [INFO] [stdout] | [INFO] [stdout] 94 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:445:37 [INFO] [stdout] | [INFO] [stdout] 445 | } else if contains_at_least_one(&value, index + 2, 1, &["I", "E", "Y"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: module has the same name as its containing module [INFO] [stdout] --> src/phonetics/metaphone/mod.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | pub mod metaphone; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:456:43 [INFO] [stdout] | [INFO] [stdout] 456 | if contains(&value, index, 4, "TION") { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 457 | | result.append('X'); [INFO] [stdout] 458 | | index + 3 [INFO] [stdout] 459 | | } else if contains_at_least_one(&value, index, 3, &["TIA", "TCH"]) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:459:72 [INFO] [stdout] | [INFO] [stdout] 459 | } else if contains_at_least_one(&value, index, 3, &["TIA", "TCH"]) { [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 460 | | result.append('X'); [INFO] [stdout] 461 | | index + 3 [INFO] [stdout] 462 | | } else if contains(&value, index, 2, "TH") || contains(&value, index, 3, "TTH") { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:456:17 [INFO] [stdout] | [INFO] [stdout] 456 | if contains(&value, index, 4, "TION") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:459:37 [INFO] [stdout] | [INFO] [stdout] 459 | } else if contains_at_least_one(&value, index, 3, &["TIA", "TCH"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:462:24 [INFO] [stdout] | [INFO] [stdout] 462 | } else if contains(&value, index, 2, "TH") || contains(&value, index, 3, "TTH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:462:60 [INFO] [stdout] | [INFO] [stdout] 462 | } else if contains(&value, index, 2, "TH") || contains(&value, index, 3, "TTH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:463:34 [INFO] [stdout] | [INFO] [stdout] 463 | if contains_at_least_one(&value, index + 2, 2, &["OM", "AM"]) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:464:35 [INFO] [stdout] | [INFO] [stdout] 464 | contains_at_least_one(&value, 0, 4, &["VAN ", "VON "]) || [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:465:22 [INFO] [stdout] | [INFO] [stdout] 465 | contains(&value, 0, 3, "SCH") [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:476:34 [INFO] [stdout] | [INFO] [stdout] 476 | if contains_at_least_one(&value, index + 1, 1, &["T", "D"]) { index + 2 } else { index + 1 } [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:484:20 [INFO] [stdout] | [INFO] [stdout] 484 | Some(v) if v == 'V' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 484 - Some(v) if v == 'V' => index + 2, [INFO] [stdout] 484 + Some('V') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:483:19 [INFO] [stdout] | [INFO] [stdout] 483 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:490:17 [INFO] [stdout] | [INFO] [stdout] 490 | if contains(&value, index, 2, "WR") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:495:36 [INFO] [stdout] | [INFO] [stdout] 495 | if index == 0 && (is_vowel(&value, index +1) || contains(&value, index, 2, "WH")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:495:66 [INFO] [stdout] | [INFO] [stdout] 495 | if index == 0 && (is_vowel(&value, index +1) || contains(&value, index, 2, "WH")) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:496:25 [INFO] [stdout] | [INFO] [stdout] 496 | if is_vowel(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:505:68 [INFO] [stdout] | [INFO] [stdout] 505 | ... } else if (index > 0 && index == value.len()-1 && is_vowel(&value, index - 1)) || (index > 0 && contains_at_least_one(&value,... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:505:127 [INFO] [stdout] | [INFO] [stdout] 505 | ... - 1)) || (index > 0 && contains_at_least_one(&value, index - 1, 5, &["EWSKI", "EWSKY", "OWSKI", "OWSKY"])) || contains(&value, ... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:505:201 [INFO] [stdout] | [INFO] [stdout] 505 | ...KI", "EWSKY", "OWSKI", "OWSKY"])) || contains(&value, 0, 3, "SCH") { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:509:41 [INFO] [stdout] | [INFO] [stdout] 509 | } else if contains_at_least_one(&value, index, 4, &["WICZ", "WITZ"]) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:528:67 [INFO] [stdout] | [INFO] [stdout] 528 | let contains_iau_eau = index > 2 && contains_at_least_one(&value, index - 3, 3, &["IAU", "EAU"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/metaphone.rs:102:110 [INFO] [stdout] | [INFO] [stdout] 102 | !is_last_char(local.len(), n) && FRONTV.contains(local.chars().nth(n + 1).unwrap()) && !is_previous_char(&local, n, 'G') [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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/phonetics/metaphone/handler.rs:529:52 [INFO] [stdout] | [INFO] [stdout] 529 | let contains_au_ou = contains_at_least_one(&value, index - 2, 2, &["AU", "OU"]); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/metaphone.rs:106:55 [INFO] [stdout] | [INFO] [stdout] 106 | !is_last_char(local.len(), n + 1) && is_next_char(&local, n, 'G') && FRONTV.contains(local.chars().nth(n + 2).unwrap()) [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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/phonetics/metaphone/handler.rs:536:34 [INFO] [stdout] | [INFO] [stdout] 536 | if contains_at_least_one(&value, index + 1, 1, &["C", "X"]) { index + 2 } else { index + 1 } [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 boolean expression can be simplified [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:117:6 [INFO] [stdout] | [INFO] [stdout] 117 | (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN")... [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] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + (!(last_char && next_is_h || next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | [INFO] [stdout] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + (!next_is_h || !last_char && is_vowel(local, n + 2) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | [INFO] [stdout] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + ((is_vowel(local, n + 2) || !next_is_h) && (!next_is_h || !last_char) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:541:24 [INFO] [stdout] | [INFO] [stdout] 541 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 542 | | Some(v) => v, [INFO] [stdout] 543 | | _ => '_' [INFO] [stdout] 544 | | }; [INFO] [stdout] | |_____^ help: replace with: `char_at(&value, index + 1).unwrap_or('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:541:38 [INFO] [stdout] | [INFO] [stdout] 541 | let current_char = match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:550:34 [INFO] [stdout] | [INFO] [stdout] 550 | ... if contains_at_least_one(&value, index + 1, 2, &["ZO", "ZI", "ZA"]) || (slavo_germanic && index > 0 && !char_at_match_before(... [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/metaphone.rs:121:24 [INFO] [stdout] | [INFO] [stdout] 121 | !(is_previous_char(&local, n, 'M') && is_last_char(local.len(), n)) [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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/phonetics/metaphone/handler.rs:550:134 [INFO] [stdout] | [INFO] [stdout] 550 | ...ermanic && index > 0 && !char_at_match_before(&value, index, 1, 'T')) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/metaphone.rs:125:25 [INFO] [stdout] | [INFO] [stdout] 125 | ! (is_previous_char(&local, n , 'S') && !is_last_char(local.len(), n) && FRONTV.contains(char_next)) [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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: redundant guard [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:559:24 [INFO] [stdout] | [INFO] [stdout] 559 | Some(v) if v == 'Z' => index + 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 559 - Some(v) if v == 'Z' => index + 2, [INFO] [stdout] 559 + Some('Z') => index + 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/handler.rs:558:23 [INFO] [stdout] | [INFO] [stdout] 558 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/phonetics/metaphone/handler.rs:567:19 [INFO] [stdout] | [INFO] [stdout] 567 | match char_at(&value, index + 1) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `match` expression can be replaced with `?` [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | let value:String = match clean_input(&value) { [INFO] [stdout] | ________________________^ [INFO] [stdout] 14 | | Some(v) => v, [INFO] [stdout] 15 | | None => return None [INFO] [stdout] 16 | | }; [INFO] [stdout] | |_____^ help: try instead: `clean_input(&value)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` 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/phonetics/metaphone/double_metaphone.rs:13:42 [INFO] [stdout] | [INFO] [stdout] 13 | let value:String = match clean_input(&value) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | 'Ñ'|_ => index + 1 [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:84:10 [INFO] [stdout] | [INFO] [stdout] 84 | .fold(false, |acc, x| acc || x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x)` [INFO] [stdout] | [INFO] [stdout] = note: the `any` method is short circuiting and may change the program semantics if the iterator has side effects [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:88:8 [INFO] [stdout] | [INFO] [stdout] 88 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/phonetics/metaphone/double_metaphone.rs:94:8 [INFO] [stdout] | [INFO] [stdout] 94 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/phonetics/metaphone/mod.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | pub mod metaphone; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` 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/phonetics/metaphone/metaphone.rs:102:110 [INFO] [stdout] | [INFO] [stdout] 102 | !is_last_char(local.len(), n) && FRONTV.contains(local.chars().nth(n + 1).unwrap()) && !is_previous_char(&local, n, 'G') [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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/phonetics/metaphone/metaphone.rs:106:55 [INFO] [stdout] | [INFO] [stdout] 106 | !is_last_char(local.len(), n + 1) && is_next_char(&local, n, 'G') && FRONTV.contains(local.chars().nth(n + 2).unwrap()) [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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 boolean expression can be simplified [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:117:6 [INFO] [stdout] | [INFO] [stdout] 117 | (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN")... [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] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + (!(last_char && next_is_h || next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | [INFO] [stdout] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + (!next_is_h || !last_char && is_vowel(local, n + 2) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | [INFO] [stdout] 117 - (!(last_char && next_is_h) && !(!last_char && next_is_h && !is_vowel(local, n + 2)) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] 117 + ((is_vowel(local, n + 2) || !next_is_h) && (!next_is_h || !last_char) && !(n > 0 && (region_match(local, n, "GN") || region_match(local, n, "GNED")))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/phonetics/metaphone/metaphone.rs:121:24 [INFO] [stdout] | [INFO] [stdout] 121 | !(is_previous_char(&local, n, 'M') && is_last_char(local.len(), n)) [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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/phonetics/metaphone/metaphone.rs:125:25 [INFO] [stdout] | [INFO] [stdout] 125 | ! (is_previous_char(&local, n , 'S') && !is_last_char(local.len(), n) && FRONTV.contains(char_next)) [INFO] [stdout] | ^^^^^^ help: change this to: `local` [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: the borrowed expression implements the required traits [INFO] [stdout] --> benches/distance.rs:33:31 [INFO] [stdout] | [INFO] [stdout] 33 | let mut file = File::open(&path).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> benches/distance.rs:39:35 [INFO] [stdout] | [INFO] [stdout] 39 | levenshtein("rubert", &i); [INFO] [stdout] | ^^ help: change this to: `i` [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: the borrowed expression implements the required traits [INFO] [stdout] --> benches/distance.rs:49:31 [INFO] [stdout] | [INFO] [stdout] 49 | let mut file = File::open(&path).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> benches/distance.rs:55:28 [INFO] [stdout] | [INFO] [stdout] 55 | jaro("rubert", &i); [INFO] [stdout] | ^^ help: change this to: `i` [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: the borrowed expression implements the required traits [INFO] [stdout] --> benches/distance.rs:65:31 [INFO] [stdout] | [INFO] [stdout] 65 | let mut file = File::open(&path).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> benches/distance.rs:71:36 [INFO] [stdout] | [INFO] [stdout] 71 | jaro_winkler("rubert", &i); [INFO] [stdout] | ^^ help: change this to: `i` [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: constants have by default a `'static` lifetime [INFO] [stdout] --> tests/double_metaphone.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | const TEST_VALUES: &'static [&'static (&'static str, &'static str, &'static str)] = &[ [INFO] [stdout] | -^^^^^^^------------------------------------------------------ help: consider removing `'static`: `&[&'static (&'static str, &'static str, &'static str)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> tests/double_metaphone.rs:6:31 [INFO] [stdout] | [INFO] [stdout] 6 | const TEST_VALUES: &'static [&'static (&'static str, &'static str, &'static str)] = &[ [INFO] [stdout] | -^^^^^^^------------------------------------------- help: consider removing `'static`: `&(&'static str, &'static str, &'static str)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> tests/double_metaphone.rs:6:41 [INFO] [stdout] | [INFO] [stdout] 6 | const TEST_VALUES: &'static [&'static (&'static str, &'static str, &'static str)] = &[ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> tests/double_metaphone.rs:6:55 [INFO] [stdout] | [INFO] [stdout] 6 | const TEST_VALUES: &'static [&'static (&'static str, &'static str, &'static str)] = &[ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> tests/double_metaphone.rs:6:69 [INFO] [stdout] | [INFO] [stdout] 6 | const TEST_VALUES: &'static [&'static (&'static str, &'static str, &'static str)] = &[ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> tests/double_metaphone.rs:1235:52 [INFO] [stdout] | [INFO] [stdout] 1235 | let metaphone = match double_metaphone(&value.0) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `value.0` [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: needlessly taken reference of both operands [INFO] [stdout] --> tests/double_metaphone.rs:1241:21 [INFO] [stdout] | [INFO] [stdout] 1241 | assert!(&metaphone.primary == &value.1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 1241 - assert!(&metaphone.primary == &value.1); [INFO] [stdout] 1241 + assert!(metaphone.primary == value.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> tests/metaphone.rs:242:18 [INFO] [stdout] | [INFO] [stdout] 242 | vec.push(&vv); [INFO] [stdout] | ^^^ help: change this to: `vv` [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: useless use of `vec!` [INFO] [stdout] --> tests/metaphone.rs:47:28 [INFO] [stdout] | [INFO] [stdout] 47 | assert_metaphone_equal(&vec![ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 48 | | ("Case", "case"), [INFO] [stdout] 49 | | ("CASE", "Case"), [INFO] [stdout] 50 | | ("caSe", "cAsE"), [INFO] [stdout] 51 | | ("quick", "cookie") [INFO] [stdout] 52 | | ]); [INFO] [stdout] | |_____^ [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] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 47 ~ assert_metaphone_equal(&[("Case", "case"), [INFO] [stdout] 48 + ("CASE", "Case"), [INFO] [stdout] 49 + ("caSe", "cAsE"), [INFO] [stdout] 50 ~ ("quick", "cookie")]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/metaphone.rs:57:28 [INFO] [stdout] | [INFO] [stdout] 57 | assert_metaphone_equal(&vec![ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 58 | | ("Lawrence", "Lorenza"), [INFO] [stdout] 59 | | ("Gary", "Cahra") [INFO] [stdout] 60 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 57 ~ assert_metaphone_equal(&[("Lawrence", "Lorenza"), [INFO] [stdout] 58 ~ ("Gary", "Cahra")]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/metaphone.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | assert_metaphone_to_many("WT", &vec![ [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 71 | | "Wade", "Wait", "Waite", [INFO] [stdout] 72 | | "Wat", "Whit", "Wiatt", [INFO] [stdout] 73 | | "Wit", "Wittie", "Witty", [INFO] [stdout] 74 | | "Wood", "Woodie", "Woody"]) [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 70 ~ assert_metaphone_to_many("WT", &["Wade", "Wait", "Waite", [INFO] [stdout] 71 + "Wat", "Whit", "Wiatt", [INFO] [stdout] 72 + "Wit", "Wittie", "Witty", [INFO] [stdout] 73 ~ "Wood", "Woodie", "Woody"]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/metaphone.rs:79:39 [INFO] [stdout] | [INFO] [stdout] 79 | assert_metaphone_to_many("ALBRT", &vec!["Ailbert", "Albert", "Alberto"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["Ailbert", "Albert", "Alberto"]` [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] --> tests/metaphone.rs:80:39 [INFO] [stdout] | [INFO] [stdout] 80 | assert_metaphone_to_many("ALBRK", &vec!["Alberik"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["Alberik"]` [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] --> tests/metaphone.rs:81:40 [INFO] [stdout] | [INFO] [stdout] 81 | assert_metaphone_to_many("ALBRXT", &vec!["Albrecht"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["Albrecht"]` [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] --> tests/metaphone.rs:137:37 [INFO] [stdout] | [INFO] [stdout] 137 | assert_metaphone_to_many("PRS", &vec![ [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 138 | | "Pearcy", "Perris", "Piercy", "Pierz", "Pryse"]) [INFO] [stdout] | |____________________________________________________________________________^ help: you can use a slice directly: `&["Pearcy", "Perris", "Piercy", "Pierz", "Pryse"]` [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] --> tests/metaphone.rs:143:37 [INFO] [stdout] | [INFO] [stdout] 143 | assert_metaphone_to_many("PTR", &vec![ [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 144 | | "Peadar", "Peder", "Pedro", "Peter", "Petr", [INFO] [stdout] 145 | | "Peyter", "Pieter", "Pietro", "Piotr"]) [INFO] [stdout] | |___________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 143 ~ assert_metaphone_to_many("PTR", &["Peadar", "Peder", "Pedro", "Peter", "Petr", [INFO] [stdout] 144 ~ "Peyter", "Pieter", "Pietro", "Piotr"]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/metaphone.rs:150:35 [INFO] [stdout] | [INFO] [stdout] 150 | assert_metaphone_to_many("R", &vec![ [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 151 | | "Ray", "Rey", "Roi", "Roy", "Ruy"]) [INFO] [stdout] | |_______________________________________________________________^ help: you can use a slice directly: `&["Ray", "Rey", "Roi", "Roy", "Ruy"]` [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] --> tests/metaphone.rs:156:37 [INFO] [stdout] | [INFO] [stdout] 156 | assert_metaphone_to_many("SSN", &vec![ [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 157 | | "Siusan", "Sosanna", "Susan", "Susana", "Susann", [INFO] [stdout] 158 | | "Susanna", "Susannah", "Susanne", "Suzann", "Suzanna", [INFO] [stdout] 159 | | "Suzanne", "Zuzana"]) [INFO] [stdout] | |_________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 156 ~ assert_metaphone_to_many("SSN", &["Siusan", "Sosanna", "Susan", "Susana", "Susann", [INFO] [stdout] 157 + "Susanna", "Susannah", "Susanne", "Suzann", "Suzanna", [INFO] [stdout] 158 ~ "Suzanne", "Zuzana"]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/metaphone.rs:164:36 [INFO] [stdout] | [INFO] [stdout] 164 | assert_metaphone_to_many("RT", &vec![ [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 165 | | "Rota", "Rudd", "Ryde"]) [INFO] [stdout] | |____________________________________________________^ help: you can use a slice directly: `&["Rota", "Rudd", "Ryde"]` [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] --> tests/metaphone.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | assert_metaphone_to_many("SLN", &vec![ [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 171 | | "Celene", "Celina", "Celine", "Selena", "Selene", [INFO] [stdout] 172 | | "Selina", "Seline", "Suellen", "Xylina"]) [INFO] [stdout] | |_____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 170 ~ assert_metaphone_to_many("SLN", &["Celene", "Celina", "Celine", "Selena", "Selene", [INFO] [stdout] 171 ~ "Selina", "Seline", "Suellen", "Xylina"]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.41s [INFO] running `Command { std: "docker" "inspect" "d447dbc9adc0e12dd306b4530bc21409ef067079e681e38ccf5f345d9f1d8e0d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d447dbc9adc0e12dd306b4530bc21409ef067079e681e38ccf5f345d9f1d8e0d", kill_on_drop: false }` [INFO] [stdout] d447dbc9adc0e12dd306b4530bc21409ef067079e681e38ccf5f345d9f1d8e0d