[INFO] cloning repository https://github.com/sama-gharib/Runner [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/sama-gharib/Runner" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsama-gharib%2FRunner", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsama-gharib%2FRunner'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 15f5d1f67ecb4ebb50b8da2bcc8618b5a082cfe9 [INFO] linting sama-gharib/Runner against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsama-gharib%2FRunner" "/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/sama-gharib/Runner [INFO] finished tweaking git repo https://github.com/sama-gharib/Runner [INFO] tweaked toml for git repo https://github.com/sama-gharib/Runner written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/sama-gharib/Runner 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/sama-gharib/Runner 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] Downloading crates ... [INFO] [stderr] Downloaded macroquad_macro v0.1.8 [INFO] [stderr] Downloaded quad-rand v0.2.3 [INFO] [stderr] Downloaded quad-snd v0.2.8 [INFO] [stderr] Downloaded macroquad v0.4.13 [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] fe415d97889149c22314d7de779388a0e3586db23894ca9590defe13802e0c01 [INFO] running `Command { std: "docker" "start" "-a" "fe415d97889149c22314d7de779388a0e3586db23894ca9590defe13802e0c01", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fe415d97889149c22314d7de779388a0e3586db23894ca9590defe13802e0c01", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fe415d97889149c22314d7de779388a0e3586db23894ca9590defe13802e0c01", kill_on_drop: false }` [INFO] [stdout] fe415d97889149c22314d7de779388a0e3586db23894ca9590defe13802e0c01 [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] ff81a89a1f6fb43a4138838063318357f796a058bd624112b9e60bdf5c2217f2 [INFO] running `Command { std: "docker" "start" "-a" "ff81a89a1f6fb43a4138838063318357f796a058bd624112b9e60bdf5c2217f2", kill_on_drop: false }` [INFO] [stderr] Compiling quad-alsa-sys v0.3.2 [INFO] [stderr] Checking miniz_oxide v0.8.2 [INFO] [stderr] Checking ogg v0.7.1 [INFO] [stderr] Checking dasp_sample v0.11.0 [INFO] [stderr] Checking smallvec v0.6.14 [INFO] [stderr] Checking ahash v0.8.11 [INFO] [stderr] Compiling slotmap v1.0.7 [INFO] [stderr] Checking hound v3.5.1 [INFO] [stderr] Compiling miniquad v0.4.6 [INFO] [stderr] Compiling quad-snd v0.2.8 [INFO] [stderr] Checking lewton v0.9.4 [INFO] [stderr] Checking hashbrown v0.13.2 [INFO] [stderr] Checking ttf-parser v0.15.2 [INFO] [stderr] Checking bytemuck v1.21.0 [INFO] [stderr] Checking dasp_frame v0.11.0 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Checking quad-rand v0.2.3 [INFO] [stderr] Checking glam v0.27.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Compiling macroquad_macro v0.1.8 [INFO] [stderr] Checking audrey v0.3.0 [INFO] [stderr] Checking fontdue v0.7.3 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking macroquad v0.4.13 [INFO] [stderr] Checking Runner v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `macroquad::audio::*` [INFO] [stdout] --> src/application.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use macroquad::audio::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/game/object.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | /// .position(Vec2::new(100., 100.)) [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/game/object.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | /// .size(Vec2::new(50., 50.)) [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/game/object.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | /// .kind(ObjectKind::Wall); [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macroquad::audio::*` [INFO] [stdout] --> src/application.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use macroquad::audio::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/game/object.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | /// .position(Vec2::new(100., 100.)) [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/game/object.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | /// .size(Vec2::new(50., 50.)) [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/game/object.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | /// .kind(ObjectKind::Wall); [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `notif_cooldown` is never read [INFO] [stdout] --> src/application.rs:17:2 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct Application { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 17 | notif_cooldown: 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: field `0` is never read [INFO] [stdout] --> src/game/world/tokenizer.rs:9:16 [INFO] [stdout] | [INFO] [stdout] 9 | UnknownToken (String), [INFO] [stdout] | ------------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenizerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - UnknownToken (String), [INFO] [stdout] 9 + UnknownToken (()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/game/world/tokenizer.rs:11:15 [INFO] [stdout] | [INFO] [stdout] 11 | UnknownUnit (String) [INFO] [stdout] | ----------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenizerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - UnknownUnit (String) [INFO] [stdout] 11 + UnknownUnit (()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `unexpected` and `expected` are never read [INFO] [stdout] --> src/game/world/interpretor.rs:24:2 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct InterpretorError { [INFO] [stdout] | ---------------- fields in this struct [INFO] [stdout] 24 | unexpected: Token, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 25 | expected: Vec:: [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `InterpretorError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/game/resource_manager.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | UnknownExtension (String), [INFO] [stdout] | ---------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ResourceError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 34 - UnknownExtension (String), [INFO] [stdout] 34 + UnknownExtension (()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/game/resource_manager.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | LoadingError (String) [INFO] [stdout] | ------------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ResourceError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 35 - LoadingError (String) [INFO] [stdout] 35 + LoadingError (()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/widget.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | self.progress = self.progress.max(0.).min(1.); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `self.progress.clamp(0., 1.)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/ui.rs:177:3 [INFO] [stdout] | [INFO] [stdout] 177 | / if let Some(menu) = self.menus.get(self.current_menu) { [INFO] [stdout] 178 | | Some(menu.id()) [INFO] [stdout] 179 | | } else { [INFO] [stdout] 180 | | None [INFO] [stdout] 181 | | } [INFO] [stdout] | |_________^ help: try: `self.menus.get(self.current_menu).map(|menu| menu.id())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/ui.rs:187:3 [INFO] [stdout] | [INFO] [stdout] 187 | std::mem::replace(&mut self.requested_level, None) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.requested_level.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/ui.rs:191:3 [INFO] [stdout] | [INFO] [stdout] 191 | std::mem::replace(&mut self.requested_volume, None) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.requested_volume.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game/world/tokenizer.rs:163:7 [INFO] [stdout] | [INFO] [stdout] 163 | if level != 0 && c != ' ' || level == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 163 - if level != 0 && c != ' ' || level == 0 { [INFO] [stdout] 163 + if !(level != 0 && c == ' ') { [INFO] [stdout] | [INFO] [stdout] 163 - if level != 0 && c != ' ' || level == 0 { [INFO] [stdout] 163 + if level == 0 || c != ' ' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/game/world/tokenizer.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | .map(|x| x.split(" ")) [INFO] [stdout] | ______________^ [INFO] [stdout] 173 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.split(" "))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/game/world/tokenizer.rs:171:16 [INFO] [stdout] | [INFO] [stdout] 171 | .filter(|x| x.len() > 0 && &x[0..1] != "#") [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/game/world/tokenizer.rs:177:3 [INFO] [stdout] | [INFO] [stdout] 177 | / binding = binding [INFO] [stdout] 178 | | .into_iter() [INFO] [stdout] 179 | | .filter(|x| x.len() != 0) [INFO] [stdout] 180 | | .collect(); [INFO] [stdout] | |______________________^ help: consider calling `.retain()` instead: `binding.retain(|x| x.len() != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/game/world/tokenizer.rs:179:16 [INFO] [stdout] | [INFO] [stdout] 179 | .filter(|x| x.len() != 0) [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/game/world/interpretor.rs:32:44 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn interpret(tokens: Vec::) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `game::world::interpretor::InterpretorError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/game/world.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | File::open(&format!("res/levels/{}", arg.0)).unwrap().read_to_string(&mut s).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("res/levels/{}", arg.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/game/resource_manager.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/game/resource_manager.rs:23:14 [INFO] [stdout] | [INFO] [stdout] 23 | volume: volume.as_ref().borrow().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*volume.as_ref().borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/game/resource_manager.rs:64:6 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|x| x.to_uppercase().collect::>()) [INFO] [stdout] | __________________^ [INFO] [stdout] 65 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.to_uppercase().collect::>())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/game/animation.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | self.current_frame = self.current_frame % self.length; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.current_frame %= self.length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `notif_cooldown` is never read [INFO] [stdout] --> src/application.rs:17:2 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct Application { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 17 | notif_cooldown: 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: field `0` is never read [INFO] [stdout] --> src/game/world/tokenizer.rs:9:16 [INFO] [stdout] | [INFO] [stdout] 9 | UnknownToken (String), [INFO] [stdout] | ------------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenizerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - UnknownToken (String), [INFO] [stdout] 9 + UnknownToken (()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/game/world/tokenizer.rs:11:15 [INFO] [stdout] | [INFO] [stdout] 11 | UnknownUnit (String) [INFO] [stdout] | ----------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenizerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - UnknownUnit (String) [INFO] [stdout] 11 + UnknownUnit (()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `unexpected` and `expected` are never read [INFO] [stdout] --> src/game/world/interpretor.rs:24:2 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct InterpretorError { [INFO] [stdout] | ---------------- fields in this struct [INFO] [stdout] 24 | unexpected: Token, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 25 | expected: Vec:: [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `InterpretorError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/game/resource_manager.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | UnknownExtension (String), [INFO] [stdout] | ---------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ResourceError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 34 - UnknownExtension (String), [INFO] [stdout] 34 + UnknownExtension (()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/game/resource_manager.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | LoadingError (String) [INFO] [stdout] | ------------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ResourceError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 35 - LoadingError (String) [INFO] [stdout] 35 + LoadingError (()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game/object.rs:99:16 [INFO] [stdout] | [INFO] [stdout] 99 | stop_sound(&sound); [INFO] [stdout] | ^^^^^^ help: change this to: `sound` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/widget.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | self.progress = self.progress.max(0.).min(1.); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `self.progress.clamp(0., 1.)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/ui.rs:177:3 [INFO] [stdout] | [INFO] [stdout] 177 | / if let Some(menu) = self.menus.get(self.current_menu) { [INFO] [stdout] 178 | | Some(menu.id()) [INFO] [stdout] 179 | | } else { [INFO] [stdout] 180 | | None [INFO] [stdout] 181 | | } [INFO] [stdout] | |_________^ help: try: `self.menus.get(self.current_menu).map(|menu| menu.id())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/ui.rs:187:3 [INFO] [stdout] | [INFO] [stdout] 187 | std::mem::replace(&mut self.requested_level, None) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.requested_level.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/ui.rs:191:3 [INFO] [stdout] | [INFO] [stdout] 191 | std::mem::replace(&mut self.requested_volume, None) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.requested_volume.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game/world/tokenizer.rs:163:7 [INFO] [stdout] | [INFO] [stdout] 163 | if level != 0 && c != ' ' || level == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 163 - if level != 0 && c != ' ' || level == 0 { [INFO] [stdout] 163 + if !(level != 0 && c == ' ') { [INFO] [stdout] | [INFO] [stdout] 163 - if level != 0 && c != ' ' || level == 0 { [INFO] [stdout] 163 + if level == 0 || c != ' ' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/game/world/tokenizer.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | .map(|x| x.split(" ")) [INFO] [stdout] | ______________^ [INFO] [stdout] 173 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.split(" "))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/game/world/tokenizer.rs:171:16 [INFO] [stdout] | [INFO] [stdout] 171 | .filter(|x| x.len() > 0 && &x[0..1] != "#") [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/game/world/tokenizer.rs:177:3 [INFO] [stdout] | [INFO] [stdout] 177 | / binding = binding [INFO] [stdout] 178 | | .into_iter() [INFO] [stdout] 179 | | .filter(|x| x.len() != 0) [INFO] [stdout] 180 | | .collect(); [INFO] [stdout] | |______________________^ help: consider calling `.retain()` instead: `binding.retain(|x| x.len() != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/game/world/tokenizer.rs:179:16 [INFO] [stdout] | [INFO] [stdout] 179 | .filter(|x| x.len() != 0) [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/game/world/interpretor.rs:32:44 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn interpret(tokens: Vec::) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `game::world::interpretor::InterpretorError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/game/world.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | File::open(&format!("res/levels/{}", arg.0)).unwrap().read_to_string(&mut s).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("res/levels/{}", arg.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/game/resource_manager.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/game/resource_manager.rs:23:14 [INFO] [stdout] | [INFO] [stdout] 23 | volume: volume.as_ref().borrow().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*volume.as_ref().borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/game/resource_manager.rs:64:6 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|x| x.to_uppercase().collect::>()) [INFO] [stdout] | __________________^ [INFO] [stdout] 65 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.to_uppercase().collect::>())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/game/animation.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | self.current_frame = self.current_frame % self.length; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.current_frame %= self.length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game/object.rs:99:16 [INFO] [stdout] | [INFO] [stdout] 99 | stop_sound(&sound); [INFO] [stdout] | ^^^^^^ help: change this to: `sound` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.26s [INFO] running `Command { std: "docker" "inspect" "ff81a89a1f6fb43a4138838063318357f796a058bd624112b9e60bdf5c2217f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ff81a89a1f6fb43a4138838063318357f796a058bd624112b9e60bdf5c2217f2", kill_on_drop: false }` [INFO] [stdout] ff81a89a1f6fb43a4138838063318357f796a058bd624112b9e60bdf5c2217f2