[INFO] cloning repository https://github.com/DragonJT/vector_graphics [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/DragonJT/vector_graphics" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDragonJT%2Fvector_graphics", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDragonJT%2Fvector_graphics'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 51e179502c14a4a03d51ff1ba3cd0869a6f7cc97 [INFO] linting DragonJT/vector_graphics against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDragonJT%2Fvector_graphics" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/DragonJT/vector_graphics [INFO] finished tweaking git repo https://github.com/DragonJT/vector_graphics [INFO] tweaked toml for git repo https://github.com/DragonJT/vector_graphics written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/DragonJT/vector_graphics 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/DragonJT/vector_graphics 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 9af02b68fd284a4308785d5c84276fdbd17774667f99dca6b77ddef38b9c8c68 [INFO] running `Command { std: "docker" "start" "-a" "9af02b68fd284a4308785d5c84276fdbd17774667f99dca6b77ddef38b9c8c68", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9af02b68fd284a4308785d5c84276fdbd17774667f99dca6b77ddef38b9c8c68", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9af02b68fd284a4308785d5c84276fdbd17774667f99dca6b77ddef38b9c8c68", kill_on_drop: false }` [INFO] [stdout] 9af02b68fd284a4308785d5c84276fdbd17774667f99dca6b77ddef38b9c8c68 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 3c3b04efbfa7df5497699bd8e0854ab0987c4081a56192d3752acafe8af7381f [INFO] running `Command { std: "docker" "start" "-a" "3c3b04efbfa7df5497699bd8e0854ab0987c4081a56192d3752acafe8af7381f", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.79 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Compiling rustix v0.38.32 [INFO] [stderr] Checking linux-raw-sys v0.4.13 [INFO] [stderr] Compiling wayland-sys v0.31.1 [INFO] [stderr] Compiling cc v1.0.90 [INFO] [stderr] Compiling cfg_aliases v0.1.1 [INFO] [stderr] Compiling memchr v2.7.2 [INFO] [stderr] Compiling thiserror v1.0.58 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Checking zerocopy v0.7.32 [INFO] [stderr] Compiling num-traits v0.2.18 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Checking allocator-api2 v0.2.16 [INFO] [stderr] Compiling syn v2.0.58 [INFO] [stderr] Compiling quick-xml v0.31.0 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Compiling lock_api v0.4.11 [INFO] [stderr] Checking hashbrown v0.14.3 [INFO] [stderr] Compiling ash v0.37.3+1.3.251 [INFO] [stderr] Checking unicode-width v0.1.11 [INFO] [stderr] Compiling khronos-egl v6.0.0 [INFO] [stderr] Compiling wayland-backend v0.3.3 [INFO] [stderr] Checking codespan-reporting v0.11.1 [INFO] [stderr] Checking indexmap v2.2.6 [INFO] [stderr] Checking parking_lot_core v0.9.9 [INFO] [stderr] Compiling wgpu-hal v0.19.3 [INFO] [stderr] Checking gpu-alloc-types v0.3.0 [INFO] [stderr] Checking spirv v0.3.0+sdk-1.3.268.0 [INFO] [stderr] Checking gpu-descriptor-types v0.1.2 [INFO] [stderr] Checking libloading v0.7.4 [INFO] [stderr] Checking unicode-xid v0.2.4 [INFO] [stderr] Checking arrayref v0.3.7 [INFO] [stderr] Compiling smithay-client-toolkit v0.18.1 [INFO] [stderr] Compiling wayland-scanner v0.31.1 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Checking hexf-parse v0.2.1 [INFO] [stderr] Checking cursor-icon v1.1.0 [INFO] [stderr] Checking raw-window-handle v0.6.0 [INFO] [stderr] Checking xkeysym v0.2.0 [INFO] [stderr] Checking gpu-descriptor v0.2.4 [INFO] [stderr] Checking gpu-alloc v0.6.0 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Compiling wgpu-core v0.19.3 [INFO] [stderr] Checking memmap2 v0.9.4 [INFO] [stderr] Checking wgpu-types v0.19.2 [INFO] [stderr] Checking renderdoc-sys v1.1.0 [INFO] [stderr] Checking regex-syntax v0.8.3 [INFO] [stderr] Checking glow v0.13.1 [INFO] [stderr] Compiling serde v1.0.197 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.8 [INFO] [stderr] Checking owned_ttf_parser v0.20.0 [INFO] [stderr] Checking profiling v1.0.15 [INFO] [stderr] Checking ab_glyph v0.2.23 [INFO] [stderr] Compiling winit v0.29.15 [INFO] [stderr] Compiling wgpu v0.19.3 [INFO] [stderr] Compiling cgmath v0.18.0 [INFO] [stderr] Checking regex-automata v0.4.6 [INFO] [stderr] Checking x11rb-protocol v0.13.0 [INFO] [stderr] Compiling serde_json v1.0.115 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Checking approx v0.4.0 [INFO] [stderr] Checking is-terminal v0.4.12 [INFO] [stderr] Checking ryu v1.0.17 [INFO] [stderr] Checking smol_str v0.2.1 [INFO] [stderr] Checking polling v3.6.0 [INFO] [stderr] Compiling thiserror-impl v1.0.58 [INFO] [stderr] Compiling bytemuck_derive v1.6.0 [INFO] [stderr] Checking wayland-client v0.31.2 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling serde_derive v1.0.197 [INFO] [stderr] Checking calloop v0.12.4 [INFO] [stderr] Checking bytemuck v1.15.0 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking naga v0.19.2 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking wayland-protocols v0.31.2 [INFO] [stderr] Checking calloop-wayland-source v0.2.0 [INFO] [stderr] Checking wayland-cursor v0.31.1 [INFO] [stderr] Checking regex v1.10.4 [INFO] [stderr] Checking env_logger v0.10.2 [INFO] [stderr] Checking futures-executor v0.3.30 [INFO] [stderr] Checking futures v0.3.30 [INFO] [stderr] Checking wayland-protocols-wlr v0.2.0 [INFO] [stderr] Checking wayland-protocols-plasma v0.2.0 [INFO] [stderr] Checking sctk-adwaita v0.8.1 [INFO] [stderr] Checking x11rb v0.13.0 [INFO] [stderr] Checking vector_graphics v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vector_graphics.rs:341:25 [INFO] [stdout] | [INFO] [stdout] 341 | rect: rect, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vector_graphics.rs:341:25 [INFO] [stdout] | [INFO] [stdout] 341 | rect: rect, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/mesh.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Vertex { [INFO] [stdout] | ^^^^^^ field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check` is never used [INFO] [stdout] --> src/mesh.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | / #[repr(C)] [INFO] [stdout] 4 | | #[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)] [INFO] [stdout] 5 | | struct Vertex { [INFO] [stdout] 6 | | position: [f32; 2], [INFO] [stdout] 7 | | color: [f32; 3], [INFO] [stdout] 8 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ortho_camera.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | struct CameraUniform { [INFO] [stdout] | ^^^^^^^^^^^^^ field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check` is never used [INFO] [stdout] --> src/ortho_camera.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / #[repr(C)] [INFO] [stdout] 21 | | #[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] [INFO] [stdout] 22 | | struct CameraUniform { [INFO] [stdout] 23 | | view: [[f32; 4]; 4], [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/mesh.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Vertex { [INFO] [stdout] | ^^^^^^ field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check` is never used [INFO] [stdout] --> src/mesh.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | / #[repr(C)] [INFO] [stdout] 4 | | #[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)] [INFO] [stdout] 5 | | struct Vertex { [INFO] [stdout] 6 | | position: [f32; 2], [INFO] [stdout] 7 | | color: [f32; 3], [INFO] [stdout] 8 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ortho_camera.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | struct CameraUniform { [INFO] [stdout] | ^^^^^^^^^^^^^ field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check` is never used [INFO] [stdout] --> src/ortho_camera.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / #[repr(C)] [INFO] [stdout] 21 | | #[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] [INFO] [stdout] 22 | | struct CameraUniform { [INFO] [stdout] 23 | | view: [[f32; 4]; 4], [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/mesh.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn add_rect(&mut self, x:f32, y:f32, width:f32, height:f32, r:f32, g:f32, b:f32){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/mesh.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn add_rect(&mut self, x:f32, y:f32, width:f32, height:f32, r:f32, g:f32, b:f32){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/vector_graphics.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 190 | / for i in 0..self.objects.len(){ [INFO] [stdout] 191 | | if self.objects[i].rect.contains(point){ [INFO] [stdout] 192 | | return Some(i); [INFO] [stdout] ... | [INFO] [stdout] 195 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `(0..self.objects.len()).find(|&i| self.objects[i].rect.contains(point))` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/vector_graphics.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 190 | / for i in 0..self.objects.len(){ [INFO] [stdout] 191 | | if self.objects[i].rect.contains(point){ [INFO] [stdout] 192 | | return Some(i); [INFO] [stdout] ... | [INFO] [stdout] 195 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `(0..self.objects.len()).find(|&i| self.objects[i].rect.contains(point))` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/vector_graphics.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / return VectorGraphics { [INFO] [stdout] 200 | | objects:Vec::new(), [INFO] [stdout] 201 | | drag:Drag { dragging: false, x: 0.0, y: 0.0, x2: 0.0, y2: 0.0 }, [INFO] [stdout] 202 | | mouse_position:Vector2{x:0.0, y:0.0}, [INFO] [stdout] ... | [INFO] [stdout] 211 | | frame:0, [INFO] [stdout] 212 | | }; [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] 199 ~ VectorGraphics { [INFO] [stdout] 200 + objects:Vec::new(), [INFO] [stdout] 201 + drag:Drag { dragging: false, x: 0.0, y: 0.0, x2: 0.0, y2: 0.0 }, [INFO] [stdout] 202 + mouse_position:Vector2{x:0.0, y:0.0}, [INFO] [stdout] 203 + mode:Mode::Edit, [INFO] [stdout] 204 + speed:5.0, [INFO] [stdout] 205 + editor_speed:7.5, [INFO] [stdout] 206 + jump_force: 14.0, [INFO] [stdout] 207 + input:Input::new(), [INFO] [stdout] 208 + last_portal_in:0, [INFO] [stdout] 209 + cam:Vector2{x:0.0, y:0.0}, [INFO] [stdout] 210 + screen:Vector2{x:0.0, y:0.0}, [INFO] [stdout] 211 + frame:0, [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/vector_graphics.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / return VectorGraphics { [INFO] [stdout] 200 | | objects:Vec::new(), [INFO] [stdout] 201 | | drag:Drag { dragging: false, x: 0.0, y: 0.0, x2: 0.0, y2: 0.0 }, [INFO] [stdout] 202 | | mouse_position:Vector2{x:0.0, y:0.0}, [INFO] [stdout] ... | [INFO] [stdout] 211 | | frame:0, [INFO] [stdout] 212 | | }; [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] 199 ~ VectorGraphics { [INFO] [stdout] 200 + objects:Vec::new(), [INFO] [stdout] 201 + drag:Drag { dragging: false, x: 0.0, y: 0.0, x2: 0.0, y2: 0.0 }, [INFO] [stdout] 202 + mouse_position:Vector2{x:0.0, y:0.0}, [INFO] [stdout] 203 + mode:Mode::Edit, [INFO] [stdout] 204 + speed:5.0, [INFO] [stdout] 205 + editor_speed:7.5, [INFO] [stdout] 206 + jump_force: 14.0, [INFO] [stdout] 207 + input:Input::new(), [INFO] [stdout] 208 + last_portal_in:0, [INFO] [stdout] 209 + cam:Vector2{x:0.0, y:0.0}, [INFO] [stdout] 210 + screen:Vector2{x:0.0, y:0.0}, [INFO] [stdout] 211 + frame:0, [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/vector_graphics.rs:237:17 [INFO] [stdout] | [INFO] [stdout] 237 | / match key { [INFO] [stdout] 238 | | winit::keyboard::KeyCode::Escape=>{ [INFO] [stdout] 239 | | self.mode = Mode::Edit; [INFO] [stdout] ... | [INFO] [stdout] 242 | | } [INFO] [stdout] | |_________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 237 ~ if key == winit::keyboard::KeyCode::Escape { [INFO] [stdout] 238 + self.mode = Mode::Edit; [INFO] [stdout] 239 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/vector_graphics.rs:237:17 [INFO] [stdout] | [INFO] [stdout] 237 | / match key { [INFO] [stdout] 238 | | winit::keyboard::KeyCode::Escape=>{ [INFO] [stdout] 239 | | self.mode = Mode::Edit; [INFO] [stdout] ... | [INFO] [stdout] 242 | | } [INFO] [stdout] | |_________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 237 ~ if key == winit::keyboard::KeyCode::Escape { [INFO] [stdout] 238 + self.mode = Mode::Edit; [INFO] [stdout] 239 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/vector_graphics.rs:256:25 [INFO] [stdout] | [INFO] [stdout] 256 | / if !self.drag.dragging{ [INFO] [stdout] 257 | | let relative_mouse_position = self.get_relative_mouse_position(); [INFO] [stdout] 258 | | self.drag.x = relative_mouse_position.x; [INFO] [stdout] 259 | | self.drag.y = relative_mouse_position.y; [INFO] [stdout] ... | [INFO] [stdout] 262 | | self.drag.dragging = true; [INFO] [stdout] 263 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 255 ~ winit::keyboard::KeyCode::KeyR [INFO] [stdout] 256 ~ if !self.drag.dragging=> { [INFO] [stdout] 257 | let relative_mouse_position = self.get_relative_mouse_position(); [INFO] [stdout] ... [INFO] [stdout] 262 | self.drag.dragging = true; [INFO] [stdout] 263 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/vector_graphics.rs:256:25 [INFO] [stdout] | [INFO] [stdout] 256 | / if !self.drag.dragging{ [INFO] [stdout] 257 | | let relative_mouse_position = self.get_relative_mouse_position(); [INFO] [stdout] 258 | | self.drag.x = relative_mouse_position.x; [INFO] [stdout] 259 | | self.drag.y = relative_mouse_position.y; [INFO] [stdout] ... | [INFO] [stdout] 262 | | self.drag.dragging = true; [INFO] [stdout] 263 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 255 ~ winit::keyboard::KeyCode::KeyR [INFO] [stdout] 256 ~ if !self.drag.dragging=> { [INFO] [stdout] 257 | let relative_mouse_position = self.get_relative_mouse_position(); [INFO] [stdout] ... [INFO] [stdout] 262 | self.drag.dragging = true; [INFO] [stdout] 263 ~ } [INFO] [stdout] | [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] --> src/vector_graphics.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 248 | | Some(id) => { [INFO] [stdout] 249 | | self.objects[id].destroying = true; [INFO] [stdout] 250 | | self.objects[id].destroy_at_frame = self.frame; [INFO] [stdout] 251 | | } [INFO] [stdout] 252 | | _ => {} [INFO] [stdout] 253 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 247 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 248 + self.objects[id].destroying = true; [INFO] [stdout] 249 + self.objects[id].destroy_at_frame = self.frame; [INFO] [stdout] 250 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:266:25 [INFO] [stdout] | [INFO] [stdout] 266 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 267 | | Some(id) => { [INFO] [stdout] 268 | | self.objects[id].faction = FACTION_PLAYER; [INFO] [stdout] 269 | | self.objects[id].controller = Controller::Player; [INFO] [stdout] ... | [INFO] [stdout] 273 | | _ => {} [INFO] [stdout] 274 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 267 + self.objects[id].faction = FACTION_PLAYER; [INFO] [stdout] 268 + self.objects[id].controller = Controller::Player; [INFO] [stdout] 269 + self.objects[id].color = Color { r:1.0, g:0.5, b:0.0 }; [INFO] [stdout] 270 + self.objects[id].gravity = 0.3; [INFO] [stdout] 271 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:277:25 [INFO] [stdout] | [INFO] [stdout] 277 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 278 | | Some(id) => { [INFO] [stdout] 279 | | self.objects[id].faction = FACTION_ENEMY; [INFO] [stdout] 280 | | self.objects[id].controller = Controller::AI; [INFO] [stdout] ... | [INFO] [stdout] 287 | | _ => {} [INFO] [stdout] 288 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 277 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 278 + self.objects[id].faction = FACTION_ENEMY; [INFO] [stdout] 279 + self.objects[id].controller = Controller::AI; [INFO] [stdout] 280 + self.objects[id].color = Color { r:1.0, g:0.0, b:0.0 }; [INFO] [stdout] 281 + self.objects[id].gravity = 0.3; [INFO] [stdout] 282 + self.objects[id].direction = Vector2{ x:-1.0, y:0.0 }; [INFO] [stdout] 283 + self.objects[id].health = 20; [INFO] [stdout] 284 + self.objects[id].max_health = 20; [INFO] [stdout] 285 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:291:25 [INFO] [stdout] | [INFO] [stdout] 291 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 292 | | Some(id) => { [INFO] [stdout] 293 | | self.objects[id].color = Color{r:0.2, g:1.0, b:0.2}; [INFO] [stdout] 294 | | self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] ... | [INFO] [stdout] 297 | | _ => {} [INFO] [stdout] 298 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 291 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 292 + self.objects[id].color = Color{r:0.2, g:1.0, b:0.2}; [INFO] [stdout] 293 + self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] 294 + self.last_portal_in = id; [INFO] [stdout] 295 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 302 | | Some(id) => { [INFO] [stdout] 303 | | self.objects[id].color = Color{r:0.2, g:0.2, b:1.0}; [INFO] [stdout] 304 | | self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] ... | [INFO] [stdout] 308 | | _ => {} [INFO] [stdout] 309 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 301 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 302 + self.objects[id].color = Color{r:0.2, g:0.2, b:1.0}; [INFO] [stdout] 303 + self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] 304 + self.objects[self.last_portal_in].collision_type = CollisionType::PortalTo; [INFO] [stdout] 305 + self.objects[self.last_portal_in].target = id; [INFO] [stdout] 306 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 248 | | Some(id) => { [INFO] [stdout] 249 | | self.objects[id].destroying = true; [INFO] [stdout] 250 | | self.objects[id].destroy_at_frame = self.frame; [INFO] [stdout] 251 | | } [INFO] [stdout] 252 | | _ => {} [INFO] [stdout] 253 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 247 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 248 + self.objects[id].destroying = true; [INFO] [stdout] 249 + self.objects[id].destroy_at_frame = self.frame; [INFO] [stdout] 250 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:266:25 [INFO] [stdout] | [INFO] [stdout] 266 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 267 | | Some(id) => { [INFO] [stdout] 268 | | self.objects[id].faction = FACTION_PLAYER; [INFO] [stdout] 269 | | self.objects[id].controller = Controller::Player; [INFO] [stdout] ... | [INFO] [stdout] 273 | | _ => {} [INFO] [stdout] 274 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 267 + self.objects[id].faction = FACTION_PLAYER; [INFO] [stdout] 268 + self.objects[id].controller = Controller::Player; [INFO] [stdout] 269 + self.objects[id].color = Color { r:1.0, g:0.5, b:0.0 }; [INFO] [stdout] 270 + self.objects[id].gravity = 0.3; [INFO] [stdout] 271 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:277:25 [INFO] [stdout] | [INFO] [stdout] 277 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 278 | | Some(id) => { [INFO] [stdout] 279 | | self.objects[id].faction = FACTION_ENEMY; [INFO] [stdout] 280 | | self.objects[id].controller = Controller::AI; [INFO] [stdout] ... | [INFO] [stdout] 287 | | _ => {} [INFO] [stdout] 288 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 277 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 278 + self.objects[id].faction = FACTION_ENEMY; [INFO] [stdout] 279 + self.objects[id].controller = Controller::AI; [INFO] [stdout] 280 + self.objects[id].color = Color { r:1.0, g:0.0, b:0.0 }; [INFO] [stdout] 281 + self.objects[id].gravity = 0.3; [INFO] [stdout] 282 + self.objects[id].direction = Vector2{ x:-1.0, y:0.0 }; [INFO] [stdout] 283 + self.objects[id].health = 20; [INFO] [stdout] 284 + self.objects[id].max_health = 20; [INFO] [stdout] 285 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:291:25 [INFO] [stdout] | [INFO] [stdout] 291 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 292 | | Some(id) => { [INFO] [stdout] 293 | | self.objects[id].color = Color{r:0.2, g:1.0, b:0.2}; [INFO] [stdout] 294 | | self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] ... | [INFO] [stdout] 297 | | _ => {} [INFO] [stdout] 298 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 291 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 292 + self.objects[id].color = Color{r:0.2, g:1.0, b:0.2}; [INFO] [stdout] 293 + self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] 294 + self.last_portal_in = id; [INFO] [stdout] 295 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | / match self.find_object_at_point(self.get_relative_mouse_position()){ [INFO] [stdout] 302 | | Some(id) => { [INFO] [stdout] 303 | | self.objects[id].color = Color{r:0.2, g:0.2, b:1.0}; [INFO] [stdout] 304 | | self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] ... | [INFO] [stdout] 308 | | _ => {} [INFO] [stdout] 309 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 301 ~ if let Some(id) = self.find_object_at_point(self.get_relative_mouse_position()) { [INFO] [stdout] 302 + self.objects[id].color = Color{r:0.2, g:0.2, b:1.0}; [INFO] [stdout] 303 + self.objects[id].collision_type = CollisionType::None; [INFO] [stdout] 304 + self.objects[self.last_portal_in].collision_type = CollisionType::PortalTo; [INFO] [stdout] 305 + self.objects[self.last_portal_in].target = id; [INFO] [stdout] 306 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/vector_graphics.rs:330:17 [INFO] [stdout] | [INFO] [stdout] 330 | / if self.drag.dragging{ [INFO] [stdout] 331 | | self.drag.dragging = false; [INFO] [stdout] 332 | | let abs_rect = Self::abs_rect(self.drag.x, self.drag.y, self.drag.x2 - self.drag.x, self.drag.y2 - self.drag.y); [INFO] [stdout] 333 | | let rect = Rect { [INFO] [stdout] ... | [INFO] [stdout] 356 | | }); [INFO] [stdout] 357 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 329 ~ winit::keyboard::KeyCode::KeyR [INFO] [stdout] 330 ~ if self.drag.dragging=> { [INFO] [stdout] 331 | self.drag.dragging = false; [INFO] [stdout] ... [INFO] [stdout] 356 | }); [INFO] [stdout] 357 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/vector_graphics.rs:330:17 [INFO] [stdout] | [INFO] [stdout] 330 | / if self.drag.dragging{ [INFO] [stdout] 331 | | self.drag.dragging = false; [INFO] [stdout] 332 | | let abs_rect = Self::abs_rect(self.drag.x, self.drag.y, self.drag.x2 - self.drag.x, self.drag.y2 - self.drag.y); [INFO] [stdout] 333 | | let rect = Rect { [INFO] [stdout] ... | [INFO] [stdout] 356 | | }); [INFO] [stdout] 357 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 329 ~ winit::keyboard::KeyCode::KeyR [INFO] [stdout] 330 ~ if self.drag.dragging=> { [INFO] [stdout] 331 | self.drag.dragging = false; [INFO] [stdout] ... [INFO] [stdout] 356 | }); [INFO] [stdout] 357 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/vector_graphics.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | / match key{ [INFO] [stdout] 329 | | winit::keyboard::KeyCode::KeyR=>{ [INFO] [stdout] 330 | | if self.drag.dragging{ [INFO] [stdout] 331 | | self.drag.dragging = false; [INFO] [stdout] ... | [INFO] [stdout] 359 | | _=>{} [INFO] [stdout] 360 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 328 ~ if key == winit::keyboard::KeyCode::KeyR { [INFO] [stdout] 329 + if self.drag.dragging{ [INFO] [stdout] 330 + self.drag.dragging = false; [INFO] [stdout] 331 + let abs_rect = Self::abs_rect(self.drag.x, self.drag.y, self.drag.x2 - self.drag.x, self.drag.y2 - self.drag.y); [INFO] [stdout] 332 + let rect = Rect { [INFO] [stdout] 333 + x: abs_rect.0, [INFO] [stdout] 334 + y: abs_rect.1, [INFO] [stdout] 335 + width: abs_rect.2, [INFO] [stdout] 336 + height: abs_rect.3, [INFO] [stdout] 337 + }; [INFO] [stdout] 338 + self.objects.push(Object { [INFO] [stdout] 339 + controller: Controller::None, [INFO] [stdout] 340 + rect: rect, [INFO] [stdout] 341 + color: Color { r: 0.025, g: 0.025, b: 0.025 }, [INFO] [stdout] 342 + gravity: 0.0, [INFO] [stdout] 343 + velocity: Vector2 { x: 0.0, y: 0.0 }, [INFO] [stdout] 344 + direction: Vector2 { x: 0.0, y: 0.0 }, [INFO] [stdout] 345 + collision_type: CollisionType::Bounce, [INFO] [stdout] 346 + destroying: false, [INFO] [stdout] 347 + destroy_at_frame: 0, [INFO] [stdout] 348 + enable_firing_at_frame: 0, [INFO] [stdout] 349 + target:0, [INFO] [stdout] 350 + faction:FACTION_PLAYER, [INFO] [stdout] 351 + health:0, [INFO] [stdout] 352 + max_health:0, [INFO] [stdout] 353 + damage:0, [INFO] [stdout] 354 + disable_damage_bar_at_frame:0, [INFO] [stdout] 355 + }); [INFO] [stdout] 356 + } [INFO] [stdout] 357 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/vector_graphics.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | / match key{ [INFO] [stdout] 329 | | winit::keyboard::KeyCode::KeyR=>{ [INFO] [stdout] 330 | | if self.drag.dragging{ [INFO] [stdout] 331 | | self.drag.dragging = false; [INFO] [stdout] ... | [INFO] [stdout] 359 | | _=>{} [INFO] [stdout] 360 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 328 ~ if key == winit::keyboard::KeyCode::KeyR { [INFO] [stdout] 329 + if self.drag.dragging{ [INFO] [stdout] 330 + self.drag.dragging = false; [INFO] [stdout] 331 + let abs_rect = Self::abs_rect(self.drag.x, self.drag.y, self.drag.x2 - self.drag.x, self.drag.y2 - self.drag.y); [INFO] [stdout] 332 + let rect = Rect { [INFO] [stdout] 333 + x: abs_rect.0, [INFO] [stdout] 334 + y: abs_rect.1, [INFO] [stdout] 335 + width: abs_rect.2, [INFO] [stdout] 336 + height: abs_rect.3, [INFO] [stdout] 337 + }; [INFO] [stdout] 338 + self.objects.push(Object { [INFO] [stdout] 339 + controller: Controller::None, [INFO] [stdout] 340 + rect: rect, [INFO] [stdout] 341 + color: Color { r: 0.025, g: 0.025, b: 0.025 }, [INFO] [stdout] 342 + gravity: 0.0, [INFO] [stdout] 343 + velocity: Vector2 { x: 0.0, y: 0.0 }, [INFO] [stdout] 344 + direction: Vector2 { x: 0.0, y: 0.0 }, [INFO] [stdout] 345 + collision_type: CollisionType::Bounce, [INFO] [stdout] 346 + destroying: false, [INFO] [stdout] 347 + destroy_at_frame: 0, [INFO] [stdout] 348 + enable_firing_at_frame: 0, [INFO] [stdout] 349 + target:0, [INFO] [stdout] 350 + faction:FACTION_PLAYER, [INFO] [stdout] 351 + health:0, [INFO] [stdout] 352 + max_health:0, [INFO] [stdout] 353 + damage:0, [INFO] [stdout] 354 + disable_damage_bar_at_frame:0, [INFO] [stdout] 355 + }); [INFO] [stdout] 356 + } [INFO] [stdout] 357 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:398:13 [INFO] [stdout] | [INFO] [stdout] 398 | / match self.objects[other_id].collision_type { [INFO] [stdout] 399 | | CollisionType::Bounce => { [INFO] [stdout] 400 | | self.objects[id].rect.x = old_x; [INFO] [stdout] 401 | | self.objects[id].rect.y = old_y; [INFO] [stdout] ... | [INFO] [stdout] 404 | | _ => {} [INFO] [stdout] 405 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 398 ~ if let CollisionType::Bounce = self.objects[other_id].collision_type { [INFO] [stdout] 399 + self.objects[id].rect.x = old_x; [INFO] [stdout] 400 + self.objects[id].rect.y = old_y; [INFO] [stdout] 401 + return false; [INFO] [stdout] 402 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:398:13 [INFO] [stdout] | [INFO] [stdout] 398 | / match self.objects[other_id].collision_type { [INFO] [stdout] 399 | | CollisionType::Bounce => { [INFO] [stdout] 400 | | self.objects[id].rect.x = old_x; [INFO] [stdout] 401 | | self.objects[id].rect.y = old_y; [INFO] [stdout] ... | [INFO] [stdout] 404 | | _ => {} [INFO] [stdout] 405 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 398 ~ if let CollisionType::Bounce = self.objects[other_id].collision_type { [INFO] [stdout] 399 + self.objects[id].rect.x = old_x; [INFO] [stdout] 400 + self.objects[id].rect.y = old_y; [INFO] [stdout] 401 + return false; [INFO] [stdout] 402 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/vector_graphics.rs:472:29 [INFO] [stdout] | [INFO] [stdout] 472 | / ... if self.input.is_pressed(&winit::keyboard::KeyCode::KeyW){ [INFO] [stdout] 473 | | ... if grounded { [INFO] [stdout] 474 | | ... self.objects[i].velocity.y -= self.jump_force; [INFO] [stdout] 475 | | ... } [INFO] [stdout] 476 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 472 ~ if self.input.is_pressed(&winit::keyboard::KeyCode::KeyW) [INFO] [stdout] 473 ~ && grounded { [INFO] [stdout] 474 | self.objects[i].velocity.y -= self.jump_force; [INFO] [stdout] 475 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/vector_graphics.rs:472:29 [INFO] [stdout] | [INFO] [stdout] 472 | / ... if self.input.is_pressed(&winit::keyboard::KeyCode::KeyW){ [INFO] [stdout] 473 | | ... if grounded { [INFO] [stdout] 474 | | ... self.objects[i].velocity.y -= self.jump_force; [INFO] [stdout] 475 | | ... } [INFO] [stdout] 476 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 472 ~ if self.input.is_pressed(&winit::keyboard::KeyCode::KeyW) [INFO] [stdout] 473 ~ && grounded { [INFO] [stdout] 474 | self.objects[i].velocity.y -= self.jump_force; [INFO] [stdout] 475 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/vector_graphics.rs:486:29 [INFO] [stdout] | [INFO] [stdout] 486 | / ... if self.input.is_pressed(&winit::keyboard::KeyCode::Space) { [INFO] [stdout] 487 | | ... if self.objects[i].enable_firing_at_frame <= self.frame{ [INFO] [stdout] 488 | | ... self.objects[i].enable_firing_at_frame = self.frame+30; [INFO] [stdout] 489 | | ... let center = self.objects[i].rect.center(); [INFO] [stdout] ... | [INFO] [stdout] 512 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 486 ~ if self.input.is_pressed(&winit::keyboard::KeyCode::Space) [INFO] [stdout] 487 ~ && self.objects[i].enable_firing_at_frame <= self.frame{ [INFO] [stdout] 488 | self.objects[i].enable_firing_at_frame = self.frame+30; [INFO] [stdout] ... [INFO] [stdout] 510 | }); [INFO] [stdout] 511 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/vector_graphics.rs:486:29 [INFO] [stdout] | [INFO] [stdout] 486 | / ... if self.input.is_pressed(&winit::keyboard::KeyCode::Space) { [INFO] [stdout] 487 | | ... if self.objects[i].enable_firing_at_frame <= self.frame{ [INFO] [stdout] 488 | | ... self.objects[i].enable_firing_at_frame = self.frame+30; [INFO] [stdout] 489 | | ... let center = self.objects[i].rect.center(); [INFO] [stdout] ... | [INFO] [stdout] 512 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 486 ~ if self.input.is_pressed(&winit::keyboard::KeyCode::Space) [INFO] [stdout] 487 ~ && self.objects[i].enable_firing_at_frame <= self.frame{ [INFO] [stdout] 488 | self.objects[i].enable_firing_at_frame = self.frame+30; [INFO] [stdout] ... [INFO] [stdout] 510 | }); [INFO] [stdout] 511 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Rect` which implements the `Copy` trait [INFO] [stdout] --> src/vector_graphics.rs:495:47 [INFO] [stdout] | [INFO] [stdout] 495 | ... rect: self.objects[i].rect.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.objects[i].rect` [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: using `clone` on type `Rect` which implements the `Copy` trait [INFO] [stdout] --> src/vector_graphics.rs:495:47 [INFO] [stdout] | [INFO] [stdout] 495 | ... rect: self.objects[i].rect.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.objects[i].rect` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/vector_graphics.rs:528:25 [INFO] [stdout] | [INFO] [stdout] 528 | / ... match self.objects[i].controller{ [INFO] [stdout] 529 | | ... Controller::FollowTarget => { [INFO] [stdout] 530 | | ... let new_center = self.objects[self.objects[i].target].rect.center(); [INFO] [stdout] 531 | | ... self.objects[i].rect.x = new_center.x - self.objects[i].rect.width / 2.0 + self.objects[i].direction.x; [INFO] [stdout] ... | [INFO] [stdout] 534 | | ... _ => {} [INFO] [stdout] 535 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 528 ~ if let Controller::FollowTarget = self.objects[i].controller { [INFO] [stdout] 529 + let new_center = self.objects[self.objects[i].target].rect.center(); [INFO] [stdout] 530 + self.objects[i].rect.x = new_center.x - self.objects[i].rect.width / 2.0 + self.objects[i].direction.x; [INFO] [stdout] 531 + self.objects[i].rect.y = new_center.y - self.objects[i].rect.height / 2.0 + self.objects[i].direction.y; [INFO] [stdout] 532 + } [INFO] [stdout] | [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] --> src/vector_graphics.rs:528:25 [INFO] [stdout] | [INFO] [stdout] 528 | / ... match self.objects[i].controller{ [INFO] [stdout] 529 | | ... Controller::FollowTarget => { [INFO] [stdout] 530 | | ... let new_center = self.objects[self.objects[i].target].rect.center(); [INFO] [stdout] 531 | | ... self.objects[i].rect.x = new_center.x - self.objects[i].rect.width / 2.0 + self.objects[i].direction.x; [INFO] [stdout] ... | [INFO] [stdout] 534 | | ... _ => {} [INFO] [stdout] 535 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 528 ~ if let Controller::FollowTarget = self.objects[i].controller { [INFO] [stdout] 529 + let new_center = self.objects[self.objects[i].target].rect.center(); [INFO] [stdout] 530 + self.objects[i].rect.x = new_center.x - self.objects[i].rect.width / 2.0 + self.objects[i].direction.x; [INFO] [stdout] 531 + self.objects[i].rect.y = new_center.y - self.objects[i].rect.height / 2.0 + self.objects[i].direction.y; [INFO] [stdout] 532 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/main.rs:41:26 [INFO] [stdout] | [INFO] [stdout] 41 | let surface_format = surface_caps.formats.iter() [INFO] [stdout] | __________________________^ [INFO] [stdout] 42 | | .copied() [INFO] [stdout] 43 | | .filter(|f| f.is_srgb()) [INFO] [stdout] 44 | | .next() [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ let surface_format = surface_caps.formats.iter() [INFO] [stdout] 42 + .copied().find(|f| f.is_srgb()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/main.rs:41:26 [INFO] [stdout] | [INFO] [stdout] 41 | let surface_format = surface_caps.formats.iter() [INFO] [stdout] | __________________________^ [INFO] [stdout] 42 | | .copied() [INFO] [stdout] 43 | | .filter(|f| f.is_srgb()) [INFO] [stdout] 44 | | .next() [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ let surface_format = surface_caps.formats.iter() [INFO] [stdout] 42 + .copied().find(|f| f.is_srgb()) [INFO] [stdout] | [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] --> src/main.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | / match event { [INFO] [stdout] 62 | | winit::event::Event::WindowEvent { window_id:_window_id, event } => { [INFO] [stdout] 63 | | match event { [INFO] [stdout] 64 | | winit::event::WindowEvent::CursorMoved { device_id:_device_id, position } => { [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => {} [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 ~ if let winit::event::Event::WindowEvent { window_id:_window_id, event } = event { [INFO] [stdout] 62 + match event { [INFO] [stdout] 63 + winit::event::WindowEvent::CursorMoved { device_id:_device_id, position } => { [INFO] [stdout] 64 + vector_graphics.mousemove(vector_graphics::Vector2 { x: position.x as f32, y: position.y as f32 }); [INFO] [stdout] 65 + } [INFO] [stdout] 66 + winit::event::WindowEvent::KeyboardInput { device_id:_device_id, event, is_synthetic:_is_synthetic } =>{ [INFO] [stdout] 67 + match event.physical_key{ [INFO] [stdout] 68 + winit::keyboard::PhysicalKey::Code(code) => { [INFO] [stdout] 69 + match event.state{ [INFO] [stdout] 70 + winit::event::ElementState::Pressed => vector_graphics.keydown(code), [INFO] [stdout] 71 + winit::event::ElementState::Released => vector_graphics.keyup(code), [INFO] [stdout] 72 + }; [INFO] [stdout] 73 + } [INFO] [stdout] 74 + _=>{}, [INFO] [stdout] 75 + } [INFO] [stdout] 76 + } [INFO] [stdout] 77 + winit::event::WindowEvent::RedrawRequested => { [INFO] [stdout] 78 + vector_graphics.update(&mut render_pipeline.mesh, &queue); [INFO] [stdout] 79 + render_pipeline.render(&surface, &device, &queue); [INFO] [stdout] 80 + window.request_redraw(); [INFO] [stdout] 81 + } [INFO] [stdout] 82 + winit::event::WindowEvent::Resized(new_size) =>{ [INFO] [stdout] 83 + config.width = new_size.width; [INFO] [stdout] 84 + config.height = new_size.height; [INFO] [stdout] 85 + surface.configure(&device, &config); [INFO] [stdout] 86 + vector_graphics.resize(new_size.width as f32, new_size.height as f32); [INFO] [stdout] 87 + render_pipeline.resize(&queue, new_size.width as f32, new_size.height as f32); [INFO] [stdout] 88 + } [INFO] [stdout] 89 + winit::event::WindowEvent::CloseRequested => { [INFO] [stdout] 90 + target.exit(); [INFO] [stdout] 91 + } [INFO] [stdout] 92 + _=>{} [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [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] --> src/main.rs:68:25 [INFO] [stdout] | [INFO] [stdout] 68 | / match event.physical_key{ [INFO] [stdout] 69 | | winit::keyboard::PhysicalKey::Code(code) => { [INFO] [stdout] 70 | | match event.state{ [INFO] [stdout] 71 | | winit::event::ElementState::Pressed => vector_graphics.keydown(code), [INFO] [stdout] ... | [INFO] [stdout] 75 | | _=>{}, [INFO] [stdout] 76 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 68 ~ if let winit::keyboard::PhysicalKey::Code(code) = event.physical_key { [INFO] [stdout] 69 + match event.state{ [INFO] [stdout] 70 + winit::event::ElementState::Pressed => vector_graphics.keydown(code), [INFO] [stdout] 71 + winit::event::ElementState::Released => vector_graphics.keyup(code), [INFO] [stdout] 72 + }; [INFO] [stdout] 73 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/mesh.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn get_vertex_buffer_layout(&self)->wgpu::VertexBufferLayout{ [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 62 | pub fn get_vertex_buffer_layout(&self)->wgpu::VertexBufferLayout<'_>{ [INFO] [stdout] | ++++ [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] --> src/main.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | / match event { [INFO] [stdout] 62 | | winit::event::Event::WindowEvent { window_id:_window_id, event } => { [INFO] [stdout] 63 | | match event { [INFO] [stdout] 64 | | winit::event::WindowEvent::CursorMoved { device_id:_device_id, position } => { [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => {} [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 ~ if let winit::event::Event::WindowEvent { window_id:_window_id, event } = event { [INFO] [stdout] 62 + match event { [INFO] [stdout] 63 + winit::event::WindowEvent::CursorMoved { device_id:_device_id, position } => { [INFO] [stdout] 64 + vector_graphics.mousemove(vector_graphics::Vector2 { x: position.x as f32, y: position.y as f32 }); [INFO] [stdout] 65 + } [INFO] [stdout] 66 + winit::event::WindowEvent::KeyboardInput { device_id:_device_id, event, is_synthetic:_is_synthetic } =>{ [INFO] [stdout] 67 + match event.physical_key{ [INFO] [stdout] 68 + winit::keyboard::PhysicalKey::Code(code) => { [INFO] [stdout] 69 + match event.state{ [INFO] [stdout] 70 + winit::event::ElementState::Pressed => vector_graphics.keydown(code), [INFO] [stdout] 71 + winit::event::ElementState::Released => vector_graphics.keyup(code), [INFO] [stdout] 72 + }; [INFO] [stdout] 73 + } [INFO] [stdout] 74 + _=>{}, [INFO] [stdout] 75 + } [INFO] [stdout] 76 + } [INFO] [stdout] 77 + winit::event::WindowEvent::RedrawRequested => { [INFO] [stdout] 78 + vector_graphics.update(&mut render_pipeline.mesh, &queue); [INFO] [stdout] 79 + render_pipeline.render(&surface, &device, &queue); [INFO] [stdout] 80 + window.request_redraw(); [INFO] [stdout] 81 + } [INFO] [stdout] 82 + winit::event::WindowEvent::Resized(new_size) =>{ [INFO] [stdout] 83 + config.width = new_size.width; [INFO] [stdout] 84 + config.height = new_size.height; [INFO] [stdout] 85 + surface.configure(&device, &config); [INFO] [stdout] 86 + vector_graphics.resize(new_size.width as f32, new_size.height as f32); [INFO] [stdout] 87 + render_pipeline.resize(&queue, new_size.width as f32, new_size.height as f32); [INFO] [stdout] 88 + } [INFO] [stdout] 89 + winit::event::WindowEvent::CloseRequested => { [INFO] [stdout] 90 + target.exit(); [INFO] [stdout] 91 + } [INFO] [stdout] 92 + _=>{} [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [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] --> src/main.rs:68:25 [INFO] [stdout] | [INFO] [stdout] 68 | / match event.physical_key{ [INFO] [stdout] 69 | | winit::keyboard::PhysicalKey::Code(code) => { [INFO] [stdout] 70 | | match event.state{ [INFO] [stdout] 71 | | winit::event::ElementState::Pressed => vector_graphics.keydown(code), [INFO] [stdout] ... | [INFO] [stdout] 75 | | _=>{}, [INFO] [stdout] 76 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 68 ~ if let winit::keyboard::PhysicalKey::Code(code) = event.physical_key { [INFO] [stdout] 69 + match event.state{ [INFO] [stdout] 70 + winit::event::ElementState::Pressed => vector_graphics.keydown(code), [INFO] [stdout] 71 + winit::event::ElementState::Released => vector_graphics.keyup(code), [INFO] [stdout] 72 + }; [INFO] [stdout] 73 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/mesh.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn get_vertex_buffer_layout(&self)->wgpu::VertexBufferLayout{ [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 62 | pub fn get_vertex_buffer_layout(&self)->wgpu::VertexBufferLayout<'_>{ [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 53s [INFO] running `Command { std: "docker" "inspect" "3c3b04efbfa7df5497699bd8e0854ab0987c4081a56192d3752acafe8af7381f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3c3b04efbfa7df5497699bd8e0854ab0987c4081a56192d3752acafe8af7381f", kill_on_drop: false }` [INFO] [stdout] 3c3b04efbfa7df5497699bd8e0854ab0987c4081a56192d3752acafe8af7381f