[INFO] updating cached repository laflechejonathan/nails-pdf [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/laflechejonathan/nails-pdf [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/laflechejonathan/nails-pdf" "work/ex/clippy-test-run/sources/stable/gh/laflechejonathan/nails-pdf"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/laflechejonathan/nails-pdf'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/laflechejonathan/nails-pdf" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/laflechejonathan/nails-pdf"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/laflechejonathan/nails-pdf'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] cd0af42cd618605eb9b3a57c918276790b53ee93 [INFO] sha for GitHub repo laflechejonathan/nails-pdf: cd0af42cd618605eb9b3a57c918276790b53ee93 [INFO] validating manifest of laflechejonathan/nails-pdf 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 laflechejonathan/nails-pdf 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 laflechejonathan/nails-pdf [INFO] finished frobbing laflechejonathan/nails-pdf [INFO] frobbed toml for laflechejonathan/nails-pdf written to work/ex/clippy-test-run/sources/stable/gh/laflechejonathan/nails-pdf/Cargo.toml [INFO] started frobbing laflechejonathan/nails-pdf [INFO] finished frobbing laflechejonathan/nails-pdf [INFO] frobbed toml for laflechejonathan/nails-pdf written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/laflechejonathan/nails-pdf/Cargo.toml [INFO] crate laflechejonathan/nails-pdf has a lockfile. skipping [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 laflechejonathan/nails-pdf against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/laflechejonathan/nails-pdf:/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] cf9897e067820b9343c0512eaefcc11c38e905581338e959b8fc8f954d1b19fc [INFO] running `"docker" "start" "-a" "cf9897e067820b9343c0512eaefcc11c38e905581338e959b8fc8f954d1b19fc"` [INFO] [stderr] Checking libc v0.2.24 [INFO] [stderr] Checking memchr v1.0.1 [INFO] [stderr] Checking aho-corasick v0.6.3 [INFO] [stderr] Checking regex v0.2.2 [INFO] [stderr] Checking nails-pdf v0.0.1 (/opt/crater/workdir) [INFO] [stderr] warning: unused import: `inflate::inflate_bytes` [INFO] [stderr] --> src/main.rs:5:5 [INFO] [stderr] | [INFO] [stderr] 5 | use inflate::inflate_bytes; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::collections::HashMap` [INFO] [stderr] --> src/main.rs:7:5 [INFO] [stderr] | [INFO] [stderr] 7 | use std::collections::HashMap; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::str::from_utf8` [INFO] [stderr] --> src/main.rs:14:5 [INFO] [stderr] | [INFO] [stderr] 14 | use std::str::from_utf8; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused `#[macro_use]` import [INFO] [stderr] --> src/main.rs:17:1 [INFO] [stderr] | [INFO] [stderr] 17 | #[macro_use] extern crate maplit; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:43:5 [INFO] [stderr] | [INFO] [stderr] 43 | return xref_parser.parse(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `xref_parser.parse()` [INFO] [stderr] warning: unused import: `inflate::inflate_bytes` [INFO] [stderr] --> src/main.rs:5:5 [INFO] [stderr] | [INFO] [stderr] 5 | use inflate::inflate_bytes; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::collections::HashMap` [INFO] [stderr] --> src/main.rs:7:5 [INFO] [stderr] | [INFO] [stderr] 7 | use std::collections::HashMap; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::str::from_utf8` [INFO] [stderr] --> src/main.rs:14:5 [INFO] [stderr] | [INFO] [stderr] 14 | use std::str::from_utf8; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [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/main.rs:82:5 [INFO] [stderr] | [INFO] [stderr] 82 | return (trailer, xref); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `(trailer, xref)` [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: long literal lacking separators [INFO] [stderr] --> src/parsers/xref/mod.rs:120:28 [INFO] [stderr] | [INFO] [stderr] 120 | XRefEntry{ offset: 118424, generation_id: 0, is_free: false}, [INFO] [stderr] | ^^^^^^ help: consider: `118_424` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:43:5 [INFO] [stderr] | [INFO] [stderr] 43 | return xref_parser.parse(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `xref_parser.parse()` [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/main.rs:82:5 [INFO] [stderr] | [INFO] [stderr] 82 | return (trailer, xref); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `(trailer, xref)` [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: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:24:5 [INFO] [stderr] | [INFO] [stderr] 24 | / match file.seek(SeekFrom::Start(offset)) { [INFO] [stderr] 25 | | Err(_) => panic!("couldn't seek to xref"), [INFO] [stderr] 26 | | Ok(_) => (), [INFO] [stderr] 27 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(_) = file.seek(SeekFrom::Start(offset)) { panic!("couldn't seek to xref") }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/main.rs:25:9 [INFO] [stderr] | [INFO] [stderr] 25 | Err(_) => panic!("couldn't seek to xref"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:50:5 [INFO] [stderr] | [INFO] [stderr] 50 | / match file.seek(SeekFrom::End(-CHUNK_SIZE)) { [INFO] [stderr] 51 | | Err(_) => panic!("couldn't seek to eof"), [INFO] [stderr] 52 | | Ok(_) => (), [INFO] [stderr] 53 | | } [INFO] [stderr] | |_____^ help: try this: `if let Err(_) = file.seek(SeekFrom::End(-CHUNK_SIZE)) { panic!("couldn't seek to eof") }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/main.rs:51:9 [INFO] [stderr] | [INFO] [stderr] 51 | Err(_) => panic!("couldn't seek to eof"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/main.rs:59:19 [INFO] [stderr] | [INFO] [stderr] 59 | let newline = '\n' as u8; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'\n' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/main.rs:62:20 [INFO] [stderr] | [INFO] [stderr] 62 | if line == "trailer".as_bytes() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"trailer"` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::string_lit_as_bytes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/main.rs:65:25 [INFO] [stderr] | [INFO] [stderr] 65 | else if line == "startxref".as_bytes() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"startxref"` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:86:5 [INFO] [stderr] | [INFO] [stderr] 86 | / match file.seek(SeekFrom::Start(xref_entry.offset)) { [INFO] [stderr] 87 | | Err(_) => panic!("couldn't seek to object"), [INFO] [stderr] 88 | | Ok(_) => (), [INFO] [stderr] 89 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(_) = file.seek(SeekFrom::Start(xref_entry.offset)) { panic!("couldn't seek to object") }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/main.rs:87:9 [INFO] [stderr] | [INFO] [stderr] 87 | Err(_) => panic!("couldn't seek to object"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/main.rs:91:19 [INFO] [stderr] | [INFO] [stderr] 91 | let newline = '\n' as u8; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'\n' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/cos/mod.rs:23:1 [INFO] [stderr] | [INFO] [stderr] 23 | / impl_rdp! { [INFO] [stderr] 24 | | grammar! { [INFO] [stderr] 25 | | begindict = { ["<"] ~ ["<"] } [INFO] [stderr] 26 | | enddict = { [">"] ~ [">"] } [INFO] [stderr] ... | [INFO] [stderr] 82 | | } [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/parsers/xref/mod.rs:32:1 [INFO] [stderr] | [INFO] [stderr] 32 | / impl_rdp! { [INFO] [stderr] 33 | | grammar! { [INFO] [stderr] 34 | | xref = { xref_begin ~ xref_header ~ xref_entry+ ~ xref_end } [INFO] [stderr] 35 | | xref_begin = { newline* ~ ["xref\n"] } [INFO] [stderr] ... | [INFO] [stderr] 73 | | } [INFO] [stderr] 74 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:24:5 [INFO] [stderr] | [INFO] [stderr] 24 | / match file.seek(SeekFrom::Start(offset)) { [INFO] [stderr] 25 | | Err(_) => panic!("couldn't seek to xref"), [INFO] [stderr] 26 | | Ok(_) => (), [INFO] [stderr] 27 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(_) = file.seek(SeekFrom::Start(offset)) { panic!("couldn't seek to xref") }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/main.rs:25:9 [INFO] [stderr] | [INFO] [stderr] 25 | Err(_) => panic!("couldn't seek to xref"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:50:5 [INFO] [stderr] | [INFO] [stderr] 50 | / match file.seek(SeekFrom::End(-CHUNK_SIZE)) { [INFO] [stderr] 51 | | Err(_) => panic!("couldn't seek to eof"), [INFO] [stderr] 52 | | Ok(_) => (), [INFO] [stderr] 53 | | } [INFO] [stderr] | |_____^ help: try this: `if let Err(_) = file.seek(SeekFrom::End(-CHUNK_SIZE)) { panic!("couldn't seek to eof") }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/main.rs:51:9 [INFO] [stderr] | [INFO] [stderr] 51 | Err(_) => panic!("couldn't seek to eof"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/main.rs:59:19 [INFO] [stderr] | [INFO] [stderr] 59 | let newline = '\n' as u8; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'\n' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/main.rs:62:20 [INFO] [stderr] | [INFO] [stderr] 62 | if line == "trailer".as_bytes() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"trailer"` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::string_lit_as_bytes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/main.rs:65:25 [INFO] [stderr] | [INFO] [stderr] 65 | else if line == "startxref".as_bytes() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"startxref"` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:86:5 [INFO] [stderr] | [INFO] [stderr] 86 | / match file.seek(SeekFrom::Start(xref_entry.offset)) { [INFO] [stderr] 87 | | Err(_) => panic!("couldn't seek to object"), [INFO] [stderr] 88 | | Ok(_) => (), [INFO] [stderr] 89 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(_) = file.seek(SeekFrom::Start(xref_entry.offset)) { panic!("couldn't seek to object") }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/main.rs:87:9 [INFO] [stderr] | [INFO] [stderr] 87 | Err(_) => panic!("couldn't seek to object"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/main.rs:91:19 [INFO] [stderr] | [INFO] [stderr] 91 | let newline = '\n' as u8; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'\n' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 8.63s [INFO] running `"docker" "inspect" "cf9897e067820b9343c0512eaefcc11c38e905581338e959b8fc8f954d1b19fc"` [INFO] running `"docker" "rm" "-f" "cf9897e067820b9343c0512eaefcc11c38e905581338e959b8fc8f954d1b19fc"` [INFO] [stdout] cf9897e067820b9343c0512eaefcc11c38e905581338e959b8fc8f954d1b19fc