[INFO] crate plaintalk 0.0.15 is already in cache [INFO] extracting crate plaintalk 0.0.15 into work/ex/clippy-test-run/sources/stable/reg/plaintalk/0.0.15 [INFO] extracting crate plaintalk 0.0.15 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/plaintalk/0.0.15 [INFO] validating manifest of plaintalk-0.0.15 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 plaintalk-0.0.15 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 plaintalk-0.0.15 [INFO] finished frobbing plaintalk-0.0.15 [INFO] frobbed toml for plaintalk-0.0.15 written to work/ex/clippy-test-run/sources/stable/reg/plaintalk/0.0.15/Cargo.toml [INFO] started frobbing plaintalk-0.0.15 [INFO] finished frobbing plaintalk-0.0.15 [INFO] frobbed toml for plaintalk-0.0.15 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/plaintalk/0.0.15/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting plaintalk-0.0.15 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/plaintalk/0.0.15:/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] 6f35a736c4ee635ddf7acbe644c4395bc51e3b3293956c0546004b61769e571a [INFO] running `"docker" "start" "-a" "6f35a736c4ee635ddf7acbe644c4395bc51e3b3293956c0546004b61769e571a"` [INFO] [stderr] Checking plaintalk v0.0.15 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushparser.rs:18:4 [INFO] [stderr] | [INFO] [stderr] 18 | listener: listener, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `listener` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/pullparser.rs:20:4 [INFO] [stderr] | [INFO] [stderr] 20 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/message.rs:30:4 [INFO] [stderr] | [INFO] [stderr] 30 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/message.rs:31:4 [INFO] [stderr] | [INFO] [stderr] 31 | parser_state: parser_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parser_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:50:4 [INFO] [stderr] | [INFO] [stderr] 50 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:51:4 [INFO] [stderr] | [INFO] [stderr] 51 | parser_state: parser_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parser_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:52:4 [INFO] [stderr] | [INFO] [stderr] 52 | message_state: message_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `message_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:53:4 [INFO] [stderr] | [INFO] [stderr] 53 | empty: empty, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `empty` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushgenerator.rs:32:4 [INFO] [stderr] | [INFO] [stderr] 32 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushgenerator.rs:82:4 [INFO] [stderr] | [INFO] [stderr] 82 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushgenerator.rs:138:4 [INFO] [stderr] | [INFO] [stderr] 138 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushparser.rs:18:4 [INFO] [stderr] | [INFO] [stderr] 18 | listener: listener, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `listener` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/pullparser.rs:20:4 [INFO] [stderr] | [INFO] [stderr] 20 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/message.rs:30:4 [INFO] [stderr] | [INFO] [stderr] 30 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/message.rs:31:4 [INFO] [stderr] | [INFO] [stderr] 31 | parser_state: parser_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parser_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:50:4 [INFO] [stderr] | [INFO] [stderr] 50 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:51:4 [INFO] [stderr] | [INFO] [stderr] 51 | parser_state: parser_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parser_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:52:4 [INFO] [stderr] | [INFO] [stderr] 52 | message_state: message_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `message_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pullparser/field.rs:53:4 [INFO] [stderr] | [INFO] [stderr] 53 | empty: empty, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `empty` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushgenerator.rs:32:4 [INFO] [stderr] | [INFO] [stderr] 32 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushgenerator.rs:82:4 [INFO] [stderr] | [INFO] [stderr] 82 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/pushgenerator.rs:138:4 [INFO] [stderr] | [INFO] [stderr] 138 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/pullparser/mod.rs:4:1 [INFO] [stderr] | [INFO] [stderr] 4 | mod pullparser; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: All variants have the same postfix: `Field` [INFO] [stderr] --> src/pushgenerator.rs:68:1 [INFO] [stderr] | [INFO] [stderr] 68 | / enum MessageState { [INFO] [stderr] 69 | | BeforeFirstField, [INFO] [stderr] 70 | | AfterFirstField, [INFO] [stderr] 71 | | GeneratingField, [INFO] [stderr] 72 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::enum_variant_names)] on by default [INFO] [stderr] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/pushparser.rs:26:9 [INFO] [stderr] | [INFO] [stderr] 26 | while rest.len() != 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!rest.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/pullparser/field.rs:171:39 [INFO] [stderr] | [INFO] [stderr] 171 | return Err(io::Error::new(kind, data.clone())); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::clone_double_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 171 | return Err(io::Error::new(kind, &(*data).clone())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 171 | return Err(io::Error::new(kind, &str::clone(data))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/pushgenerator.rs:111:3 [INFO] [stderr] | [INFO] [stderr] 111 | try!{field.write(buf)}; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:118:57 [INFO] [stderr] | [INFO] [stderr] 118 | self.inner.state = match self.inner.inner.write_all(&['\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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:154:21 [INFO] [stderr] | [INFO] [stderr] 154 | const CURLY_L: u8 = '{' as u8; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'{' [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:155:16 [INFO] [stderr] | [INFO] [stderr] 155 | const SP: u8 = ' ' as u8; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b' ' [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:156:16 [INFO] [stderr] | [INFO] [stderr] 156 | const CR: u8 = '\r' as u8; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'\r' [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:157:16 [INFO] [stderr] | [INFO] [stderr] 157 | const LF: u8 = '\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: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/pushgenerator.rs:163:3 [INFO] [stderr] | [INFO] [stderr] 163 | buf.iter().position(|&x| x == CURLY_L || x == SP || x == CR || x == LF).is_some() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = note: replace `position(|&x| x == CURLY_L || x == SP || x == CR || x == LF).is_some()` with `any(|&x| x == CURLY_L || x == SP || x == CR || x == LF)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/pushgenerator.rs:176:30 [INFO] [stderr] | [INFO] [stderr] 176 | self.empty = self.empty && (buf.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buf.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `plaintalk`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/pullparser/mod.rs:4:1 [INFO] [stderr] | [INFO] [stderr] 4 | mod pullparser; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: All variants have the same postfix: `Field` [INFO] [stderr] --> src/pushgenerator.rs:68:1 [INFO] [stderr] | [INFO] [stderr] 68 | / enum MessageState { [INFO] [stderr] 69 | | BeforeFirstField, [INFO] [stderr] 70 | | AfterFirstField, [INFO] [stderr] 71 | | GeneratingField, [INFO] [stderr] 72 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::enum_variant_names)] on by default [INFO] [stderr] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/pushparser.rs:26:9 [INFO] [stderr] | [INFO] [stderr] 26 | while rest.len() != 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!rest.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/pullparser/field.rs:171:39 [INFO] [stderr] | [INFO] [stderr] 171 | return Err(io::Error::new(kind, data.clone())); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::clone_double_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 171 | return Err(io::Error::new(kind, &(*data).clone())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 171 | return Err(io::Error::new(kind, &str::clone(data))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/pushgenerator.rs:111:3 [INFO] [stderr] | [INFO] [stderr] 111 | try!{field.write(buf)}; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:118:57 [INFO] [stderr] | [INFO] [stderr] 118 | self.inner.state = match self.inner.inner.write_all(&['\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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:154:21 [INFO] [stderr] | [INFO] [stderr] 154 | const CURLY_L: u8 = '{' as u8; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'{' [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:155:16 [INFO] [stderr] | [INFO] [stderr] 155 | const SP: u8 = ' ' as u8; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b' ' [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:156:16 [INFO] [stderr] | [INFO] [stderr] 156 | const CR: u8 = '\r' as u8; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'\r' [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: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/pushgenerator.rs:157:16 [INFO] [stderr] | [INFO] [stderr] 157 | const LF: u8 = '\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: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/pushgenerator.rs:163:3 [INFO] [stderr] | [INFO] [stderr] 163 | buf.iter().position(|&x| x == CURLY_L || x == SP || x == CR || x == LF).is_some() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = note: replace `position(|&x| x == CURLY_L || x == SP || x == CR || x == LF).is_some()` with `any(|&x| x == CURLY_L || x == SP || x == CR || x == LF)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/pushgenerator.rs:176:30 [INFO] [stderr] | [INFO] [stderr] 176 | self.empty = self.empty && (buf.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buf.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `plaintalk`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "6f35a736c4ee635ddf7acbe644c4395bc51e3b3293956c0546004b61769e571a"` [INFO] running `"docker" "rm" "-f" "6f35a736c4ee635ddf7acbe644c4395bc51e3b3293956c0546004b61769e571a"` [INFO] [stdout] 6f35a736c4ee635ddf7acbe644c4395bc51e3b3293956c0546004b61769e571a