[INFO] cloning repository https://github.com/puppypepper/rust_in_action [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/puppypepper/rust_in_action" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpuppypepper%2Frust_in_action", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpuppypepper%2Frust_in_action'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9fb4aac8d6e05805660be10fb562fb109474ecaa [INFO] linting puppypepper/rust_in_action against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpuppypepper%2Frust_in_action" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/puppypepper/rust_in_action [INFO] finished tweaking git repo https://github.com/puppypepper/rust_in_action [INFO] tweaked toml for git repo https://github.com/puppypepper/rust_in_action written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/puppypepper/rust_in_action 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/puppypepper/rust_in_action 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] [stderr] Downloading crates ... [INFO] [stderr] Downloaded publicsuffix v1.5.6 [INFO] [stderr] Downloaded pistoncore-input v1.0.1 [INFO] [stderr] Downloaded pistoncore-window v0.47.1 [INFO] [stderr] Downloaded pistoncore-event_loop v0.52.0 [INFO] [stderr] Downloaded piston-float v1.0.1 [INFO] [stderr] Downloaded piston-viewport v1.0.2 [INFO] [stderr] Downloaded piston v0.52.1 [INFO] [stderr] Downloaded piston2d-gfx_graphics v0.72.0 [INFO] [stderr] Downloaded piston2d-graphics v0.39.0 [INFO] [stderr] Downloaded pistoncore-glutin_window v0.68.2 [INFO] [stderr] Downloaded piston_window v0.117.0 [INFO] [stderr] Downloaded piston-graphics_api_version v1.0.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 2e696bdc8c5a8c47f37509cdc0e95246fe18305a15fb30a66e8d7a9b17f76861 [INFO] running `Command { std: "docker" "start" "-a" "2e696bdc8c5a8c47f37509cdc0e95246fe18305a15fb30a66e8d7a9b17f76861", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2e696bdc8c5a8c47f37509cdc0e95246fe18305a15fb30a66e8d7a9b17f76861", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2e696bdc8c5a8c47f37509cdc0e95246fe18305a15fb30a66e8d7a9b17f76861", kill_on_drop: false }` [INFO] [stdout] 2e696bdc8c5a8c47f37509cdc0e95246fe18305a15fb30a66e8d7a9b17f76861 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 84bc58fb25185f84dc5eb6781cecefc3f13da29c7f609311cc3be4e6c588fdbe [INFO] running `Command { std: "docker" "start" "-a" "84bc58fb25185f84dc5eb6781cecefc3f13da29c7f609311cc3be4e6c588fdbe", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.162 [INFO] [stderr] Compiling xml-rs v0.8.25 [INFO] [stderr] Checking either v1.14.0 [INFO] [stderr] Checking smallvec v1.14.0 [INFO] [stderr] Compiling log v0.4.26 [INFO] [stderr] Compiling wayland-sys v0.28.6 [INFO] [stderr] Checking libloading v0.8.6 [INFO] [stderr] Checking ttf-parser v0.15.2 [INFO] [stderr] Checking piston-float v1.0.1 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Compiling syn v2.0.89 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Compiling miniz_oxide v0.4.4 [INFO] [stderr] Compiling parking_lot_core v0.8.6 [INFO] [stderr] Checking piston-viewport v1.0.2 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Checking piston-graphics_api_version v1.0.1 [INFO] [stderr] Checking futures v0.1.31 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking draw_state v0.8.0 [INFO] [stderr] Compiling num-rational v0.3.2 [INFO] [stderr] Checking xcursor v0.3.8 [INFO] [stderr] Checking xdg v2.5.2 [INFO] [stderr] Checking raw-window-handle v0.4.3 [INFO] [stderr] Checking deflate v0.8.6 [INFO] [stderr] Checking gfx_core v0.9.2 [INFO] [stderr] Compiling crossbeam-utils v0.7.2 [INFO] [stderr] Checking gif v0.11.4 [INFO] [stderr] Checking piston-texture v0.8.0 [INFO] [stderr] Checking scoped_threadpool v0.1.9 [INFO] [stderr] Compiling wayland-scanner v0.28.6 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Compiling gl_generator v0.13.1 [INFO] [stderr] Checking png v0.16.8 [INFO] [stderr] Checking shader_version v0.7.0 [INFO] [stderr] Checking vecmath v1.0.0 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking interpolation v0.2.0 [INFO] [stderr] Checking read_color v1.0.0 [INFO] [stderr] Checking piston-shaders_graphics2d v0.4.0 [INFO] [stderr] Checking regex-automata v0.4.8 [INFO] [stderr] Compiling glutin_egl_sys v0.1.6 [INFO] [stderr] Compiling glutin_glx_sys v0.1.8 [INFO] [stderr] Compiling gfx_gl v0.6.1 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Compiling autocfg v0.1.8 [INFO] [stderr] Checking rand_core v0.4.2 [INFO] [stderr] Checking tinyvec v1.9.0 [INFO] [stderr] Compiling parking_lot_core v0.6.3 [INFO] [stderr] Compiling memoffset v0.5.6 [INFO] [stderr] Compiling gl v0.13.0 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking iovec v0.1.4 [INFO] [stderr] Checking net2 v0.2.39 [INFO] [stderr] Checking nix v0.20.0 [INFO] [stderr] Checking nix v0.18.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking memmap2 v0.1.0 [INFO] [stderr] Checking mio v0.6.23 [INFO] [stderr] Checking raw-window-handle v0.3.4 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking shared_library v0.1.9 [INFO] [stderr] Checking mio-extras v2.0.6 [INFO] [stderr] Checking gfx v0.18.3 [INFO] [stderr] Checking bytes v0.4.12 [INFO] [stderr] Checking osmesa-sys v0.1.2 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking tokio-executor v0.1.10 [INFO] [stderr] Compiling openssl-sys v0.9.107 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Checking clap v2.34.0 [INFO] [stderr] Checking owned_ttf_parser v0.15.2 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Compiling crossbeam-epoch v0.8.2 [INFO] [stderr] Checking rusttype v0.9.3 [INFO] [stderr] Compiling wayland-client v0.28.6 [INFO] [stderr] Compiling wayland-protocols v0.28.6 [INFO] [stderr] Checking andrew v0.3.1 [INFO] [stderr] Checking piston2d-graphics v0.39.0 [INFO] [stderr] Checking tokio-io v0.1.13 [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Checking lock_api v0.3.4 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking tokio-sync v0.1.8 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Checking parking_lot v0.9.0 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking jpeg-decoder v0.1.22 [INFO] [stderr] Compiling object v0.36.7 [INFO] [stderr] Checking crossbeam-deque v0.7.4 [INFO] [stderr] Checking idna v0.1.5 [INFO] [stderr] Checking http v0.1.21 [INFO] [stderr] Checking tokio-reactor v0.1.12 [INFO] [stderr] Checking time v0.1.45 [INFO] [stderr] Checking tiff v0.6.1 [INFO] [stderr] Compiling rand_chacha v0.1.1 [INFO] [stderr] Compiling rand_pcg v0.1.2 [INFO] [stderr] Checking crossbeam-queue v0.2.3 [INFO] [stderr] Compiling openssl v0.10.72 [INFO] [stderr] Compiling failure_derive v0.1.8 [INFO] [stderr] Checking gimli v0.31.1 [INFO] [stderr] Checking url v1.7.2 [INFO] [stderr] Checking tokio-threadpool v0.1.18 [INFO] [stderr] Checking tokio-tcp v0.1.4 [INFO] [stderr] Checking image v0.23.14 [INFO] [stderr] Checking tokio-buf v0.1.1 [INFO] [stderr] Checking string v0.2.1 [INFO] [stderr] Checking gfx_device_gl v0.16.2 [INFO] [stderr] Checking tokio-current-thread v0.1.7 [INFO] [stderr] Checking tokio-timer v0.2.13 [INFO] [stderr] Compiling rand v0.6.5 [INFO] [stderr] Compiling hyper v0.12.36 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking want v0.2.0 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking rand_xorshift v0.1.1 [INFO] [stderr] Checking rand_isaac v0.1.1 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Checking rand_hc v0.1.0 [INFO] [stderr] Checking tokio v0.1.22 [INFO] [stderr] Checking idna v0.2.3 [INFO] [stderr] Checking futures-cpupool v0.1.8 [INFO] [stderr] Checking rand_os v0.1.3 [INFO] [stderr] Checking rand_jitter v0.1.4 [INFO] [stderr] Checking cookie v0.12.0 [INFO] [stderr] Checking wayland-commons v0.28.6 [INFO] [stderr] Checking try_from v0.3.2 [INFO] [stderr] Checking calloop v0.6.5 [INFO] [stderr] Checking dtoa v0.4.8 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Checking base64 v0.10.1 [INFO] [stderr] Checking grep-lite v0.1.0 (/opt/rustwide/workdir/grep-lite) [INFO] [stderr] Checking h2 v0.1.26 [INFO] [stderr] Checking http-body v0.1.0 [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> grep-lite/src/list2-26.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / match contains_substring { [INFO] [stdout] 25 | | Some(_) => println!("{}", line), [INFO] [stdout] 26 | | None => (), [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(_) = contains_substring { println!("{}", line) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> grep-lite/src/list2-26.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / match contains_substring { [INFO] [stdout] 25 | | Some(_) => println!("{}", line), [INFO] [stdout] 26 | | None => (), [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(_) = contains_substring { println!("{}", line) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> grep-lite/src/list2-30.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | / match re.find(&line) { [INFO] [stdout] 13 | | Some(_) => println!("{}", line), [INFO] [stdout] 14 | | None => (), [INFO] [stdout] 15 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(_) = re.find(&line) { println!("{}", line) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> grep-lite/src/list2-24.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / match contains_substring { [INFO] [stdout] 12 | | Some(_) => println!("{}", line), [INFO] [stdout] 13 | | None => (), [INFO] [stdout] 14 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(_) = contains_substring { println!("{}", line) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking rust_in_action v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> grep-lite/src/list2-24.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / match contains_substring { [INFO] [stdout] 12 | | Some(_) => println!("{}", line), [INFO] [stdout] 13 | | None => (), [INFO] [stdout] 14 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(_) = contains_substring { println!("{}", line) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> grep-lite/src/list2-30.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | / match re.find(&line) { [INFO] [stdout] 13 | | Some(_) => println!("{}", line), [INFO] [stdout] 14 | | None => (), [INFO] [stdout] 15 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(_) = re.find(&line) { println!("{}", line) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/list2-12.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return max_iters; [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] 42 - return max_iters; [INFO] [stdout] 42 + max_iters [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/list2-12.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return max_iters; [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] 42 - return max_iters; [INFO] [stdout] 42 + max_iters [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `array` [INFO] [stdout] --> src/list2-21.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | for i in 0..array.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 16 - for i in 0..array.len() { [INFO] [stdout] 16 + for in &array { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/list2-5.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | let b_ = b.try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u16` to `i32` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 5 - let b_ = b.try_into().unwrap(); [INFO] [stdout] 5 + let b_ = b.into(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a, 'b [INFO] [stdout] --> src/list2-14.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | fn add_with_lifetimes<'a, 'b>(a: &'a i32, b: &'b i32) -> i32 { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1 - fn add_with_lifetimes<'a, 'b>(a: &'a i32, b: &'b i32) -> i32 { [INFO] [stdout] 1 + fn add_with_lifetimes(a: &i32, b: &i32) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a, 'b [INFO] [stdout] --> src/list2-14.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | fn add_with_lifetimes<'a, 'b>(a: &'a i32, b: &'b i32) -> i32 { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1 - fn add_with_lifetimes<'a, 'b>(a: &'a i32, b: &'b i32) -> i32 { [INFO] [stdout] 1 + fn add_with_lifetimes(a: &i32, b: &i32) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/list2-5.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | let b_ = b.try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u16` to `i32` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 5 - let b_ = b.try_into().unwrap(); [INFO] [stdout] 5 + let b_ = b.into(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling synstructure v0.12.6 [INFO] [stderr] Checking uuid v0.7.4 [INFO] [stderr] Checking chapter-5 v0.1.0 (/opt/rustwide/workdir/chapter-5) [INFO] [stderr] Checking chapter-4 v0.1.0 (/opt/rustwide/workdir/chapter-4) [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/list5-22.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/list5-22.rs:13:17 [INFO] [stdout] | [INFO] [stdout] 13 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/list5-29.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/list5-29.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `cpu` is never read [INFO] [stdout] --> chapter-5/src/chip-8.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | cpu.registers[1] = 10; [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: methods `current_opcode`, `run`, and `add_xy` are never used [INFO] [stdout] --> chapter-5/src/chip-8.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 6 | impl CPU { [INFO] [stdout] | -------- methods in this implementation [INFO] [stdout] 7 | fn current_opcode(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 11 | fn run(&mut self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | fn add_xy(&mut self, x: u8, y: u8) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/chip-8.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/chip-8.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `array` [INFO] [stdout] --> src/list2-21.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | for i in 0..array.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 16 - for i in 0..array.len() { [INFO] [stdout] 16 + for in &array { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sat` [INFO] [stdout] --> chapter-4/src/list4-2.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | fn check_message(sat: &CubeSat) -> StatusMessage { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> chapter-4/src/list4-2.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct CubeSat { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 2 | id: i64, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sat_id` [INFO] [stdout] --> chapter-4/src/list4-1.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | fn check_message(sat_id: i64) -> StatusMessage { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_sat_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-6.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | let a: i32 = unsafe { std::mem::transmute(big_endian) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 5 - let a: i32 = unsafe { std::mem::transmute(big_endian) }; [INFO] [stdout] 5 + let a: i32 = unsafe { i32::from_ne_bytes(big_endian) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-6.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | let b: i32 = unsafe { std::mem::transmute(little_endian) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 6 - let b: i32 = unsafe { std::mem::transmute(little_endian) }; [INFO] [stdout] 6 + let b: i32 = unsafe { i32::from_ne_bytes(little_endian) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/list5-22.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/list5-22.rs:13:17 [INFO] [stdout] | [INFO] [stdout] 13 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `value` is never read [INFO] [stdout] --> chapter-4/src/list4-6.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | struct Demo { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 4 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sat` [INFO] [stdout] --> chapter-4/src/list4-2.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | fn check_message(sat: &CubeSat) -> StatusMessage { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> chapter-4/src/list4-2.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct CubeSat { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 2 | id: i64, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `cpu` is never read [INFO] [stdout] --> chapter-5/src/chip-8.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | cpu.registers[1] = 10; [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: methods `current_opcode`, `run`, and `add_xy` are never used [INFO] [stdout] --> chapter-5/src/chip-8.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 6 | impl CPU { [INFO] [stdout] | -------- methods in this implementation [INFO] [stdout] 7 | fn current_opcode(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 11 | fn run(&mut self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | fn add_xy(&mut self, x: u8, y: u8) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/chip-8.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/chip-8.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exponent` [INFO] [stdout] --> chapter-5/src/list5-8.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let exponent = _exponent - 127; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_exponent` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `value` is never read [INFO] [stdout] --> chapter-4/src/list4-6.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | struct Demo { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 4 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking addr2line v0.24.2 [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/list5-26.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/list5-26.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-2.rs:3:37 [INFO] [stdout] | [INFO] [stdout] 3 | let frankentype: u32 = unsafe { std::mem::transmute(a) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 3 - let frankentype: u32 = unsafe { std::mem::transmute(a) }; [INFO] [stdout] 3 + let frankentype: u32 = unsafe { f32::to_bits(a) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-2.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | let b: f32 = unsafe { std::mem::transmute(frankentype) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 8 - let b: f32 = unsafe { std::mem::transmute(frankentype) }; [INFO] [stdout] 8 + let b: f32 = unsafe { f32::from_bits(frankentype) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> chapter-5/src/list5-3.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | if i % 10000 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `i.is_multiple_of(10000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> chapter-5/src/list5-3.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | print!("\n") [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 12 - print!("\n") [INFO] [stdout] 12 + println!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> chapter-5/src/list5-5.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / #[allow(arithmetic_overflow)] [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | ------- the attribute applies to this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the attribute should apply to the crate use an inner attribute [INFO] [stdout] | [INFO] [stdout] 1 | #![allow(arithmetic_overflow)] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-6.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | let a: i32 = unsafe { std::mem::transmute(big_endian) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 5 - let a: i32 = unsafe { std::mem::transmute(big_endian) }; [INFO] [stdout] 5 + let a: i32 = unsafe { i32::from_ne_bytes(big_endian) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sat` [INFO] [stdout] --> chapter-4/src/list4-18.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | fn check_status(sat: CubeSat) -> StatusMessage { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-6.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | let b: i32 = unsafe { std::mem::transmute(little_endian) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 6 - let b: i32 = unsafe { std::mem::transmute(little_endian) }; [INFO] [stdout] 6 + let b: i32 = unsafe { i32::from_ne_bytes(little_endian) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> chapter-4/src/list4-18.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 2 | struct CubeSat { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 3 | id: u64, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `CubeSat` has a derived impl for the trait `Clone`, 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: unused variable: `sat_id` [INFO] [stdout] --> chapter-4/src/list4-1.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | fn check_message(sat_id: i64) -> StatusMessage { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_sat_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking wayland-cursor v0.28.6 [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> chapter-5/src/list5-3.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | if i % 10000 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `i.is_multiple_of(10000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking wayland-egl v0.28.6 [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> chapter-5/src/list5-3.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | print!("\n") [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 12 - print!("\n") [INFO] [stdout] 12 + println!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-2.rs:3:37 [INFO] [stdout] | [INFO] [stdout] 3 | let frankentype: u32 = unsafe { std::mem::transmute(a) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 3 - let frankentype: u32 = unsafe { std::mem::transmute(a) }; [INFO] [stdout] 3 + let frankentype: u32 = unsafe { f32::to_bits(a) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> chapter-5/src/list5-2.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | let b: f32 = unsafe { std::mem::transmute(frankentype) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 8 - let b: f32 = unsafe { std::mem::transmute(frankentype) }; [INFO] [stdout] 8 + let b: f32 = unsafe { f32::from_bits(frankentype) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/list5-26.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> chapter-5/src/list5-29.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/list5-29.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> chapter-5/src/list5-26.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | let d = ((opcode & 0x000F) >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((opcode & 0x000F))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sat` [INFO] [stdout] --> chapter-4/src/list4-18.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | fn check_status(sat: CubeSat) -> StatusMessage { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> chapter-4/src/list4-18.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 2 | struct CubeSat { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 3 | id: u64, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `CubeSat` has a derived impl for the trait `Clone`, 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: empty line after outer attribute [INFO] [stdout] --> chapter-5/src/list5-5.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / #[allow(arithmetic_overflow)] [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | ------- the attribute applies to this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the attribute should apply to the crate use an inner attribute [INFO] [stdout] | [INFO] [stdout] 1 | #![allow(arithmetic_overflow)] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exponent` [INFO] [stdout] --> chapter-5/src/list5-8.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let exponent = _exponent - 127; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_exponent` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling serde_derive v1.0.218 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking piston-gfx_texture v0.41.0 [INFO] [stderr] Checking piston2d-gfx_graphics v0.72.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking backtrace v0.3.74 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking failure v0.1.8 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking serde v1.0.218 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking chapter-3 v0.1.0 (/opt/rustwide/workdir/chapter-3) [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> chapter-3/src/list3-2.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let y = &x.data; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> chapter-3/src/list3-2.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let z = &(x.data); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> chapter-3/src/list3-2.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let v = x.data; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> chapter-3/src/list3-2.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let t = x.data2; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> chapter-3/src/list3-1.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / #[allow(unused_variables)] [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | type File = String; [INFO] [stdout] | --------- the attribute applies to this type alias [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the attribute should apply to the crate use an inner attribute [INFO] [stdout] | [INFO] [stdout] 1 | #![allow(unused_variables)] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-1.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | fn open(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-1.rs:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | fn close(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `save_to` [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:23 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_save_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read` is never used [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] 13 + fn read(f: &mut File, save_to: &mut [u8]) -> ! { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-13.rs:23:40 [INFO] [stdout] | [INFO] [stdout] 23 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 24 | let mut f = File::new(name); [INFO] [stdout] 25 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> chapter-3/src/list3-1.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / #[allow(unused_variables)] [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | type File = String; [INFO] [stdout] | --------- the attribute applies to this type alias [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the attribute should apply to the crate use an inner attribute [INFO] [stdout] | [INFO] [stdout] 1 | #![allow(unused_variables)] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-1.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | fn open(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-1.rs:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | fn close(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `save_to` [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:23 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_save_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read` is never used [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-1.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - fn read(f: &mut File, save_to: &mut Vec) -> ! { [INFO] [stdout] 13 + fn read(f: &mut File, save_to: &mut [u8]) -> ! { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-7.rs:8:28 [INFO] [stdout] | [INFO] [stdout] 8 | fn read(f: &File, save_to: &mut Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 8 - fn read(f: &File, save_to: &mut Vec) -> usize { [INFO] [stdout] 8 + fn read(f: &File, save_to: &mut [u8]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-16.rs:26:40 [INFO] [stdout] | [INFO] [stdout] 26 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 27 | let mut f = File::new(name); [INFO] [stdout] 28 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-8.rs:21:40 [INFO] [stdout] | [INFO] [stdout] 21 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 22 | let mut f = File::new(name); [INFO] [stdout] 23 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-13.rs:23:40 [INFO] [stdout] | [INFO] [stdout] 23 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 24 | let mut f = File::new(name); [INFO] [stdout] 25 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-5.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | fn open(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-5.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | fn close(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-5.rs:15:40 [INFO] [stdout] | [INFO] [stdout] 15 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 16 | let mut f = File::new(name); [INFO] [stdout] 17 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> chapter-3/src/list3-2.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let y = &x.data; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> chapter-3/src/list3-2.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let z = &(x.data); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> chapter-3/src/list3-2.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let v = x.data; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> chapter-3/src/list3-2.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let t = x.data2; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-16.rs:26:40 [INFO] [stdout] | [INFO] [stdout] 26 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 27 | let mut f = File::new(name); [INFO] [stdout] 28 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-8.rs:21:40 [INFO] [stdout] | [INFO] [stdout] 21 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 22 | let mut f = File::new(name); [INFO] [stdout] 23 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> chapter-3/src/list3-12.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | fn read(self: &Self, save_to: &mut Vec) -> Result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 5 - fn read(self: &Self, save_to: &mut Vec) -> Result; [INFO] [stdout] 5 + fn read(&self, save_to: &mut Vec) -> Result; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `save_to` [INFO] [stdout] --> chapter-3/src/list3-12.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | fn read(self: &File, save_to: &mut Vec) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_save_to` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> chapter-3/src/list3-12.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | fn read(self: &Self, save_to: &mut Vec) -> Result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 5 - fn read(self: &Self, save_to: &mut Vec) -> Result; [INFO] [stdout] 5 + fn read(&self, save_to: &mut Vec) -> Result; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `save_to` [INFO] [stdout] --> chapter-3/src/list3-12.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | fn read(self: &File, save_to: &mut Vec) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_save_to` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-11.rs:23:40 [INFO] [stdout] | [INFO] [stdout] 23 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 24 | let mut f = File::new(name); [INFO] [stdout] 25 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-7.rs:8:28 [INFO] [stdout] | [INFO] [stdout] 8 | fn read(f: &File, save_to: &mut Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 8 - fn read(f: &File, save_to: &mut Vec) -> usize { [INFO] [stdout] 8 + fn read(f: &File, save_to: &mut [u8]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-5.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | fn open(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-5.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | fn close(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-5.rs:15:40 [INFO] [stdout] | [INFO] [stdout] 15 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 16 | let mut f = File::new(name); [INFO] [stdout] 17 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-3.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | fn open(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-3.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | fn close(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> chapter-3/src/list3-11.rs:23:40 [INFO] [stdout] | [INFO] [stdout] 23 | fn new_with_data(name: &str, data: &Vec) -> File { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 ~ fn new_with_data(name: &str, data: &[u8]) -> File { [INFO] [stdout] 24 | let mut f = File::new(name); [INFO] [stdout] 25 ~ f.data = data.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-3.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | fn open(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> chapter-3/src/list3-3.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | fn close(f: &mut File) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking hyper-tls v0.3.2 [INFO] [stderr] Checking pistoncore-input v1.0.1 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking serde_urlencoded v0.5.5 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking publicsuffix v1.5.6 [INFO] [stderr] Checking pistoncore-window v0.47.1 [INFO] [stderr] Checking cookie_store v0.7.0 [INFO] [stderr] Checking pistoncore-event_loop v0.52.0 [INFO] [stderr] Checking piston v0.52.1 [INFO] [stderr] Checking reqwest v0.9.24 [INFO] [stderr] Checking chapter-8 v0.1.0 (/opt/rustwide/workdir/chapter-8) [INFO] [stderr] Checking smithay-client-toolkit v0.12.3 [INFO] [stderr] Checking winit v0.24.0 [INFO] [stderr] Checking glutin v0.26.0 [INFO] [stderr] Checking pistoncore-glutin_window v0.68.2 [INFO] [stderr] Checking piston_window v0.117.0 [INFO] [stderr] Checking chapter-6 v0.1.0 (/opt/rustwide/workdir/chapter-6) [INFO] [stdout] warning: unused variable: `width` [INFO] [stdout] --> chapter-6/src/list6-9.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | let (width, height) = (1280.0, 960.0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_width` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `height` [INFO] [stdout] --> chapter-6/src/list6-9.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | let (width, height) = (1280.0, 960.0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_height` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `width` [INFO] [stdout] --> chapter-6/src/list6-9.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | let (width, height) = (1280.0, 960.0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_width` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `height` [INFO] [stdout] --> chapter-6/src/list6-9.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | let (width, height) = (1280.0, 960.0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_height` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute from `*const i64` to `usize` which could be expressed as a pointer cast instead [INFO] [stdout] --> chapter-6/src/list6-5.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | let a_addr: usize = unsafe { std::mem::transmute(a_ptr) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a_ptr as usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmutes_expressible_as_ptr_casts [INFO] [stdout] = note: `#[warn(clippy::transmutes_expressible_as_ptr_casts)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute from `*const i64` to `usize` which could be expressed as a pointer cast instead [INFO] [stdout] --> chapter-6/src/list6-5.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | let a_addr: usize = unsafe { std::mem::transmute(a_ptr) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a_ptr as usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmutes_expressible_as_ptr_casts [INFO] [stdout] = note: `#[warn(clippy::transmutes_expressible_as_ptr_casts)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 18s [INFO] running `Command { std: "docker" "inspect" "84bc58fb25185f84dc5eb6781cecefc3f13da29c7f609311cc3be4e6c588fdbe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "84bc58fb25185f84dc5eb6781cecefc3f13da29c7f609311cc3be4e6c588fdbe", kill_on_drop: false }` [INFO] [stdout] 84bc58fb25185f84dc5eb6781cecefc3f13da29c7f609311cc3be4e6c588fdbe