[INFO] cloning repository https://github.com/sagaban/rust-by-example [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/sagaban/rust-by-example" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsagaban%2Frust-by-example", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsagaban%2Frust-by-example'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2d7f259cdc0f6ca066acfa22d49b7a66667afd24 [INFO] linting sagaban/rust-by-example against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsagaban%2Frust-by-example" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/sagaban/rust-by-example [INFO] finished tweaking git repo https://github.com/sagaban/rust-by-example [INFO] tweaked toml for git repo https://github.com/sagaban/rust-by-example written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/sagaban/rust-by-example 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 git repo https://github.com/sagaban/rust-by-example already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 958fc1983ad1ced0c5ff1fc87bc2e5c1c8da77f061131a2c56ac2f9ce1008403 [INFO] running `Command { std: "docker" "start" "-a" "958fc1983ad1ced0c5ff1fc87bc2e5c1c8da77f061131a2c56ac2f9ce1008403", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "958fc1983ad1ced0c5ff1fc87bc2e5c1c8da77f061131a2c56ac2f9ce1008403", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "958fc1983ad1ced0c5ff1fc87bc2e5c1c8da77f061131a2c56ac2f9ce1008403", kill_on_drop: false }` [INFO] [stdout] 958fc1983ad1ced0c5ff1fc87bc2e5c1c8da77f061131a2c56ac2f9ce1008403 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] b6203033e62d47e7cff504dce129ae1c6e01f469474dfef70f17c981d332c028 [INFO] running `Command { std: "docker" "start" "-a" "b6203033e62d47e7cff504dce129ae1c6e01f469474dfef70f17c981d332c028", kill_on_drop: false }` [INFO] [stderr] Checking rust-by-example v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/chapters/c03.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | bottom_right: bottom_right, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `bottom_right` [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: unused variable: `logical` [INFO] [stdout] --> src/chapters/c02.rs:25:7 [INFO] [stdout] | [INFO] [stdout] 25 | let logical: bool = true; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_logical` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_float` [INFO] [stdout] --> src/chapters/c02.rs:27:7 [INFO] [stdout] | [INFO] [stdout] 27 | let a_float: f64 = 1.0; // Regular annotation [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_a_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `an_integer` [INFO] [stdout] --> src/chapters/c02.rs:28:7 [INFO] [stdout] | [INFO] [stdout] 28 | let an_integer = 5i32; // Suffix annotation [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_an_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `default_float` [INFO] [stdout] --> src/chapters/c02.rs:31:7 [INFO] [stdout] | [INFO] [stdout] 31 | let default_float = 3.0; // `f64` [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_default_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `default_integer` [INFO] [stdout] --> src/chapters/c02.rs:32:7 [INFO] [stdout] | [INFO] [stdout] 32 | let default_integer = 7; // `i32` [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_default_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `inferred_type` is assigned to, but never used [INFO] [stdout] --> src/chapters/c02.rs:35:7 [INFO] [stdout] | [INFO] [stdout] 35 | let mut inferred_type = 12; // Type i64 is inferred from another line [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_inferred_type` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mutable` is assigned to, but never used [INFO] [stdout] --> src/chapters/c02.rs:39:7 [INFO] [stdout] | [INFO] [stdout] 39 | let mut mutable = 12; // Mutable `i32` [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_mutable` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mutable` [INFO] [stdout] --> src/chapters/c02.rs:46:7 [INFO] [stdout] | [INFO] [stdout] 46 | let mutable = true; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mutable` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `inferred_type` is never read [INFO] [stdout] --> src/chapters/c02.rs:36:3 [INFO] [stdout] | [INFO] [stdout] 36 | inferred_type = 4294967296i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mutable` is never read [INFO] [stdout] --> src/chapters/c02.rs:40:3 [INFO] [stdout] | [INFO] [stdout] 40 | mutable = 21; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/chapters/c03.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | bottom_right: bottom_right, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `bottom_right` [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: field `0` is never read [INFO] [stdout] --> src/chapters/c01.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | struct Structure(i32); [INFO] [stdout] | --------- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Structure` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/chapters/c03.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 22 | struct Person<'a> { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 23 | // The 'a defines a lifetime [INFO] [stdout] 24 | name: &'a str, [INFO] [stdout] | ^^^^ [INFO] [stdout] 25 | age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Person` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Subtract` is never constructed [INFO] [stdout] --> src/chapters/c03.rs:220:5 [INFO] [stdout] | [INFO] [stdout] 218 | enum VeryVerboseEnumOfThingsToDoWithNumbers { [INFO] [stdout] | -------------------------------------- variant in this enum [INFO] [stdout] 219 | Add, [INFO] [stdout] 220 | Subtract, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/chapters/c01.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | object = "the lazy dog", [INFO] [stdout] | ______________^ [INFO] [stdout] 20 | | subject = "the quick brown fox", [INFO] [stdout] 21 | | verb = "jumps over" [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 18 - "{subject} {verb} {object}", [INFO] [stdout] 19 - object = "the lazy dog", [INFO] [stdout] 20 - subject = "the quick brown fox", [INFO] [stdout] 21 - verb = "jumps over" [INFO] [stdout] 18 + "the quick brown fox jumps over the lazy dog" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/chapters/c01.rs:40:47 [INFO] [stdout] | [INFO] [stdout] 40 | println!("My name is {0}, {1} {0}", "Bond", "James"); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - println!("My name is {0}, {1} {0}", "Bond", "James"); [INFO] [stdout] 40 + println!("My name is {0}, James {0}", "Bond"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/chapters/c01.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | let pi: f32 = 3.141562654; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] = note: `#[warn(clippy::excessive_precision)]` on by default [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 51 - let pi: f32 = 3.141562654; [INFO] [stdout] 51 + let pi: f32 = 3.141_562_7; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/chapters/c01.rs:211:12 [INFO] [stdout] | [INFO] [stdout] 211 | lat: 53.347778, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 211 - lat: 53.347778, [INFO] [stdout] 211 + lat: 53.347_78, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/chapters/c02.rs:60:36 [INFO] [stdout] | [INFO] [stdout] 60 | println!("true AND false is {}", true && false); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `false` [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: this boolean expression can be simplified [INFO] [stdout] --> src/chapters/c02.rs:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | println!("true OR false is {}", true || false); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `true` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/chapters/c02.rs:62:30 [INFO] [stdout] | [INFO] [stdout] 62 | println!("NOT true is {}", !true); [INFO] [stdout] | ^^^^^ help: try: `false` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/chapters/c03.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | return (top - bottom) * (right - left); [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] 128 - return (top - bottom) * (right - left); [INFO] [stdout] 128 + (top - bottom) * (right - left) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `logical` [INFO] [stdout] --> src/chapters/c02.rs:25:7 [INFO] [stdout] | [INFO] [stdout] 25 | let logical: bool = true; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_logical` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_float` [INFO] [stdout] --> src/chapters/c02.rs:27:7 [INFO] [stdout] | [INFO] [stdout] 27 | let a_float: f64 = 1.0; // Regular annotation [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_a_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `an_integer` [INFO] [stdout] --> src/chapters/c02.rs:28:7 [INFO] [stdout] | [INFO] [stdout] 28 | let an_integer = 5i32; // Suffix annotation [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_an_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `default_float` [INFO] [stdout] --> src/chapters/c02.rs:31:7 [INFO] [stdout] | [INFO] [stdout] 31 | let default_float = 3.0; // `f64` [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_default_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `default_integer` [INFO] [stdout] --> src/chapters/c02.rs:32:7 [INFO] [stdout] | [INFO] [stdout] 32 | let default_integer = 7; // `i32` [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_default_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `inferred_type` is assigned to, but never used [INFO] [stdout] --> src/chapters/c02.rs:35:7 [INFO] [stdout] | [INFO] [stdout] 35 | let mut inferred_type = 12; // Type i64 is inferred from another line [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_inferred_type` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mutable` is assigned to, but never used [INFO] [stdout] --> src/chapters/c02.rs:39:7 [INFO] [stdout] | [INFO] [stdout] 39 | let mut mutable = 12; // Mutable `i32` [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_mutable` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mutable` [INFO] [stdout] --> src/chapters/c02.rs:46:7 [INFO] [stdout] | [INFO] [stdout] 46 | let mutable = true; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mutable` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `inferred_type` is never read [INFO] [stdout] --> src/chapters/c02.rs:36:3 [INFO] [stdout] | [INFO] [stdout] 36 | inferred_type = 4294967296i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mutable` is never read [INFO] [stdout] --> src/chapters/c02.rs:40:3 [INFO] [stdout] | [INFO] [stdout] 40 | mutable = 21; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/chapters/c03.rs:362:16 [INFO] [stdout] | [INFO] [stdout] 362 | Nil => format!("Nil"), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Nil".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `c_liKe_enums` should have a snake case name [INFO] [stdout] --> src/chapters/c03.rs:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn c_liKe_enums() { [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `c_li_ke_enums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapters/c01.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | struct Structure(i32); [INFO] [stdout] | --------- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Structure` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/chapters/c03.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 22 | struct Person<'a> { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 23 | // The 'a defines a lifetime [INFO] [stdout] 24 | name: &'a str, [INFO] [stdout] | ^^^^ [INFO] [stdout] 25 | age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Person` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Subtract` is never constructed [INFO] [stdout] --> src/chapters/c03.rs:220:5 [INFO] [stdout] | [INFO] [stdout] 218 | enum VeryVerboseEnumOfThingsToDoWithNumbers { [INFO] [stdout] | -------------------------------------- variant in this enum [INFO] [stdout] 219 | Add, [INFO] [stdout] 220 | Subtract, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/chapters/c01.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | object = "the lazy dog", [INFO] [stdout] | ______________^ [INFO] [stdout] 20 | | subject = "the quick brown fox", [INFO] [stdout] 21 | | verb = "jumps over" [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 18 - "{subject} {verb} {object}", [INFO] [stdout] 19 - object = "the lazy dog", [INFO] [stdout] 20 - subject = "the quick brown fox", [INFO] [stdout] 21 - verb = "jumps over" [INFO] [stdout] 18 + "the quick brown fox jumps over the lazy dog" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/chapters/c01.rs:40:47 [INFO] [stdout] | [INFO] [stdout] 40 | println!("My name is {0}, {1} {0}", "Bond", "James"); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - println!("My name is {0}, {1} {0}", "Bond", "James"); [INFO] [stdout] 40 + println!("My name is {0}, James {0}", "Bond"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/chapters/c01.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | let pi: f32 = 3.141562654; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] = note: `#[warn(clippy::excessive_precision)]` on by default [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 51 - let pi: f32 = 3.141562654; [INFO] [stdout] 51 + let pi: f32 = 3.141_562_7; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/chapters/c01.rs:211:12 [INFO] [stdout] | [INFO] [stdout] 211 | lat: 53.347778, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 211 - lat: 53.347778, [INFO] [stdout] 211 + lat: 53.347_78, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/chapters/c02.rs:60:36 [INFO] [stdout] | [INFO] [stdout] 60 | println!("true AND false is {}", true && false); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `false` [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: this boolean expression can be simplified [INFO] [stdout] --> src/chapters/c02.rs:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | println!("true OR false is {}", true || false); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `true` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/chapters/c02.rs:62:30 [INFO] [stdout] | [INFO] [stdout] 62 | println!("NOT true is {}", !true); [INFO] [stdout] | ^^^^^ help: try: `false` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/chapters/c03.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | return (top - bottom) * (right - left); [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] 128 - return (top - bottom) * (right - left); [INFO] [stdout] 128 + (top - bottom) * (right - left) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/chapters/c03.rs:362:16 [INFO] [stdout] | [INFO] [stdout] 362 | Nil => format!("Nil"), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Nil".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `c_liKe_enums` should have a snake case name [INFO] [stdout] --> src/chapters/c03.rs:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn c_liKe_enums() { [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `c_li_ke_enums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.27s [INFO] running `Command { std: "docker" "inspect" "b6203033e62d47e7cff504dce129ae1c6e01f469474dfef70f17c981d332c028", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b6203033e62d47e7cff504dce129ae1c6e01f469474dfef70f17c981d332c028", kill_on_drop: false }` [INFO] [stdout] b6203033e62d47e7cff504dce129ae1c6e01f469474dfef70f17c981d332c028