[INFO] fetching crate awabi 0.3.3... [INFO] linting awabi-0.3.3 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate awabi 0.3.3 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate awabi 0.3.3 [INFO] finished tweaking crates.io crate awabi 0.3.3 [INFO] tweaked toml for crates.io crate awabi 0.3.3 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate awabi 0.3.3 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate awabi 0.3.3 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] Downloading crates ... [INFO] [stderr] Downloaded clap v4.5.51 [INFO] [stderr] Downloaded regex v1.10.5 [INFO] [stderr] Downloaded clap_builder v4.5.51 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] b0500a9f6ce3810194ac1359f1041d56f152c1953363bf22f0b806abcc7a8fdc [INFO] running `Command { std: "docker" "start" "-a" "b0500a9f6ce3810194ac1359f1041d56f152c1953363bf22f0b806abcc7a8fdc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b0500a9f6ce3810194ac1359f1041d56f152c1953363bf22f0b806abcc7a8fdc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b0500a9f6ce3810194ac1359f1041d56f152c1953363bf22f0b806abcc7a8fdc", kill_on_drop: false }` [INFO] [stdout] b0500a9f6ce3810194ac1359f1041d56f152c1953363bf22f0b806abcc7a8fdc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 257ac170d659731533af2b924ca44991d3a38d5b936f53f7c11b8830ab3ff9aa [INFO] running `Command { std: "docker" "start" "-a" "257ac170d659731533af2b924ca44991d3a38d5b936f53f7c11b8830ab3ff9aa", kill_on_drop: false }` [INFO] [stderr] Checking anstyle-query v1.1.4 [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Checking regex-syntax v0.8.4 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking clap_builder v4.5.51 [INFO] [stderr] Checking memmap v0.7.0 [INFO] [stderr] Checking regex-automata v0.4.7 [INFO] [stderr] Checking clap v4.5.51 [INFO] [stderr] Checking regex v1.10.5 [INFO] [stderr] Checking awabi v0.3.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | mmap: mmap, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mmap` [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/dic.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | category_names: category_names, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `category_names` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:270:13 [INFO] [stdout] | [INFO] [stdout] 270 | mmap: mmap, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mmap` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:361:17 [INFO] [stdout] | [INFO] [stdout] 361 | lc_attr: lc_attr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `lc_attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | rc_attr: rc_attr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `rc_attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:363:17 [INFO] [stdout] | [INFO] [stdout] 363 | posid: posid, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `posid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | wcost: wcost, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `wcost` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:367:17 [INFO] [stdout] | [INFO] [stdout] 367 | skip: skip, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `skip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | mmap: mmap, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mmap` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:420:13 [INFO] [stdout] | [INFO] [stdout] 420 | lsize: lsize, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lsize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lattice.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | pos: pos, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | mmap: mmap, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mmap` [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/dic.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | category_names: category_names, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `category_names` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:270:13 [INFO] [stdout] | [INFO] [stdout] 270 | mmap: mmap, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mmap` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:361:17 [INFO] [stdout] | [INFO] [stdout] 361 | lc_attr: lc_attr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `lc_attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | rc_attr: rc_attr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `rc_attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:363:17 [INFO] [stdout] | [INFO] [stdout] 363 | posid: posid, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `posid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | wcost: wcost, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `wcost` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:367:17 [INFO] [stdout] | [INFO] [stdout] 367 | skip: skip, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `skip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | mmap: mmap, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mmap` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/dic.rs:420:13 [INFO] [stdout] | [INFO] [stdout] 420 | lsize: lsize, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lsize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lattice.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | pos: pos, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [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: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | use std::i16; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i16::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | use std::i32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use std::u16; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u16::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use std::u32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:81:23 [INFO] [stdout] | [INFO] [stdout] 81 | 1 => ch32 = s[index + 0] as u32, [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:83:24 [INFO] [stdout] | [INFO] [stdout] 83 | ch32 = ((s[index + 0] & 0x1F) as u32) << 6; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:87:24 [INFO] [stdout] | [INFO] [stdout] 87 | ch32 = ((s[index + 0] & 0x0F) as u32) << 12; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | ch32 = ((s[index + 0] & 0x07) as u32) << 18; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/dic.rs:237:12 [INFO] [stdout] | [INFO] [stdout] 237 | if ln_vec.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ln_vec.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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/dic.rs:288:36 [INFO] [stdout] | [INFO] [stdout] 288 | for (_i, &item) in s.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 288 - for (_i, &item) in s.iter().enumerate() { [INFO] [stdout] 288 + for &item in s.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/dic.rs:315:39 [INFO] [stdout] | [INFO] [stdout] 315 | results.push((-n - 1, i as usize)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/dic.rs:329:35 [INFO] [stdout] | [INFO] [stdout] 329 | results.push((-n - 1, s.len() as usize)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/dic.rs:365:30 [INFO] [stdout] | [INFO] [stdout] 365 | feature_ptr: (&self.mmap[start..]).as_ptr(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.mmap[start..]` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/dic.rs:430:32 [INFO] [stdout] | [INFO] [stdout] 430 | unpack_i16(&self.mmap, ((id2 * self.lsize + id1) * 2 + 4) as usize) as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(((id2 * self.lsize + id1) * 2 + 4))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lattice.rs:217:15 [INFO] [stdout] | [INFO] [stdout] 217 | while self.enodes[self.p as usize].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.enodes[self.p as usize].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/lattice.rs:240:42 [INFO] [stdout] | [INFO] [stdout] 240 | shortest_path.push(Rc::clone(&node)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lattice.rs:254:45 [INFO] [stdout] | [INFO] [stdout] 254 | pq.push(BackwardPath::new(Rc::clone(&node), None, matrix)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = 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/lattice.rs:256:15 [INFO] [stdout] | [INFO] [stdout] 256 | while pq.len() > 0 && n > 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pq.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/lattice.rs:267:57 [INFO] [stdout] | [INFO] [stdout] 267 | pq.push(BackwardPath::new(Rc::clone(&node), Some(&bp), matrix)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lattice.rs:296:42 [INFO] [stdout] | [INFO] [stdout] 296 | back_path.push(Rc::clone(&node)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/mecabrc.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | s.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `s.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/tokenizer.rs:52:47 [INFO] [stdout] | [INFO] [stdout] 52 | let user_dic: Option = if let Some(userdic_path) = rc_map.get("userdic") { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 53 | | Some(dic::MeCabDic::open(userdic_path).unwrap()) [INFO] [stdout] 54 | | } else { [INFO] [stdout] 55 | | None [INFO] [stdout] 56 | | }; [INFO] [stdout] | |_________^ help: try: `rc_map.get("userdic").map(|userdic_path| dic::MeCabDic::open(userdic_path).unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tokenizer.rs:83:20 [INFO] [stdout] | [INFO] [stdout] 83 | if user_entries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!user_entries.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/tokenizer.rs:93:16 [INFO] [stdout] | [INFO] [stdout] 93 | if sys_entries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_entries.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: the loop variable `i` is only used to index `nodes` [INFO] [stdout] --> src/tokenizer.rs:121:18 [INFO] [stdout] | [INFO] [stdout] 121 | for i in 1..nodes.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 121 - for i in 1..nodes.len() - 1 { [INFO] [stdout] 121 + for in nodes.iter().take(nodes.len() - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nodes` [INFO] [stdout] --> src/tokenizer.rs:134:22 [INFO] [stdout] | [INFO] [stdout] 134 | for i in 1..nodes.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 134 - for i in 1..nodes.len() - 1 { [INFO] [stdout] 134 + for in nodes.iter().take(nodes.len() - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/mecabrc.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | for path in vec!["/usr/local/etc/mecabrc", "/etc/mecabrc"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["/usr/local/etc/mecabrc", "/etc/mecabrc"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | use std::i16; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i16::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | use std::i32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use std::u16; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u16::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/dic.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use std::u32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:81:23 [INFO] [stdout] | [INFO] [stdout] 81 | 1 => ch32 = s[index + 0] as u32, [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:83:24 [INFO] [stdout] | [INFO] [stdout] 83 | ch32 = ((s[index + 0] & 0x1F) as u32) << 6; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:87:24 [INFO] [stdout] | [INFO] [stdout] 87 | ch32 = ((s[index + 0] & 0x0F) as u32) << 12; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/dic.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | ch32 = ((s[index + 0] & 0x07) as u32) << 18; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/dic.rs:237:12 [INFO] [stdout] | [INFO] [stdout] 237 | if ln_vec.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ln_vec.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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/dic.rs:288:36 [INFO] [stdout] | [INFO] [stdout] 288 | for (_i, &item) in s.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 288 - for (_i, &item) in s.iter().enumerate() { [INFO] [stdout] 288 + for &item in s.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/dic.rs:315:39 [INFO] [stdout] | [INFO] [stdout] 315 | results.push((-n - 1, i as usize)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/dic.rs:329:35 [INFO] [stdout] | [INFO] [stdout] 329 | results.push((-n - 1, s.len() as usize)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:28:25 [INFO] [stdout] | [INFO] [stdout] 28 | fn print_tokens(tokens: &Vec<(String, String)>) { [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] 28 - fn print_tokens(tokens: &Vec<(String, String)>) { [INFO] [stdout] 28 + fn print_tokens(tokens: &[(String, String)]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/dic.rs:365:30 [INFO] [stdout] | [INFO] [stdout] 365 | feature_ptr: (&self.mmap[start..]).as_ptr(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.mmap[start..]` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:58:18 [INFO] [stdout] | [INFO] [stdout] 58 | let rcfile = if let Some(rcfile_option) = matches.get_one::("rcfile") { [INFO] [stdout] | __________________^ [INFO] [stdout] 59 | | Some(rcfile_option.as_str()) [INFO] [stdout] 60 | | } else { [INFO] [stdout] 61 | | None [INFO] [stdout] 62 | | }; [INFO] [stdout] | |_____^ help: try: `matches.get_one::("rcfile").map(|rcfile_option| rcfile_option.as_str())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/dic.rs:430:32 [INFO] [stdout] | [INFO] [stdout] 430 | unpack_i16(&self.mmap, ((id2 * self.lsize + id1) * 2 + 4) as usize) as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(((id2 * self.lsize + id1) * 2 + 4))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/dic.rs:443:13 [INFO] [stdout] | [INFO] [stdout] 443 | assert!(!result.is_err(), "Can't open dict file."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `result.is_ok()` [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] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/dic.rs:533:5 [INFO] [stdout] | [INFO] [stdout] 533 | assert_eq!(invoke, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 533 - assert_eq!(invoke, true); [INFO] [stdout] 533 + assert!(invoke); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lattice.rs:217:15 [INFO] [stdout] | [INFO] [stdout] 217 | while self.enodes[self.p as usize].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.enodes[self.p as usize].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/lattice.rs:240:42 [INFO] [stdout] | [INFO] [stdout] 240 | shortest_path.push(Rc::clone(&node)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lattice.rs:254:45 [INFO] [stdout] | [INFO] [stdout] 254 | pq.push(BackwardPath::new(Rc::clone(&node), None, matrix)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = 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/lattice.rs:256:15 [INFO] [stdout] | [INFO] [stdout] 256 | while pq.len() > 0 && n > 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pq.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/lattice.rs:267:57 [INFO] [stdout] | [INFO] [stdout] 267 | pq.push(BackwardPath::new(Rc::clone(&node), Some(&bp), matrix)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lattice.rs:296:42 [INFO] [stdout] | [INFO] [stdout] 296 | back_path.push(Rc::clone(&node)); [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/mecabrc.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | s.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `s.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/tokenizer.rs:52:47 [INFO] [stdout] | [INFO] [stdout] 52 | let user_dic: Option = if let Some(userdic_path) = rc_map.get("userdic") { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 53 | | Some(dic::MeCabDic::open(userdic_path).unwrap()) [INFO] [stdout] 54 | | } else { [INFO] [stdout] 55 | | None [INFO] [stdout] 56 | | }; [INFO] [stdout] | |_________^ help: try: `rc_map.get("userdic").map(|userdic_path| dic::MeCabDic::open(userdic_path).unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tokenizer.rs:83:20 [INFO] [stdout] | [INFO] [stdout] 83 | if user_entries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!user_entries.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/tokenizer.rs:93:16 [INFO] [stdout] | [INFO] [stdout] 93 | if sys_entries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_entries.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: the loop variable `i` is only used to index `nodes` [INFO] [stdout] --> src/tokenizer.rs:121:18 [INFO] [stdout] | [INFO] [stdout] 121 | for i in 1..nodes.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 121 - for i in 1..nodes.len() - 1 { [INFO] [stdout] 121 + for in nodes.iter().take(nodes.len() - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nodes` [INFO] [stdout] --> src/tokenizer.rs:134:22 [INFO] [stdout] | [INFO] [stdout] 134 | for i in 1..nodes.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 134 - for i in 1..nodes.len() - 1 { [INFO] [stdout] 134 + for in nodes.iter().take(nodes.len() - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:28:25 [INFO] [stdout] | [INFO] [stdout] 28 | fn print_tokens(tokens: &Vec<(String, String)>) { [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] 28 - fn print_tokens(tokens: &Vec<(String, String)>) { [INFO] [stdout] 28 + fn print_tokens(tokens: &[(String, String)]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/mecabrc.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | for path in vec!["/usr/local/etc/mecabrc", "/etc/mecabrc"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["/usr/local/etc/mecabrc", "/etc/mecabrc"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:58:18 [INFO] [stdout] | [INFO] [stdout] 58 | let rcfile = if let Some(rcfile_option) = matches.get_one::("rcfile") { [INFO] [stdout] | __________________^ [INFO] [stdout] 59 | | Some(rcfile_option.as_str()) [INFO] [stdout] 60 | | } else { [INFO] [stdout] 61 | | None [INFO] [stdout] 62 | | }; [INFO] [stdout] | |_____^ help: try: `matches.get_one::("rcfile").map(|rcfile_option| rcfile_option.as_str())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.91s [INFO] running `Command { std: "docker" "inspect" "257ac170d659731533af2b924ca44991d3a38d5b936f53f7c11b8830ab3ff9aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "257ac170d659731533af2b924ca44991d3a38d5b936f53f7c11b8830ab3ff9aa", kill_on_drop: false }` [INFO] [stdout] 257ac170d659731533af2b924ca44991d3a38d5b936f53f7c11b8830ab3ff9aa