[INFO] crate unicode-segmentation 1.2.1 is already in cache [INFO] extracting crate unicode-segmentation 1.2.1 into work/ex/clippy-test-run/sources/stable/reg/unicode-segmentation/1.2.1 [INFO] extracting crate unicode-segmentation 1.2.1 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/unicode-segmentation/1.2.1 [INFO] validating manifest of unicode-segmentation-1.2.1 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of unicode-segmentation-1.2.1 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing unicode-segmentation-1.2.1 [INFO] finished frobbing unicode-segmentation-1.2.1 [INFO] frobbed toml for unicode-segmentation-1.2.1 written to work/ex/clippy-test-run/sources/stable/reg/unicode-segmentation/1.2.1/Cargo.toml [INFO] started frobbing unicode-segmentation-1.2.1 [INFO] finished frobbing unicode-segmentation-1.2.1 [INFO] frobbed toml for unicode-segmentation-1.2.1 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/unicode-segmentation/1.2.1/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting unicode-segmentation-1.2.1 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/unicode-segmentation/1.2.1:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 03f5b604503bfe9f30e1435fda311364ebf34e9bfbe2731545ce2cb80d303b19 [INFO] running `"docker" "start" "-a" "03f5b604503bfe9f30e1435fda311364ebf34e9bfbe2731545ce2cb80d303b19"` [INFO] [stderr] Checking unicode-segmentation v1.2.1 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:274:13 [INFO] [stderr] | [INFO] [stderr] 274 | offset: offset, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `offset` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:275:13 [INFO] [stderr] | [INFO] [stderr] 275 | len: len, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `len` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:276:13 [INFO] [stderr] | [INFO] [stderr] 276 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:277:13 [INFO] [stderr] | [INFO] [stderr] 277 | is_extended: is_extended, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `is_extended` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:274:13 [INFO] [stderr] | [INFO] [stderr] 274 | offset: offset, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `offset` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:275:13 [INFO] [stderr] | [INFO] [stderr] 275 | len: len, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `len` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:276:13 [INFO] [stderr] | [INFO] [stderr] 276 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/grapheme.rs:277:13 [INFO] [stderr] | [INFO] [stderr] 277 | is_extended: is_extended, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `is_extended` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/grapheme.rs:499:37 [INFO] [stderr] | [INFO] [stderr] 499 | PairResult::NotBreak => return self.decision(false), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.decision(false)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/grapheme.rs:500:34 [INFO] [stderr] | [INFO] [stderr] 500 | PairResult::Break => return self.decision(true), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.decision(true)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/grapheme.rs:503:17 [INFO] [stderr] | [INFO] [stderr] 503 | return self.decision(!is_extended); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.decision(!is_extended)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/grapheme.rs:469:9 [INFO] [stderr] | [INFO] [stderr] 469 | / if self.offset < chunk_start || self.offset >= chunk_start + chunk.len() { [INFO] [stderr] 470 | | if self.offset > chunk_start + chunk.len() || self.cat_after.is_none() { [INFO] [stderr] 471 | | return Err(GraphemeIncomplete::InvalidOffset) [INFO] [stderr] 472 | | } [INFO] [stderr] 473 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 469 | if (self.offset < chunk_start || self.offset >= chunk_start + chunk.len()) && (self.offset > chunk_start + chunk.len() || self.cat_after.is_none()) { [INFO] [stderr] 470 | return Err(GraphemeIncomplete::InvalidOffset) [INFO] [stderr] 471 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:55:21 [INFO] [stderr] | [INFO] [stderr] 55 | const N_table: &'static [(char, char)] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[(char, char)]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:86:30 [INFO] [stderr] | [INFO] [stderr] 86 | const Alphabetic_table: &'static [(char, char)] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[(char, char)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:337:32 [INFO] [stderr] | [INFO] [stderr] 337 | const grapheme_cat_table: &'static [(char, char, GraphemeCat)] = &[ [INFO] [stderr] | -^^^^^^^---------------------------- help: consider removing `'static`: `&[(char, char, GraphemeCat)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:920:28 [INFO] [stderr] | [INFO] [stderr] 920 | const word_cat_table: &'static [(char, char, WordCat)] = &[ [INFO] [stderr] | -^^^^^^^------------------------ help: consider removing `'static`: `&[(char, char, WordCat)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/grapheme.rs:123:1 [INFO] [stderr] | [INFO] [stderr] 123 | / pub fn new_graphemes<'b>(s: &'b str, is_extended: bool) -> Graphemes<'b> { [INFO] [stderr] 124 | | let len = s.len(); [INFO] [stderr] 125 | | Graphemes { [INFO] [stderr] 126 | | string: s, [INFO] [stderr] ... | [INFO] [stderr] 129 | | } [INFO] [stderr] 130 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/grapheme.rs:133:1 [INFO] [stderr] | [INFO] [stderr] 133 | / pub fn new_grapheme_indices<'b>(s: &'b str, is_extended: bool) -> GraphemeIndices<'b> { [INFO] [stderr] 134 | | GraphemeIndices { start_offset: s.as_ptr() as usize, iter: new_graphemes(s, is_extended) } [INFO] [stderr] 135 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/grapheme.rs:461:24 [INFO] [stderr] | [INFO] [stderr] 461 | pub fn is_boundary(&mut self, chunk: &str, chunk_start: usize) -> Result { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 30 [INFO] [stderr] --> src/word.rs:135:5 [INFO] [stderr] | [INFO] [stderr] 135 | / fn next(&mut self) -> Option<&'a str> { [INFO] [stderr] 136 | | use self::UWordBoundsState::*; [INFO] [stderr] 137 | | use self::FormatExtendType::*; [INFO] [stderr] 138 | | use tables::word as wd; [INFO] [stderr] ... | [INFO] [stderr] 358 | | Some(retstr) [INFO] [stderr] 359 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/word.rs:139:12 [INFO] [stderr] | [INFO] [stderr] 139 | if self.string.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.string.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 33 [INFO] [stderr] --> src/word.rs:364:5 [INFO] [stderr] | [INFO] [stderr] 364 | / fn next_back(&mut self) -> Option<&'a str> { [INFO] [stderr] 365 | | use self::UWordBoundsState::*; [INFO] [stderr] 366 | | use self::FormatExtendType::*; [INFO] [stderr] 367 | | use tables::word as wd; [INFO] [stderr] ... | [INFO] [stderr] 585 | | Some(retstr) [INFO] [stderr] 586 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/word.rs:368:12 [INFO] [stderr] | [INFO] [stderr] 368 | if self.string.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.string.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/word.rs:520:50 [INFO] [stderr] | [INFO] [stderr] 520 | .map(|c| wd::word_category(c)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `wd::word_category` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/word.rs:631:1 [INFO] [stderr] | [INFO] [stderr] 631 | / pub fn new_word_bounds<'b>(s: &'b str) -> UWordBounds<'b> { [INFO] [stderr] 632 | | UWordBounds { string: s, cat: None, catb: None } [INFO] [stderr] 633 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/word.rs:636:1 [INFO] [stderr] | [INFO] [stderr] 636 | / pub fn new_word_bound_indices<'b>(s: &'b str) -> UWordBoundIndices<'b> { [INFO] [stderr] 637 | | UWordBoundIndices { start_offset: s.as_ptr() as usize, iter: new_word_bounds(s) } [INFO] [stderr] 638 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/word.rs:641:1 [INFO] [stderr] | [INFO] [stderr] 641 | / pub fn new_unicode_words<'b>(s: &'b str) -> UnicodeWords<'b> { [INFO] [stderr] 642 | | use super::UnicodeSegmentation; [INFO] [stderr] 643 | | use tables::util::is_alphanumeric; [INFO] [stderr] 644 | | [INFO] [stderr] ... | [INFO] [stderr] 648 | | UnicodeWords { inner: s.split_word_bounds().filter(has_alphanumeric) } [INFO] [stderr] 649 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/word.rs:645:59 [INFO] [stderr] | [INFO] [stderr] 645 | fn has_alphanumeric(s: &&str) -> bool { s.chars().any(|c| is_alphanumeric(c)) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `is_alphanumeric` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:108:5 [INFO] [stderr] | [INFO] [stderr] 108 | fn graphemes<'a>(&'a self, is_extended: bool) -> Graphemes<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:123:5 [INFO] [stderr] | [INFO] [stderr] 123 | fn grapheme_indices<'a>(&'a self, is_extended: bool) -> GraphemeIndices<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:145:5 [INFO] [stderr] | [INFO] [stderr] 145 | fn unicode_words<'a>(&'a self) -> UnicodeWords<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:161:5 [INFO] [stderr] | [INFO] [stderr] 161 | fn split_word_bounds<'a>(&'a self) -> UWordBounds<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:176:5 [INFO] [stderr] | [INFO] [stderr] 176 | fn split_word_bound_indices<'a>(&'a self) -> UWordBoundIndices<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/grapheme.rs:499:37 [INFO] [stderr] | [INFO] [stderr] 499 | PairResult::NotBreak => return self.decision(false), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.decision(false)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/grapheme.rs:500:34 [INFO] [stderr] | [INFO] [stderr] 500 | PairResult::Break => return self.decision(true), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.decision(true)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/grapheme.rs:503:17 [INFO] [stderr] | [INFO] [stderr] 503 | return self.decision(!is_extended); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.decision(!is_extended)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/grapheme.rs:469:9 [INFO] [stderr] | [INFO] [stderr] 469 | / if self.offset < chunk_start || self.offset >= chunk_start + chunk.len() { [INFO] [stderr] 470 | | if self.offset > chunk_start + chunk.len() || self.cat_after.is_none() { [INFO] [stderr] 471 | | return Err(GraphemeIncomplete::InvalidOffset) [INFO] [stderr] 472 | | } [INFO] [stderr] 473 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 469 | if (self.offset < chunk_start || self.offset >= chunk_start + chunk.len()) && (self.offset > chunk_start + chunk.len() || self.cat_after.is_none()) { [INFO] [stderr] 470 | return Err(GraphemeIncomplete::InvalidOffset) [INFO] [stderr] 471 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:55:21 [INFO] [stderr] | [INFO] [stderr] 55 | const N_table: &'static [(char, char)] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[(char, char)]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:86:30 [INFO] [stderr] | [INFO] [stderr] 86 | const Alphabetic_table: &'static [(char, char)] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[(char, char)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:337:32 [INFO] [stderr] | [INFO] [stderr] 337 | const grapheme_cat_table: &'static [(char, char, GraphemeCat)] = &[ [INFO] [stderr] | -^^^^^^^---------------------------- help: consider removing `'static`: `&[(char, char, GraphemeCat)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/tables.rs:920:28 [INFO] [stderr] | [INFO] [stderr] 920 | const word_cat_table: &'static [(char, char, WordCat)] = &[ [INFO] [stderr] | -^^^^^^^------------------------ help: consider removing `'static`: `&[(char, char, WordCat)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:19:28 [INFO] [stderr] | [INFO] [stderr] 19 | pub const EXTRA_DIFF: &'static [(&'static str, [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] help: consider removing `'static` [INFO] [stderr] | [INFO] [stderr] 19 | pub const EXTRA_DIFF: &[(&'static str, [INFO] [stderr] 20 | &'static [&'static str], [INFO] [stderr] 21 | &'static [&'static str])] = &[ [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:19:39 [INFO] [stderr] | [INFO] [stderr] 19 | pub const EXTRA_DIFF: &'static [(&'static str, [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:20:39 [INFO] [stderr] | [INFO] [stderr] 20 | &'static [&'static str], [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:20:49 [INFO] [stderr] | [INFO] [stderr] 20 | &'static [&'static str], [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:21:39 [INFO] [stderr] | [INFO] [stderr] 21 | &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:21:49 [INFO] [stderr] | [INFO] [stderr] 21 | &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:33:28 [INFO] [stderr] | [INFO] [stderr] 33 | pub const EXTRA_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^------------------------------------------ help: consider removing `'static`: `&[(&'static str, &'static [&'static str])]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:33:39 [INFO] [stderr] | [INFO] [stderr] 33 | pub const EXTRA_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:33:53 [INFO] [stderr] | [INFO] [stderr] 33 | pub const EXTRA_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:33:63 [INFO] [stderr] | [INFO] [stderr] 33 | pub const EXTRA_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:95:25 [INFO] [stderr] | [INFO] [stderr] 95 | const EXTRA_TESTS: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^------------------------------------------ help: consider removing `'static`: `&[(&'static str, &'static [&'static str])]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:95:36 [INFO] [stderr] | [INFO] [stderr] 95 | const EXTRA_TESTS: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:95:50 [INFO] [stderr] | [INFO] [stderr] 95 | const EXTRA_TESTS: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/test.rs:95:60 [INFO] [stderr] | [INFO] [stderr] 95 | const EXTRA_TESTS: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:16:27 [INFO] [stderr] | [INFO] [stderr] 16 | pub const TEST_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^------------------------------------------ help: consider removing `'static`: `&[(&'static str, &'static [&'static str])]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:16:38 [INFO] [stderr] | [INFO] [stderr] 16 | pub const TEST_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:16:52 [INFO] [stderr] | [INFO] [stderr] 16 | pub const TEST_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:16:62 [INFO] [stderr] | [INFO] [stderr] 16 | pub const TEST_SAME: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:468:27 [INFO] [stderr] | [INFO] [stderr] 468 | pub const TEST_DIFF: &'static [(&'static str, &'static [&'static str], &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^------------------------------------------------------------------- help: consider removing `'static`: `&[(&'static str, &'static [&'static str], &'static [&'static str])]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:468:38 [INFO] [stderr] | [INFO] [stderr] 468 | pub const TEST_DIFF: &'static [(&'static str, &'static [&'static str], &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:468:52 [INFO] [stderr] | [INFO] [stderr] 468 | pub const TEST_DIFF: &'static [(&'static str, &'static [&'static str], &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:468:62 [INFO] [stderr] | [INFO] [stderr] 468 | pub const TEST_DIFF: &'static [(&'static str, &'static [&'static str], &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:468:77 [INFO] [stderr] | [INFO] [stderr] 468 | pub const TEST_DIFF: &'static [(&'static str, &'static [&'static str], &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:468:87 [INFO] [stderr] | [INFO] [stderr] 468 | pub const TEST_DIFF: &'static [(&'static str, &'static [&'static str], &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:520:27 [INFO] [stderr] | [INFO] [stderr] 520 | pub const TEST_WORD: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^------------------------------------------ help: consider removing `'static`: `&[(&'static str, &'static [&'static str])]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:520:38 [INFO] [stderr] | [INFO] [stderr] 520 | pub const TEST_WORD: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:520:52 [INFO] [stderr] | [INFO] [stderr] 520 | pub const TEST_WORD: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/testdata.rs:520:62 [INFO] [stderr] | [INFO] [stderr] 520 | pub const TEST_WORD: &'static [(&'static str, &'static [&'static str])] = &[ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/grapheme.rs:123:1 [INFO] [stderr] | [INFO] [stderr] 123 | / pub fn new_graphemes<'b>(s: &'b str, is_extended: bool) -> Graphemes<'b> { [INFO] [stderr] 124 | | let len = s.len(); [INFO] [stderr] 125 | | Graphemes { [INFO] [stderr] 126 | | string: s, [INFO] [stderr] ... | [INFO] [stderr] 129 | | } [INFO] [stderr] 130 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/grapheme.rs:133:1 [INFO] [stderr] | [INFO] [stderr] 133 | / pub fn new_grapheme_indices<'b>(s: &'b str, is_extended: bool) -> GraphemeIndices<'b> { [INFO] [stderr] 134 | | GraphemeIndices { start_offset: s.as_ptr() as usize, iter: new_graphemes(s, is_extended) } [INFO] [stderr] 135 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/grapheme.rs:461:24 [INFO] [stderr] | [INFO] [stderr] 461 | pub fn is_boundary(&mut self, chunk: &str, chunk_start: usize) -> Result { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 30 [INFO] [stderr] --> src/word.rs:135:5 [INFO] [stderr] | [INFO] [stderr] 135 | / fn next(&mut self) -> Option<&'a str> { [INFO] [stderr] 136 | | use self::UWordBoundsState::*; [INFO] [stderr] 137 | | use self::FormatExtendType::*; [INFO] [stderr] 138 | | use tables::word as wd; [INFO] [stderr] ... | [INFO] [stderr] 358 | | Some(retstr) [INFO] [stderr] 359 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/word.rs:139:12 [INFO] [stderr] | [INFO] [stderr] 139 | if self.string.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.string.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 33 [INFO] [stderr] --> src/word.rs:364:5 [INFO] [stderr] | [INFO] [stderr] 364 | / fn next_back(&mut self) -> Option<&'a str> { [INFO] [stderr] 365 | | use self::UWordBoundsState::*; [INFO] [stderr] 366 | | use self::FormatExtendType::*; [INFO] [stderr] 367 | | use tables::word as wd; [INFO] [stderr] ... | [INFO] [stderr] 585 | | Some(retstr) [INFO] [stderr] 586 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/word.rs:368:12 [INFO] [stderr] | [INFO] [stderr] 368 | if self.string.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.string.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/word.rs:520:50 [INFO] [stderr] | [INFO] [stderr] 520 | .map(|c| wd::word_category(c)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `wd::word_category` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/word.rs:631:1 [INFO] [stderr] | [INFO] [stderr] 631 | / pub fn new_word_bounds<'b>(s: &'b str) -> UWordBounds<'b> { [INFO] [stderr] 632 | | UWordBounds { string: s, cat: None, catb: None } [INFO] [stderr] 633 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/word.rs:636:1 [INFO] [stderr] | [INFO] [stderr] 636 | / pub fn new_word_bound_indices<'b>(s: &'b str) -> UWordBoundIndices<'b> { [INFO] [stderr] 637 | | UWordBoundIndices { start_offset: s.as_ptr() as usize, iter: new_word_bounds(s) } [INFO] [stderr] 638 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/word.rs:641:1 [INFO] [stderr] | [INFO] [stderr] 641 | / pub fn new_unicode_words<'b>(s: &'b str) -> UnicodeWords<'b> { [INFO] [stderr] 642 | | use super::UnicodeSegmentation; [INFO] [stderr] 643 | | use tables::util::is_alphanumeric; [INFO] [stderr] 644 | | [INFO] [stderr] ... | [INFO] [stderr] 648 | | UnicodeWords { inner: s.split_word_bounds().filter(has_alphanumeric) } [INFO] [stderr] 649 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/word.rs:645:59 [INFO] [stderr] | [INFO] [stderr] 645 | fn has_alphanumeric(s: &&str) -> bool { s.chars().any(|c| is_alphanumeric(c)) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `is_alphanumeric` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:108:5 [INFO] [stderr] | [INFO] [stderr] 108 | fn graphemes<'a>(&'a self, is_extended: bool) -> Graphemes<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:123:5 [INFO] [stderr] | [INFO] [stderr] 123 | fn grapheme_indices<'a>(&'a self, is_extended: bool) -> GraphemeIndices<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:145:5 [INFO] [stderr] | [INFO] [stderr] 145 | fn unicode_words<'a>(&'a self) -> UnicodeWords<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:161:5 [INFO] [stderr] | [INFO] [stderr] 161 | fn split_word_bounds<'a>(&'a self) -> UWordBounds<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:176:5 [INFO] [stderr] | [INFO] [stderr] 176 | fn split_word_bound_indices<'a>(&'a self) -> UWordBoundIndices<'a>; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.53s [INFO] running `"docker" "inspect" "03f5b604503bfe9f30e1435fda311364ebf34e9bfbe2731545ce2cb80d303b19"` [INFO] running `"docker" "rm" "-f" "03f5b604503bfe9f30e1435fda311364ebf34e9bfbe2731545ce2cb80d303b19"` [INFO] [stdout] 03f5b604503bfe9f30e1435fda311364ebf34e9bfbe2731545ce2cb80d303b19