[INFO] fetching crate lua-patterns 0.4.0... [INFO] linting lua-patterns-0.4.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate lua-patterns 0.4.0 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate lua-patterns 0.4.0 [INFO] finished tweaking crates.io crate lua-patterns 0.4.0 [INFO] tweaked toml for crates.io crate lua-patterns 0.4.0 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate lua-patterns 0.4.0 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 lua-patterns 0.4.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 88818d8aedad1b27dcab64d4266c58cef159cbb5cbbbf3ab05bc373ecdbed0f2 [INFO] running `Command { std: "docker" "start" "-a" "88818d8aedad1b27dcab64d4266c58cef159cbb5cbbbf3ab05bc373ecdbed0f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "88818d8aedad1b27dcab64d4266c58cef159cbb5cbbbf3ab05bc373ecdbed0f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "88818d8aedad1b27dcab64d4266c58cef159cbb5cbbbf3ab05bc373ecdbed0f2", kill_on_drop: false }` [INFO] [stdout] 88818d8aedad1b27dcab64d4266c58cef159cbb5cbbbf3ab05bc373ecdbed0f2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 294e263d597a42522b72668cb4da223998f6d3a1ed478fa4058dd11118d670dd [INFO] running `Command { std: "docker" "start" "-a" "294e263d597a42522b72668cb4da223998f6d3a1ed478fa4058dd11118d670dd", kill_on_drop: false }` [INFO] [stderr] Checking lua-patterns v0.4.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | matches: matches, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `matches` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:292:13 [INFO] [stdout] | [INFO] [stdout] 292 | text: text, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `text` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:311:13 [INFO] [stdout] | [INFO] [stdout] 311 | text: text, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `text` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:329:13 [INFO] [stdout] | [INFO] [stdout] 329 | bytes: bytes, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | matches: matches, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `matches` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:292:13 [INFO] [stdout] | [INFO] [stdout] 292 | text: text, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `text` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:311:13 [INFO] [stdout] | [INFO] [stdout] 311 | text: text, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `text` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:329:13 [INFO] [stdout] | [INFO] [stdout] 329 | bytes: bytes, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `bytes` [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: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/luapat.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | unsafe { p.offset(count as isize) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 13 - unsafe { p.offset(count as isize) } [INFO] [stdout] 13 + unsafe { p.add(count) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/luapat.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / match *self { [INFO] [stdout] 49 | | CapLen::Unfinished => true, [INFO] [stdout] 50 | | _ => false, [INFO] [stdout] 51 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 48 - match *self { [INFO] [stdout] 49 - CapLen::Unfinished => true, [INFO] [stdout] 50 - _ => false, [INFO] [stdout] 51 - } [INFO] [stdout] 48 + matches!(*self, CapLen::Unfinished) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/luapat.rs:209:5 [INFO] [stdout] | [INFO] [stdout] 209 | return !sig; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 209 - return !sig; [INFO] [stdout] 209 + !sig [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/luapat.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | unsafe { p.offset(count as isize) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 13 - unsafe { p.offset(count as isize) } [INFO] [stdout] 13 + unsafe { p.add(count) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/luapat.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / match *self { [INFO] [stdout] 49 | | CapLen::Unfinished => true, [INFO] [stdout] 50 | | _ => false, [INFO] [stdout] 51 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 48 - match *self { [INFO] [stdout] 49 - CapLen::Unfinished => true, [INFO] [stdout] 50 - _ => false, [INFO] [stdout] 51 - } [INFO] [stdout] 48 + matches!(*self, CapLen::Unfinished) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/luapat.rs:461:17 [INFO] [stdout] | [INFO] [stdout] 461 | return error("invalid capture index"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 461 - return error("invalid capture index"); [INFO] [stdout] 461 + error("invalid capture index") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/luapat.rs:209:5 [INFO] [stdout] | [INFO] [stdout] 209 | return !sig; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 209 - return !sig; [INFO] [stdout] 209 + !sig [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/luapat.rs:595:12 [INFO] [stdout] | [INFO] [stdout] 595 | if !(s1 < ms.src_end && !anchor) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s1 >= ms.src_end || anchor` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:264:20 [INFO] [stdout] | [INFO] [stdout] 264 | start: self.matches[i].start as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.matches[i].start` [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/lib.rs:265:18 [INFO] [stdout] | [INFO] [stdout] 265 | end: self.matches[i].end as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.matches[i].end` [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: unneeded `return` statement [INFO] [stdout] --> src/luapat.rs:461:17 [INFO] [stdout] | [INFO] [stdout] 461 | return error("invalid capture index"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 461 - return error("invalid capture index"); [INFO] [stdout] 461 + error("invalid capture index") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:382:22 [INFO] [stdout] | [INFO] [stdout] 382 | .map_err(|e| PatternError::Utf8(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PatternError::Utf8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/lib.rs:592:21 [INFO] [stdout] | [INFO] [stdout] 592 | let p = self.matches.offset(i as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 592 - let p = self.matches.offset(i as isize); [INFO] [stdout] 592 + let p = self.matches.add(i); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:594:24 [INFO] [stdout] | [INFO] [stdout] 594 | start: (*p).start as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(*p).start` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:595:22 [INFO] [stdout] | [INFO] [stdout] 595 | end: (*p).end as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*p).end` [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/luapat.rs:595:12 [INFO] [stdout] | [INFO] [stdout] 595 | if !(s1 < ms.src_end && !anchor) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s1 >= ms.src_end || anchor` [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: you should consider adding a `Default` implementation for `LuaPatternBuilder` [INFO] [stdout] --> src/lib.rs:661:5 [INFO] [stdout] | [INFO] [stdout] 661 | / pub fn new() -> LuaPatternBuilder { [INFO] [stdout] 662 | | LuaPatternBuilder { bytes: Vec::new() } [INFO] [stdout] 663 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 659 + impl Default for LuaPatternBuilder { [INFO] [stdout] 660 + fn default() -> Self { [INFO] [stdout] 661 + Self::new() [INFO] [stdout] 662 + } [INFO] [stdout] 663 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:717:13 [INFO] [stdout] | [INFO] [stdout] 717 | / let mut res = Vec::new(); [INFO] [stdout] 718 | | res.push(b'%'); [INFO] [stdout] 719 | | res.push(cc.get(0)[0]); [INFO] [stdout] | |___________________________________^ help: consider using the `vec![]` macro: `let res = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:264:20 [INFO] [stdout] | [INFO] [stdout] 264 | start: self.matches[i].start as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.matches[i].start` [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/lib.rs:265:18 [INFO] [stdout] | [INFO] [stdout] 265 | end: self.matches[i].end as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.matches[i].end` [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: redundant closure [INFO] [stdout] --> src/lib.rs:382:22 [INFO] [stdout] | [INFO] [stdout] 382 | .map_err(|e| PatternError::Utf8(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PatternError::Utf8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/lib.rs:592:21 [INFO] [stdout] | [INFO] [stdout] 592 | let p = self.matches.offset(i as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 592 - let p = self.matches.offset(i as isize); [INFO] [stdout] 592 + let p = self.matches.add(i); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:594:24 [INFO] [stdout] | [INFO] [stdout] 594 | start: (*p).start as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(*p).start` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:595:22 [INFO] [stdout] | [INFO] [stdout] 595 | end: (*p).end as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*p).end` [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: you should consider adding a `Default` implementation for `LuaPatternBuilder` [INFO] [stdout] --> src/lib.rs:661:5 [INFO] [stdout] | [INFO] [stdout] 661 | / pub fn new() -> LuaPatternBuilder { [INFO] [stdout] 662 | | LuaPatternBuilder { bytes: Vec::new() } [INFO] [stdout] 663 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 659 + impl Default for LuaPatternBuilder { [INFO] [stdout] 660 + fn default() -> Self { [INFO] [stdout] 661 + Self::new() [INFO] [stdout] 662 + } [INFO] [stdout] 663 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:717:13 [INFO] [stdout] | [INFO] [stdout] 717 | / let mut res = Vec::new(); [INFO] [stdout] 718 | | res.push(b'%'); [INFO] [stdout] 719 | | res.push(cc.get(0)[0]); [INFO] [stdout] | |___________________________________^ help: consider using the `vec![]` macro: `let res = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:785:9 [INFO] [stdout] | [INFO] [stdout] 785 | assert_eq!(m.matches("one dog"), 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] 785 - assert_eq!(m.matches("one dog"), true); [INFO] [stdout] 785 + assert!(m.matches("one dog")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:786:9 [INFO] [stdout] | [INFO] [stdout] 786 | assert_eq!(m.matches("dog one "), 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] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 786 - assert_eq!(m.matches("dog one "), true); [INFO] [stdout] 786 + assert!(m.matches("dog one ")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:787:9 [INFO] [stdout] | [INFO] [stdout] 787 | assert_eq!(m.matches("dog one"), false); [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] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 787 - assert_eq!(m.matches("dog one"), false); [INFO] [stdout] 787 + assert!(!m.matches("dog one")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:791:9 [INFO] [stdout] | [INFO] [stdout] 791 | assert_eq!(m.matches(text), 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] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 791 - assert_eq!(m.matches(text), true); [INFO] [stdout] 791 + assert!(m.matches(text)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:793:9 [INFO] [stdout] | [INFO] [stdout] 793 | assert_eq!(m.matches(" one dog"), false); [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] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 793 - assert_eq!(m.matches(" one dog"), false); [INFO] [stdout] 793 + assert!(!m.matches(" one dog")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> examples/strings.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | let file = env::args().skip(1).next().expect("provide a binary file"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.61s [INFO] running `Command { std: "docker" "inspect" "294e263d597a42522b72668cb4da223998f6d3a1ed478fa4058dd11118d670dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "294e263d597a42522b72668cb4da223998f6d3a1ed478fa4058dd11118d670dd", kill_on_drop: false }` [INFO] [stdout] 294e263d597a42522b72668cb4da223998f6d3a1ed478fa4058dd11118d670dd