[INFO] fetching crate makepad-platform 1.0.0... [INFO] linting makepad-platform-1.0.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate makepad-platform 1.0.0 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate makepad-platform 1.0.0 [INFO] finished tweaking crates.io crate makepad-platform 1.0.0 [INFO] tweaked toml for crates.io crate makepad-platform 1.0.0 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate makepad-platform 1.0.0 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 crates.io crate makepad-platform 1.0.0 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded windows-result v0.1.2 [INFO] [stderr] Downloaded windows-core v0.56.0 [INFO] [stderr] Downloaded ohos-sys v0.2.2 [INFO] [stderr] Downloaded smallvec v1.15.0 [INFO] [stderr] Downloaded makepad-http v1.0.0 [INFO] [stderr] Downloaded makepad-futures-legacy v1.0.0 [INFO] [stderr] Downloaded hilog-sys v0.1.4 [INFO] [stderr] Downloaded makepad-jni-sys v0.4.0 [INFO] [stderr] Downloaded makepad-live-compiler v1.0.0 [INFO] [stderr] Downloaded makepad-shader-compiler v1.0.0 [INFO] [stderr] Downloaded napi-derive-backend-ohos v0.0.7 [INFO] [stderr] Downloaded makepad-objc-sys v1.0.0 [INFO] [stderr] Downloaded makepad-live-id v1.0.0 [INFO] [stderr] Downloaded napi-derive-ohos v0.0.9 [INFO] [stderr] Downloaded makepad-android-state v0.1.0 [INFO] [stderr] Downloaded makepad-futures v1.0.0 [INFO] [stderr] Downloaded makepad-derive-live v1.0.0 [INFO] [stderr] Downloaded syn v2.0.101 [INFO] [stderr] Downloaded napi-ohos v0.1.3 [INFO] [stderr] Downloaded makepad-derive-wasm-bridge v1.0.0 [INFO] [stderr] Downloaded napi-sys-ohos v0.0.1 [INFO] [stderr] Downloaded makepad-live-tokenizer v1.0.0 [INFO] [stderr] Downloaded makepad-micro-serde v1.0.0 [INFO] [stderr] Downloaded makepad-math v1.0.0 [INFO] [stderr] Downloaded makepad-micro-proc-macro v1.0.0 [INFO] [stderr] Downloaded makepad-wasm-bridge v1.0.0 [INFO] [stderr] Downloaded ctor v0.2.9 [INFO] [stderr] Downloaded makepad-micro-serde-derive v1.0.0 [INFO] [stderr] Downloaded makepad-live-id-macros v1.0.0 [INFO] [stderr] Downloaded proc-macro2 v1.0.95 [INFO] [stderr] Downloaded windows-interface v0.56.0 [INFO] [stderr] Downloaded windows-implement v0.56.0 [INFO] [stderr] Downloaded windows v0.56.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] ae4270feb0f664c90b984da74dbcfeef8072deee09a947b0cfab106058d5b0b0 [INFO] running `Command { std: "docker" "start" "-a" "ae4270feb0f664c90b984da74dbcfeef8072deee09a947b0cfab106058d5b0b0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ae4270feb0f664c90b984da74dbcfeef8072deee09a947b0cfab106058d5b0b0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ae4270feb0f664c90b984da74dbcfeef8072deee09a947b0cfab106058d5b0b0", kill_on_drop: false }` [INFO] [stdout] ae4270feb0f664c90b984da74dbcfeef8072deee09a947b0cfab106058d5b0b0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] f3e3ea0959242c575c86ce7f904b432c37501be56a2936c6775abe70fcfb614a [INFO] running `Command { std: "docker" "start" "-a" "f3e3ea0959242c575c86ce7f904b432c37501be56a2936c6775abe70fcfb614a", kill_on_drop: false }` [INFO] [stderr] Compiling makepad-micro-proc-macro v1.0.0 [INFO] [stderr] Compiling makepad-derive-live v1.0.0 [INFO] [stderr] Compiling makepad-platform v1.0.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking makepad-http v1.0.0 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Checking makepad-futures v1.0.0 [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> build.rs:12:20 [INFO] [stdout] | [INFO] [stdout] 12 | file.write_all(&format!("{}", cwd.display()).as_bytes()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}", cwd.display()).as_bytes()` [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: the borrowed expression implements the required traits [INFO] [stdout] --> build.rs:41:44 [INFO] [stdout] | [INFO] [stdout] 41 | if !Command::new("clang").args(&["src/os/apple/metal_xpc.m", "-c", "-o"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["src/os/apple/metal_xpc.m", "-c", "-o"]` [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: the borrowed expression implements the required traits [INFO] [stdout] --> build.rs:42:22 [INFO] [stdout] | [INFO] [stdout] 42 | .arg(&format!("{}/metal_xpc.o", out_dir)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/metal_xpc.o", out_dir)` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> build.rs:47:41 [INFO] [stdout] | [INFO] [stdout] 47 | if !Command::new("ar").args(&["crus", "libmetal_xpc.a", "metal_xpc.o"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["crus", "libmetal_xpc.a", "metal_xpc.o"]` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> build.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | .current_dir(&Path::new(&out_dir)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new(&out_dir)` [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] [INFO] [stdout] [INFO] [stderr] Compiling makepad-live-id-macros v1.0.0 [INFO] [stderr] Compiling makepad-micro-serde-derive v1.0.0 [INFO] [stderr] Checking makepad-live-id v1.0.0 [INFO] [stderr] Checking makepad-micro-serde v1.0.0 [INFO] [stderr] Checking makepad-math v1.0.0 [INFO] [stderr] Checking makepad-live-tokenizer v1.0.0 [INFO] [stderr] Checking makepad-live-compiler v1.0.0 [INFO] [stderr] Checking makepad-shader-compiler v1.0.0 [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/draw_shader.rs:187:7 [INFO] [stdout] | [INFO] [stdout] 187 | #[cfg(any(target_arch = "wasm32"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `target_arch = "wasm32"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] = note: `#[warn(clippy::non_minimal_cfg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/draw_shader.rs:199:7 [INFO] [stdout] | [INFO] [stdout] 199 | #[cfg(any(target_os = "windows"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `target_os = "windows"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/draw_shader.rs:187:7 [INFO] [stdout] | [INFO] [stdout] 187 | #[cfg(any(target_arch = "wasm32"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `target_arch = "wasm32"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] = note: `#[warn(clippy::non_minimal_cfg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/draw_shader.rs:199:7 [INFO] [stdout] | [INFO] [stdout] 199 | #[cfg(any(target_os = "windows"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `target_os = "windows"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/cx_shared.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [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/os/cx_shared.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | end: end [INFO] [stdout] | ^^^^^^^^ help: replace it with: `end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/cx_shared.rs:167:17 [INFO] [stdout] | [INFO] [stdout] 167 | triggers: triggers, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `triggers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/cx_shared.rs:226:72 [INFO] [stdout] | [INFO] [stdout] 226 | self.call_event_handler(&Event::NextFrame(NextFrameEvent {set, time: time, frame: self.repaint_id})); [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/os/linux/x11/x11_sys.rs:99:26 [INFO] [stdout] | [INFO] [stdout] 99 | pub const XNInputStyle: &'static [u8; 11usize] = b"inputStyle\0"; [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&[u8; 11usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/os/linux/x11/x11_sys.rs:100:28 [INFO] [stdout] | [INFO] [stdout] 100 | pub const XNClientWindow: &'static [u8; 13usize] = b"clientWindow\0"; [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&[u8; 13usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/os/linux/x11/x11_sys.rs:101:27 [INFO] [stdout] | [INFO] [stdout] 101 | pub const XNFocusWindow: &'static [u8; 12usize] = b"focusWindow\0"; [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&[u8; 12usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:481:33 [INFO] [stdout] | [INFO] [stdout] 481 | ... key_code: key_code, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `key_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:483:33 [INFO] [stdout] | [INFO] [stdout] 483 | ... modifiers: modifiers, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | new_geom: new_geom [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `new_geom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:442:13 [INFO] [stdout] | [INFO] [stdout] 442 | old_geom: old_geom, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `old_geom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:443:13 [INFO] [stdout] | [INFO] [stdout] 443 | new_geom: new_geom [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `new_geom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/cx_shared.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [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/os/cx_shared.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | end: end [INFO] [stdout] | ^^^^^^^^ help: replace it with: `end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/cx_shared.rs:167:17 [INFO] [stdout] | [INFO] [stdout] 167 | triggers: triggers, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `triggers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/cx_shared.rs:226:72 [INFO] [stdout] | [INFO] [stdout] 226 | self.call_event_handler(&Event::NextFrame(NextFrameEvent {set, time: time, frame: self.repaint_id})); [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/os/linux/gl_sys.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | crate::log!("Caught GL Error({i}) {:x} ", err); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/os/linux/x11/x11_sys.rs:99:26 [INFO] [stdout] | [INFO] [stdout] 99 | pub const XNInputStyle: &'static [u8; 11usize] = b"inputStyle\0"; [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&[u8; 11usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/os/linux/x11/x11_sys.rs:100:28 [INFO] [stdout] | [INFO] [stdout] 100 | pub const XNClientWindow: &'static [u8; 13usize] = b"clientWindow\0"; [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&[u8; 13usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/os/linux/x11/x11_sys.rs:101:27 [INFO] [stdout] | [INFO] [stdout] 101 | pub const XNFocusWindow: &'static [u8; 12usize] = b"focusWindow\0"; [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&[u8; 12usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/os/linux/opengl.rs:887:28 [INFO] [stdout] | [INFO] [stdout] 887 | let mut size = ((slots - i * 4)) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: remove them: `(slots - i * 4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/opengl.rs:901:25 [INFO] [stdout] | [INFO] [stdout] 901 | size: size, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/opengl.rs:902:25 [INFO] [stdout] | [INFO] [stdout] 902 | stride: stride [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `stride` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:481:33 [INFO] [stdout] | [INFO] [stdout] 481 | ... key_code: key_code, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `key_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:483:33 [INFO] [stdout] | [INFO] [stdout] 483 | ... modifiers: modifiers, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | new_geom: new_geom [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `new_geom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:442:13 [INFO] [stdout] | [INFO] [stdout] 442 | old_geom: old_geom, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `old_geom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:443:13 [INFO] [stdout] | [INFO] [stdout] 443 | new_geom: new_geom [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `new_geom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/os/linux/gl_sys.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | crate::log!("Caught GL Error({i}) {:x} ", err); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits grouped inconsistently by underscores [INFO] [stdout] --> src/os/linux/select_timer.rs:48:57 [INFO] [stdout] | [INFO] [stdout] 48 | tv_usec: (timer.delta_timeout.fract() * 1000_000.0) as libc_sys::time_t, [INFO] [stdout] | ^^^^^^^^^^ help: consider: `1_000_000.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping [INFO] [stdout] = note: `#[warn(clippy::inconsistent_digit_grouping)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/os/linux/opengl.rs:887:28 [INFO] [stdout] | [INFO] [stdout] 887 | let mut size = ((slots - i * 4)) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: remove them: `(slots - i * 4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/opengl.rs:901:25 [INFO] [stdout] | [INFO] [stdout] 901 | size: size, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/os/linux/opengl.rs:902:25 [INFO] [stdout] | [INFO] [stdout] 902 | stride: stride [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `stride` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/live_traits.rs:218:17 [INFO] [stdout] | [INFO] [stdout] 218 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/live_traits.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/live_cx.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | const LINE_NR_ERROR: &'static str = "\n#############################################\n\nMakepad needs the nightly only proc_macr... [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits grouped inconsistently by underscores [INFO] [stdout] --> src/os/linux/select_timer.rs:48:57 [INFO] [stdout] | [INFO] [stdout] 48 | tv_usec: (timer.delta_timeout.fract() * 1000_000.0) as libc_sys::time_t, [INFO] [stdout] | ^^^^^^^^^^ help: consider: `1_000_000.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping [INFO] [stdout] = note: `#[warn(clippy::inconsistent_digit_grouping)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/draw_shader.rs:386:25 [INFO] [stdout] | [INFO] [stdout] 386 | ty:ty, [INFO] [stdout] | ^^^^^ help: replace it with: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/draw_list.rs:270:17 [INFO] [stdout] | [INFO] [stdout] 270 | kind: kind, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/draw_vars.rs:350:25 [INFO] [stdout] | [INFO] [stdout] 350 | mapping: mapping [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `mapping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/live_traits.rs:218:17 [INFO] [stdout] | [INFO] [stdout] 218 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/live_traits.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/live_cx.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | const LINE_NR_ERROR: &'static str = "\n#############################################\n\nMakepad needs the nightly only proc_macr... [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/event/finger.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | new_area: new_area, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `new_area` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/draw_shader.rs:386:25 [INFO] [stdout] | [INFO] [stdout] 386 | ty:ty, [INFO] [stdout] | ^^^^^ help: replace it with: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/draw_list.rs:270:17 [INFO] [stdout] | [INFO] [stdout] 270 | kind: kind, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/draw_vars.rs:350:25 [INFO] [stdout] | [INFO] [stdout] 350 | mapping: mapping [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `mapping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/event/finger.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | new_area: new_area, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `new_area` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pass.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | clear_color: clear_color [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `clear_color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pass.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | clear_color: clear_color [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `clear_color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pass.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | clear_color: clear_color [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `clear_color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pass.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | clear_color: clear_color [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `clear_color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pass.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | clear_color: clear_color [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `clear_color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pass.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | clear_color: clear_color [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `clear_color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/animator.rs:799:56 [INFO] [stdout] | [INFO] [stdout] 799 | ... LiveValue::Float64(((vb - va)) * mix + *va) [INFO] [stdout] | ^^^^^^^^^^^ help: remove them: `(vb - va)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is an `else {..}` but the formatting might hide it [INFO] [stdout] --> src/component_map.rs:37:64 [INFO] [stdout] | [INFO] [stdout] 37 | self.map.retain( | k, v | if visible.contains(&k){true}else [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 38 | | { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stdout] = note: `#[warn(clippy::suspicious_else_formatting)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/animator.rs:799:56 [INFO] [stdout] | [INFO] [stdout] 799 | ... LiveValue::Float64(((vb - va)) * mix + *va) [INFO] [stdout] | ^^^^^^^^^^^ help: remove them: `(vb - va)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is an `else {..}` but the formatting might hide it [INFO] [stdout] --> src/component_map.rs:37:64 [INFO] [stdout] | [INFO] [stdout] 37 | self.map.retain( | k, v | if visible.contains(&k){true}else [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 38 | | { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stdout] = note: `#[warn(clippy::suspicious_else_formatting)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/cx_native.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | return 0.0 [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] 47 - return 0.0 [INFO] [stdout] 47 + 0.0 [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/os/cx_shared.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | / match self.passes[pass_id].parent { [INFO] [stdout] 27 | | CxPassParent::Window(_) => { [INFO] [stdout] 28 | | self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 29 | | }, [INFO] [stdout] 30 | | _ => () [INFO] [stdout] 31 | | } [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] 26 ~ if let CxPassParent::Window(_) = self.passes[pass_id].parent { [INFO] [stdout] 27 + self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/os/cx_shared.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | / if self.demo_time_repaint { [INFO] [stdout] 53 | | if self.passes[pass_id].main_draw_list_id.is_some(){ [INFO] [stdout] 54 | | self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 55 | | } [INFO] [stdout] 56 | | } [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] 52 ~ if self.demo_time_repaint [INFO] [stdout] 53 ~ && self.passes[pass_id].main_draw_list_id.is_some(){ [INFO] [stdout] 54 | self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/cx_shared.rs:162:15 [INFO] [stdout] | [INFO] [stdout] 162 | while self.triggers.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.triggers.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: length comparison to zero [INFO] [stdout] --> src/os/cx_shared.rs:180:15 [INFO] [stdout] | [INFO] [stdout] 180 | while self.new_actions.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.new_actions.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: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/os/cx_stdin.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 183 - io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] 183 + io::Error::other(error) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/os/cx_stdin.rs:227:69 [INFO] [stdout] | [INFO] [stdout] 227 | #[derive(Copy, Clone, Debug, PartialEq, SerBin, DeBin, SerJson, DeJson)] [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `DeJson` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:53:30 [INFO] [stdout] | [INFO] [stdout] 53 | let clear_color = if self.passes[pass_id].color_textures.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.passes[pass_id].color_textures.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: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | (gl.glClearDepthf)(clear_depth as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `clear_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:296:5 [INFO] [stdout] | [INFO] [stdout] 296 | / pub unsafe fn from_egl_platform_display( [INFO] [stdout] 297 | | egl_platform: egl_sys::EGLenum, [INFO] [stdout] 298 | | egl_platform_display: *mut T, [INFO] [stdout] 299 | | ) -> OpenglCx { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | 0 as * const _ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] = note: `#[warn(clippy::zero_ptr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:24:37 [INFO] [stdout] | [INFO] [stdout] 24 | static mut XLIB_APP: *mut XlibApp = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:32:45 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn init_xlib_app_global(event_callback: Box EventFlow>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | pub event_callback: Option EventFlow >>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:63:32 [INFO] [stdout] | [INFO] [stdout] 63 | pub fn new(event_callback: Box EventFlow>) -> XlibApp { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | pub unsafe fn event_loop_poll(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:98:15 [INFO] [stdout] | [INFO] [stdout] 98 | while self.display != ptr::null_mut() && x11_sys::XPending(self.display) != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.display.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] = note: `#[warn(clippy::cmp_null)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/cx_native.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | return 0.0 [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] 47 - return 0.0 [INFO] [stdout] 47 + 0.0 [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/os/cx_shared.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | / match self.passes[pass_id].parent { [INFO] [stdout] 27 | | CxPassParent::Window(_) => { [INFO] [stdout] 28 | | self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 29 | | }, [INFO] [stdout] 30 | | _ => () [INFO] [stdout] 31 | | } [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] 26 ~ if let CxPassParent::Window(_) = self.passes[pass_id].parent { [INFO] [stdout] 27 + self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:150:28 [INFO] [stdout] | [INFO] [stdout] 150 | if ret != ptr::null_mut() && bytes_to_read > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!ret.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting raw pointers to the same type and constness is unnecessary (`*const u8` -> `*const u8`) [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:151:79 [INFO] [stdout] | [INFO] [stdout] 151 | ... let utf8_slice = std::slice::from_raw_parts::(ret as *const _ as *const u8, bytes_to_read as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ret as *const _` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/os/cx_shared.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | / if self.demo_time_repaint { [INFO] [stdout] 53 | | if self.passes[pass_id].main_draw_list_id.is_some(){ [INFO] [stdout] 54 | | self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 55 | | } [INFO] [stdout] 56 | | } [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] 52 ~ if self.demo_time_repaint [INFO] [stdout] 53 ~ && self.passes[pass_id].main_draw_list_id.is_some(){ [INFO] [stdout] 54 | self.passes[pass_id].paint_dirty = true; [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/cx_shared.rs:162:15 [INFO] [stdout] | [INFO] [stdout] 162 | while self.triggers.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.triggers.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: length comparison to zero [INFO] [stdout] --> src/os/cx_shared.rs:180:15 [INFO] [stdout] | [INFO] [stdout] 180 | while self.new_actions.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.new_actions.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: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:672:9 [INFO] [stdout] | [INFO] [stdout] 672 | return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 672 - return None [INFO] [stdout] 672 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MouseCursor` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:677:36 [INFO] [stdout] | [INFO] [stdout] 677 | self.internal_cursor = cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor` [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 `MouseCursor` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:688:35 [INFO] [stdout] | [INFO] [stdout] 688 | self.current_cursor = cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:728:24 [INFO] [stdout] | [INFO] [stdout] 728 | if !(**v).window.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(**v).window.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:908:5 [INFO] [stdout] | [INFO] [stdout] 908 | pub unsafe fn copy_to_clipboard(&mut self, text: &String, window_id: c_ulong, time: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:908:54 [INFO] [stdout] | [INFO] [stdout] 908 | pub unsafe fn copy_to_clipboard(&mut self, text: &String, window_id: c_ulong, time: u64) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 908 ~ pub unsafe fn copy_to_clipboard(&mut self, text: &str, window_id: c_ulong, time: u64) { [INFO] [stdout] 909 | // store the text on the clipboard [INFO] [stdout] 910 ~ self.clipboard = text.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:944:54 [INFO] [stdout] | [INFO] [stdout] 944 | clipboard: x11_sys::XInternAtom(display, "CLIPBOARD\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"CLIPBOARD"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] = note: `#[warn(clippy::manual_c_str_literals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:945:62 [INFO] [stdout] | [INFO] [stdout] 945 | net_wm_moveresize: x11_sys::XInternAtom(display, "_NET_WM_MOVERESIZE\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_MOVERESIZE"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:946:61 [INFO] [stdout] | [INFO] [stdout] 946 | wm_delete_window: x11_sys::XInternAtom(display, "WM_DELETE_WINDOW\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"WM_DELETE_WINDOW"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:947:57 [INFO] [stdout] | [INFO] [stdout] 947 | wm_protocols: x11_sys::XInternAtom(display, "WM_PROTOCOLS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"WM_PROTOCOLS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:948:53 [INFO] [stdout] | [INFO] [stdout] 948 | wm_class: x11_sys::XInternAtom(display, "WM_CLASS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: use a `c""` literal: `c"WM_CLASS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:949:59 [INFO] [stdout] | [INFO] [stdout] 949 | motif_wm_hints: x11_sys::XInternAtom(display, "_MOTIF_WM_HINTS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_MOTIF_WM_HINTS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:950:57 [INFO] [stdout] | [INFO] [stdout] 950 | net_wm_state: x11_sys::XInternAtom(display, "_NET_WM_STATE\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_STATE"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:951:72 [INFO] [stdout] | [INFO] [stdout] 951 | new_wm_state_maximized_horz: x11_sys::XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_HORZ\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_STATE_MAXIMIZED_HORZ"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:952:72 [INFO] [stdout] | [INFO] [stdout] 952 | new_wm_state_maximized_vert: x11_sys::XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_VERT\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_STATE_MAXIMIZED_VERT"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:953:52 [INFO] [stdout] | [INFO] [stdout] 953 | targets: x11_sys::XInternAtom(display, "TARGETS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"TARGETS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:954:51 [INFO] [stdout] | [INFO] [stdout] 954 | string: x11_sys::XInternAtom(display, "STRING\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^ help: use a `c""` literal: `c"STRING"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:955:56 [INFO] [stdout] | [INFO] [stdout] 955 | utf8_string: x11_sys::XInternAtom(display, "UTF8_STRING\0".as_ptr() as *const _, 1), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"UTF8_STRING"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:956:49 [INFO] [stdout] | [INFO] [stdout] 956 | atom: x11_sys::XInternAtom(display, "ATOM\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"ATOM"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:957:49 [INFO] [stdout] | [INFO] [stdout] 957 | text: x11_sys::XInternAtom(display, "TEXT\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"TEXT"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:958:55 [INFO] [stdout] | [INFO] [stdout] 958 | text_plain: x11_sys::XInternAtom(display, "text/plain\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use a `c""` literal: `c"text/plain"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:959:53 [INFO] [stdout] | [INFO] [stdout] 959 | multiple: x11_sys::XInternAtom(display, "MULTIPLE\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: use a `c""` literal: `c"MULTIPLE"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/os/cx_stdin.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 183 - io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] 183 + io::Error::other(error) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `position` after checking its variant with `is_some` [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:106:40 [INFO] [stdout] | [INFO] [stdout] 106 | if position.is_some() {position.unwrap().x}else {150.0} as i32, [INFO] [stdout] | --------------------- ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `position` after checking its variant with `is_some` [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:107:40 [INFO] [stdout] | [INFO] [stdout] 107 | if position.is_some() {position.unwrap().y}else {60.0} as i32, [INFO] [stdout] | --------------------- ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | x11_sys::InputOutput as u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x11_sys::InputOutput` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/os/cx_stdin.rs:227:69 [INFO] [stdout] | [INFO] [stdout] 227 | #[derive(Copy, Clone, Debug, PartialEq, SerBin, DeBin, SerJson, DeJson)] [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `DeJson` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:321:31 [INFO] [stdout] | [INFO] [stdout] 321 | if result == 0 && properties != ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!properties.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:350:13 [INFO] [stdout] | [INFO] [stdout] 350 | return DVec2 {x: xwa.x as f64, y: xwa.y as f64} [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 350 - return DVec2 {x: xwa.x as f64, y: xwa.y as f64} [INFO] [stdout] 350 + DVec2 {x: xwa.x as f64, y: xwa.y as f64} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:369:13 [INFO] [stdout] | [INFO] [stdout] 369 | return DVec2 {x: xwa.width as f64 / dpi_factor, y: xwa.height as f64 / dpi_factor} [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 369 - return DVec2 {x: xwa.width as f64 / dpi_factor, y: xwa.height as f64 / dpi_factor} [INFO] [stdout] 369 + DVec2 {x: xwa.width as f64 / dpi_factor, y: xwa.height as f64 / dpi_factor} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | return DVec2 {x: xwa.width as f64, y: xwa.height as f64} [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 379 - return DVec2 {x: xwa.width as f64, y: xwa.height as f64} [INFO] [stdout] 379 + DVec2 {x: xwa.width as f64, y: xwa.height as f64} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:413:17 [INFO] [stdout] | [INFO] [stdout] 413 | return 1.0; // TODO find some other way to figure it out [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 413 - return 1.0; // TODO find some other way to figure it out [INFO] [stdout] 413 + 1.0// TODO find some other way to figure it out [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:417:17 [INFO] [stdout] | [INFO] [stdout] 417 | return dpi / 96.0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 417 - return dpi / 96.0; [INFO] [stdout] 417 + dpi / 96.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:397:16 [INFO] [stdout] | [INFO] [stdout] 397 | if resource_string == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `resource_string.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:405:17 [INFO] [stdout] | [INFO] [stdout] 405 | "Xft.dpi\0".as_ptr() as * const _, [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"Xft.dpi"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:406:17 [INFO] [stdout] | [INFO] [stdout] 406 | "String\0".as_ptr() as * const _, [INFO] [stdout] | ^^^^^^^^^^ help: use a `c""` literal: `c"String"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:412:16 [INFO] [stdout] | [INFO] [stdout] 412 | if value.addr == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `value.addr.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:557:5 [INFO] [stdout] | [INFO] [stdout] 557 | pub unsafe fn new(display: *mut x11_sys::Display) -> Dnd { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:567:5 [INFO] [stdout] | [INFO] [stdout] 567 | pub unsafe fn enable_for_window(&mut self, window: x11_sys::Window) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:588:5 [INFO] [stdout] | [INFO] [stdout] 588 | pub unsafe fn handle_enter_event(&mut self, event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:611:5 [INFO] [stdout] | [INFO] [stdout] 611 | pub unsafe fn handle_drop_event(&mut self, event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:625:5 [INFO] [stdout] | [INFO] [stdout] 625 | pub unsafe fn handle_leave_event(&mut self, _event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:634:5 [INFO] [stdout] | [INFO] [stdout] 634 | pub unsafe fn handle_position_event(&mut self, event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:646:24 [INFO] [stdout] | [INFO] [stdout] 646 | let accepted = self.type_list.as_ref().map_or(false, | type_list | type_list.contains(&self.atoms.uri_list)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 646 - let accepted = self.type_list.as_ref().map_or(false, | type_list | type_list.contains(&self.atoms.uri_list)); [INFO] [stdout] 646 + let accepted = self.type_list.as_ref().is_some_and(| type_list | type_list.contains(&self.atoms.uri_list)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:663:5 [INFO] [stdout] | [INFO] [stdout] 663 | pub unsafe fn handle_selection_event(&mut self, _event: &x11_sys::XSelectionEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:676:5 [INFO] [stdout] | [INFO] [stdout] 676 | pub unsafe fn get_selection_property(&mut self, source_window: x11_sys::Window) -> Vec< std::os::raw::c_uchar> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:711:5 [INFO] [stdout] | [INFO] [stdout] 711 | pub unsafe fn get_type_list_property(&mut self, source_window: x11_sys::Window) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:746:5 [INFO] [stdout] | [INFO] [stdout] 746 | pub unsafe fn send_status_event(&mut self, source_window: x11_sys::Window, target_window: x11_sys::Window, accepted: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:776:5 [INFO] [stdout] | [INFO] [stdout] 776 | pub unsafe fn convert_selection(&self, target_window: x11_sys::Window) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:803:5 [INFO] [stdout] | [INFO] [stdout] 803 | pub unsafe fn new(display: *mut x11_sys::Display) -> DndAtoms { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:805:59 [INFO] [stdout] | [INFO] [stdout] 805 | action_private: x11_sys::XInternAtom(display, "XdndActionPrivate\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndActionPrivate"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:806:50 [INFO] [stdout] | [INFO] [stdout] 806 | aware: x11_sys::XInternAtom(display, "XdndAware\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndAware"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:807:49 [INFO] [stdout] | [INFO] [stdout] 807 | drop: x11_sys::XInternAtom(display, "XdndDrop\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndDrop"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:808:50 [INFO] [stdout] | [INFO] [stdout] 808 | enter: x11_sys::XInternAtom(display, "XdndEnter\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndEnter"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:809:50 [INFO] [stdout] | [INFO] [stdout] 809 | leave: x11_sys::XInternAtom(display, "XdndLeave\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndLeave"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:810:49 [INFO] [stdout] | [INFO] [stdout] 810 | none: x11_sys::XInternAtom(display, "None\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"None"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:811:53 [INFO] [stdout] | [INFO] [stdout] 811 | position: x11_sys::XInternAtom(display, "XdndPosition\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndPosition"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:812:54 [INFO] [stdout] | [INFO] [stdout] 812 | selection: x11_sys::XInternAtom(display, "XdndSelection\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndSelection"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:813:51 [INFO] [stdout] | [INFO] [stdout] 813 | status: x11_sys::XInternAtom(display, "XdndStatus\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndStatus"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:814:54 [INFO] [stdout] | [INFO] [stdout] 814 | type_list: x11_sys::XInternAtom(display, "XdndTypeList\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndTypeList"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:815:53 [INFO] [stdout] | [INFO] [stdout] 815 | uri_list: x11_sys::XInternAtom(display, "text/uri-list\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"text/uri-list"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:53:58 [INFO] [stdout] | [INFO] [stdout] 53 | cx.xlib_event_callback(xlib_app, events, &mut *opengl_windows) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&mut opengl_windows` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:127:24 [INFO] [stdout] | [INFO] [stdout] 127 | if opengl_windows.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `opengl_windows.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: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:135:20 [INFO] [stdout] | [INFO] [stdout] 135 | if self.new_next_frames.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.new_next_frames.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: useless conversion to the same type: `event::finger::MouseDownEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:153:59 [INFO] [stdout] | [INFO] [stdout] 153 | self.call_event_handler(&Event::MouseDown(e.into())) [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `event::finger::MouseMoveEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:156:59 [INFO] [stdout] | [INFO] [stdout] 156 | self.call_event_handler(&Event::MouseMove(e.into())); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `event::finger::MouseUpEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:162:57 [INFO] [stdout] | [INFO] [stdout] 162 | self.call_event_handler(&Event::MouseUp(e.into())); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `event::finger::ScrollEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:167:56 [INFO] [stdout] | [INFO] [stdout] 167 | self.call_event_handler(&Event::Scroll(e.into())) [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `KeyEvent` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:188:48 [INFO] [stdout] | [INFO] [stdout] 188 | self.keyboard.process_key_down(e.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `KeyEvent` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:192:46 [INFO] [stdout] | [INFO] [stdout] 192 | self.keyboard.process_key_up(e.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:233:62 [INFO] [stdout] | [INFO] [stdout] 233 | pub (crate) fn handle_repaint(&mut self, opengl_windows: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 233 - pub (crate) fn handle_repaint(&mut self, opengl_windows: &mut Vec) { [INFO] [stdout] 233 + pub (crate) fn handle_repaint(&mut self, opengl_windows: &mut [OpenglWindow]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:283:28 [INFO] [stdout] | [INFO] [stdout] 283 | if opengl_windows.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `opengl_windows.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: accessing first element with `opengl_windows.get(0)` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:321:43 [INFO] [stdout] | [INFO] [stdout] 321 | if let Some(window) = opengl_windows.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `opengl_windows.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/os/linux/x11/linux_x11_stdin.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | windows: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - windows: &mut Vec, [INFO] [stdout] 17 + windows: &mut [StdinWindow], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11_stdin.rs:239:24 [INFO] [stdout] | [INFO] [stdout] 239 | if self.new_next_frames.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.new_next_frames.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: name `PFNEGLPRESENTATIONTIMEANDROID` contains a capitalized acronym [INFO] [stdout] --> src/os/linux/egl_sys.rs:252:6 [INFO] [stdout] | [INFO] [stdout] 252 | type PFNEGLPRESENTATIONTIMEANDROID = ::std::option::Option< [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Pfneglpresentationtimeandroid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PFNEGLSURFACEATTRIB` contains a capitalized acronym [INFO] [stdout] --> src/os/linux/egl_sys.rs:260:6 [INFO] [stdout] | [INFO] [stdout] 260 | type PFNEGLSURFACEATTRIB = ::std::option::Option< [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Pfneglsurfaceattrib` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/gl_sys.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | 0 as * const _, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/gl_sys.rs:330:53 [INFO] [stdout] | [INFO] [stdout] 330 | unsafe{(self.glDebugMessageCallback)(debug, 0 as *const _)}; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:53:30 [INFO] [stdout] | [INFO] [stdout] 53 | let clear_color = if self.passes[pass_id].color_textures.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.passes[pass_id].color_textures.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: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | (gl.glClearDepthf)(clear_depth as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `clear_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/libc_sys.rs:63:1 [INFO] [stdout] | [INFO] [stdout] 63 | pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/os/linux/libc_sys.rs:63:50 [INFO] [stdout] | [INFO] [stdout] 63 | pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/libc_sys.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | return [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 66 - (*set).fds_bits[fd / size] |= 1 << (fd % size); [INFO] [stdout] 67 - return [INFO] [stdout] 66 + (*set).fds_bits[fd / size] |= 1 << (fd % size); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/libc_sys.rs:70:1 [INFO] [stdout] | [INFO] [stdout] 70 | pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/os/linux/libc_sys.rs:70:40 [INFO] [stdout] | [INFO] [stdout] 70 | pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:296:5 [INFO] [stdout] | [INFO] [stdout] 296 | / pub unsafe fn from_egl_platform_display( [INFO] [stdout] 297 | | egl_platform: egl_sys::EGLenum, [INFO] [stdout] 298 | | egl_platform_display: *mut T, [INFO] [stdout] 299 | | ) -> OpenglCx { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/x11/opengl_x11.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | 0 as * const _ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] = note: `#[warn(clippy::zero_ptr)]` 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/os/linux/opengl.rs:276:37 [INFO] [stdout] | [INFO] [stdout] 276 | self.call_event_handler(&event); [INFO] [stdout] | ^^^^^^ help: change this to: `event` [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: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:24:37 [INFO] [stdout] | [INFO] [stdout] 24 | static mut XLIB_APP: *mut XlibApp = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:32:45 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn init_xlib_app_global(event_callback: Box EventFlow>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | pub event_callback: Option EventFlow >>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:63:32 [INFO] [stdout] | [INFO] [stdout] 63 | pub fn new(event_callback: Box EventFlow>) -> XlibApp { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | pub unsafe fn event_loop_poll(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/os/linux/opengl.rs:441:29 [INFO] [stdout] | [INFO] [stdout] 441 | (gl.glViewport)(x as i32, y as i32, width as i32, height as i32); [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:98:15 [INFO] [stdout] | [INFO] [stdout] 98 | while self.display != ptr::null_mut() && x11_sys::XPending(self.display) != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.display.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] = note: `#[warn(clippy::cmp_null)]` 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/os/linux/opengl.rs:476:67 [INFO] [stdout] | [INFO] [stdout] 476 | if let Some(item) = self.draw_shaders.ptr_to_item.get(&draw_shader_ptr) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `draw_shader_ptr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:478:81 [INFO] [stdout] | [INFO] [stdout] 478 | let draw_shader_def = self.shader_registry.draw_shader_defs.get(&draw_shader_ptr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `draw_shader_ptr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:150:28 [INFO] [stdout] | [INFO] [stdout] 150 | if ret != ptr::null_mut() && bytes_to_read > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!ret.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting raw pointers to the same type and constness is unnecessary (`*const u8` -> `*const u8`) [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:151:79 [INFO] [stdout] | [INFO] [stdout] 151 | ... let utf8_slice = std::slice::from_raw_parts::(ret as *const _ as *const u8, bytes_to_read as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ret as *const _` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:620:63 [INFO] [stdout] | [INFO] [stdout] 620 | let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:620:83 [INFO] [stdout] | [INFO] [stdout] 620 | let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/os/linux/opengl.rs:623:17 [INFO] [stdout] | [INFO] [stdout] 623 | / ... match os_type { [INFO] [stdout] 624 | | ... OsType::Android(params) => { [INFO] [stdout] 625 | | ... base_filename = format!("{}_av{}_bn{}_kv{}", base_filename, params.android_version, params.build_number, params.ker... [INFO] [stdout] 626 | | ... }, [INFO] [stdout] 627 | | ... _ => (), [INFO] [stdout] 628 | | ... }; [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] 623 ~ if let OsType::Android(params) = os_type { [INFO] [stdout] 624 + base_filename = format!("{}_av{}_bn{}_kv{}", base_filename, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 625 ~ }; [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/os/linux/opengl.rs:642:37 [INFO] [stdout] | [INFO] [stdout] 642 | / ... match os_type { [INFO] [stdout] 643 | | ... OsType::Android(params) => { [INFO] [stdout] 644 | | ... let current_filename = format!("{}/shader_{:08x}_av{}_bn{}_kv{}.bin", cache_dir, shader_hash.0, params.android_vers... [INFO] [stdout] 645 | | ... version_consistency_conflict = filename != current_filename; [INFO] [stdout] 646 | | ... }, [INFO] [stdout] 647 | | ... _ => (), [INFO] [stdout] 648 | | ... }; [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] 642 ~ if let OsType::Android(params) = os_type { [INFO] [stdout] 643 + let current_filename = format!("{}/shader_{:08x}_av{}_bn{}_kv{}.bin", cache_dir, shader_hash.0, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 644 + version_consistency_conflict = filename != current_filename; [INFO] [stdout] 645 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/os/linux/opengl.rs:779:13 [INFO] [stdout] | [INFO] [stdout] 771 | / let t = Self{ [INFO] [stdout] 772 | | program, [INFO] [stdout] 773 | | geometries:Self::opengl_get_attributes(gl, program, "packed_geometry_", mapping.geometries.total_slots), [INFO] [stdout] 774 | | instances: Self::opengl_get_attributes(gl, program, "packed_instance_", mapping.instances.total_slots), [INFO] [stdout] ... | [INFO] [stdout] 777 | | uniforms [INFO] [stdout] 778 | | }; [INFO] [stdout] | |______________- unnecessary `let` binding [INFO] [stdout] 779 | t [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 771 ~ [INFO] [stdout] 772 ~ Self{ [INFO] [stdout] 773 + program, [INFO] [stdout] 774 + geometries:Self::opengl_get_attributes(gl, program, "packed_geometry_", mapping.geometries.total_slots), [INFO] [stdout] 775 + instances: Self::opengl_get_attributes(gl, program, "packed_instance_", mapping.instances.total_slots), [INFO] [stdout] 776 + textures: Self::opengl_get_texture_slots(gl, program, &mapping.textures), [INFO] [stdout] 777 + xr_depth_texture: Self::opengl_get_uniform(gl, program, "xr_depth_texture"), [INFO] [stdout] 778 + uniforms [INFO] [stdout] 779 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:682:65 [INFO] [stdout] | [INFO] [stdout] 682 | let program = if let Some(program) = read_cache(gl, &vertex,&pixel,os_type){ [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:682:73 [INFO] [stdout] | [INFO] [stdout] 682 | let program = if let Some(program) = read_cache(gl, &vertex,&pixel,os_type){ [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:690:91 [INFO] [stdout] | [INFO] [stdout] 690 | if let Some(error) = Self::opengl_has_shader_error(gl, true, vs as usize, &vertex) { [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:697:91 [INFO] [stdout] | [INFO] [stdout] 697 | if let Some(error) = Self::opengl_has_shader_error(gl, true, fs as usize, &pixel) { [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:723:75 [INFO] [stdout] | [INFO] [stdout] 723 | ... let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:723:95 [INFO] [stdout] | [INFO] [stdout] 723 | ... let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/os/linux/opengl.rs:726:29 [INFO] [stdout] | [INFO] [stdout] 726 | / ... match os_type { [INFO] [stdout] 727 | | ... OsType::Android(params) => { [INFO] [stdout] 728 | | ... filename = format!("{}_av{}_bn{}_kv{}", filename, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 729 | | ... }, [INFO] [stdout] 730 | | ... _ => (), [INFO] [stdout] 731 | | ... }; [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] 726 ~ if let OsType::Android(params) = os_type { [INFO] [stdout] 727 + filename = format!("{}_av{}_bn{}_kv{}", filename, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 728 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/opengl.rs:765:16 [INFO] [stdout] | [INFO] [stdout] 765 | if ct.len()>0 { [INFO] [stdout] | ^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ct.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:835:13 [INFO] [stdout] | [INFO] [stdout] 835 | r.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `r.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:839:17 [INFO] [stdout] | [INFO] [stdout] 839 | r.push_str(":"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `r.push(':')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:672:9 [INFO] [stdout] | [INFO] [stdout] 672 | return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 672 - return None [INFO] [stdout] 672 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:841:17 [INFO] [stdout] | [INFO] [stdout] 841 | r.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `r.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MouseCursor` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:677:36 [INFO] [stdout] | [INFO] [stdout] 677 | self.internal_cursor = cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor` [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 `MouseCursor` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:688:35 [INFO] [stdout] | [INFO] [stdout] 688 | self.current_cursor = cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:728:24 [INFO] [stdout] | [INFO] [stdout] 728 | if !(**v).window.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(**v).window.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:885:13 [INFO] [stdout] | [INFO] [stdout] 885 | name0.push_str("\0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `name0.push('\0')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:917:13 [INFO] [stdout] | [INFO] [stdout] 917 | name0.push_str("\0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `name0.push('\0')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:908:5 [INFO] [stdout] | [INFO] [stdout] 908 | pub unsafe fn copy_to_clipboard(&mut self, text: &String, window_id: c_ulong, time: u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/opengl.rs:1112:12 [INFO] [stdout] | [INFO] [stdout] 1112 | if string_ptr == ptr::null(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `string_ptr.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:908:54 [INFO] [stdout] | [INFO] [stdout] 908 | pub unsafe fn copy_to_clipboard(&mut self, text: &String, window_id: c_ulong, time: u64) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 908 ~ pub unsafe fn copy_to_clipboard(&mut self, text: &str, window_id: c_ulong, time: u64) { [INFO] [stdout] 909 | // store the text on the clipboard [INFO] [stdout] 910 ~ self.clipboard = text.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:944:54 [INFO] [stdout] | [INFO] [stdout] 944 | clipboard: x11_sys::XInternAtom(display, "CLIPBOARD\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"CLIPBOARD"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] = note: `#[warn(clippy::manual_c_str_literals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:945:62 [INFO] [stdout] | [INFO] [stdout] 945 | net_wm_moveresize: x11_sys::XInternAtom(display, "_NET_WM_MOVERESIZE\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_MOVERESIZE"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:946:61 [INFO] [stdout] | [INFO] [stdout] 946 | wm_delete_window: x11_sys::XInternAtom(display, "WM_DELETE_WINDOW\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"WM_DELETE_WINDOW"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:947:57 [INFO] [stdout] | [INFO] [stdout] 947 | wm_protocols: x11_sys::XInternAtom(display, "WM_PROTOCOLS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"WM_PROTOCOLS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:948:53 [INFO] [stdout] | [INFO] [stdout] 948 | wm_class: x11_sys::XInternAtom(display, "WM_CLASS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: use a `c""` literal: `c"WM_CLASS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:949:59 [INFO] [stdout] | [INFO] [stdout] 949 | motif_wm_hints: x11_sys::XInternAtom(display, "_MOTIF_WM_HINTS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_MOTIF_WM_HINTS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:950:57 [INFO] [stdout] | [INFO] [stdout] 950 | net_wm_state: x11_sys::XInternAtom(display, "_NET_WM_STATE\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_STATE"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:951:72 [INFO] [stdout] | [INFO] [stdout] 951 | new_wm_state_maximized_horz: x11_sys::XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_HORZ\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_STATE_MAXIMIZED_HORZ"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:952:72 [INFO] [stdout] | [INFO] [stdout] 952 | new_wm_state_maximized_vert: x11_sys::XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_VERT\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"_NET_WM_STATE_MAXIMIZED_VERT"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:953:52 [INFO] [stdout] | [INFO] [stdout] 953 | targets: x11_sys::XInternAtom(display, "TARGETS\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"TARGETS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:954:51 [INFO] [stdout] | [INFO] [stdout] 954 | string: x11_sys::XInternAtom(display, "STRING\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^ help: use a `c""` literal: `c"STRING"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:955:56 [INFO] [stdout] | [INFO] [stdout] 955 | utf8_string: x11_sys::XInternAtom(display, "UTF8_STRING\0".as_ptr() as *const _, 1), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"UTF8_STRING"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:956:49 [INFO] [stdout] | [INFO] [stdout] 956 | atom: x11_sys::XInternAtom(display, "ATOM\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"ATOM"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:957:49 [INFO] [stdout] | [INFO] [stdout] 957 | text: x11_sys::XInternAtom(display, "TEXT\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"TEXT"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:958:55 [INFO] [stdout] | [INFO] [stdout] 958 | text_plain: x11_sys::XInternAtom(display, "text/plain\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use a `c""` literal: `c"text/plain"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_app.rs:959:53 [INFO] [stdout] | [INFO] [stdout] 959 | multiple: x11_sys::XInternAtom(display, "MULTIPLE\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: use a `c""` literal: `c"MULTIPLE"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `position` after checking its variant with `is_some` [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:106:40 [INFO] [stdout] | [INFO] [stdout] 106 | if position.is_some() {position.unwrap().x}else {150.0} as i32, [INFO] [stdout] | --------------------- ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `position` after checking its variant with `is_some` [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:107:40 [INFO] [stdout] | [INFO] [stdout] 107 | if position.is_some() {position.unwrap().y}else {60.0} as i32, [INFO] [stdout] | --------------------- ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | x11_sys::InputOutput as u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x11_sys::InputOutput` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/opengl.rs:1321:29 [INFO] [stdout] | [INFO] [stdout] 1321 | ... 0 as *const _ [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:321:31 [INFO] [stdout] | [INFO] [stdout] 321 | if result == 0 && properties != ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!properties.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:350:13 [INFO] [stdout] | [INFO] [stdout] 350 | return DVec2 {x: xwa.x as f64, y: xwa.y as f64} [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 350 - return DVec2 {x: xwa.x as f64, y: xwa.y as f64} [INFO] [stdout] 350 + DVec2 {x: xwa.x as f64, y: xwa.y as f64} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:369:13 [INFO] [stdout] | [INFO] [stdout] 369 | return DVec2 {x: xwa.width as f64 / dpi_factor, y: xwa.height as f64 / dpi_factor} [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 369 - return DVec2 {x: xwa.width as f64 / dpi_factor, y: xwa.height as f64 / dpi_factor} [INFO] [stdout] 369 + DVec2 {x: xwa.width as f64 / dpi_factor, y: xwa.height as f64 / dpi_factor} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | return DVec2 {x: xwa.width as f64, y: xwa.height as f64} [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 379 - return DVec2 {x: xwa.width as f64, y: xwa.height as f64} [INFO] [stdout] 379 + DVec2 {x: xwa.width as f64, y: xwa.height as f64} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:413:17 [INFO] [stdout] | [INFO] [stdout] 413 | return 1.0; // TODO find some other way to figure it out [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 413 - return 1.0; // TODO find some other way to figure it out [INFO] [stdout] 413 + 1.0// TODO find some other way to figure it out [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:417:17 [INFO] [stdout] | [INFO] [stdout] 417 | return dpi / 96.0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 417 - return dpi / 96.0; [INFO] [stdout] 417 + dpi / 96.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/os/linux/opengl.rs:1567:17 [INFO] [stdout] | [INFO] [stdout] 1567 | (data.len() * mem::size_of::()) as gl_sys::GLsizeiptr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:397:16 [INFO] [stdout] | [INFO] [stdout] 397 | if resource_string == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `resource_string.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:405:17 [INFO] [stdout] | [INFO] [stdout] 405 | "Xft.dpi\0".as_ptr() as * const _, [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"Xft.dpi"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/os/linux/opengl.rs:1583:17 [INFO] [stdout] | [INFO] [stdout] 1583 | (data.len() * mem::size_of::()) as gl_sys::GLsizeiptr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:406:17 [INFO] [stdout] | [INFO] [stdout] 406 | "String\0".as_ptr() as * const _, [INFO] [stdout] | ^^^^^^^^^^ help: use a `c""` literal: `c"String"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:412:16 [INFO] [stdout] | [INFO] [stdout] 412 | if value.addr == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `value.addr.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/os/linux/opengl.rs:1600:17 [INFO] [stdout] | [INFO] [stdout] 1600 | (data.len() * mem::size_of::()) as gl_sys::GLsizeiptr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/os/linux/module_loader.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn load(path: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/os/linux/module_loader.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn get_symbol(&self, name: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:557:5 [INFO] [stdout] | [INFO] [stdout] 557 | pub unsafe fn new(display: *mut x11_sys::Display) -> Dnd { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:567:5 [INFO] [stdout] | [INFO] [stdout] 567 | pub unsafe fn enable_for_window(&mut self, window: x11_sys::Window) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:588:5 [INFO] [stdout] | [INFO] [stdout] 588 | pub unsafe fn handle_enter_event(&mut self, event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:611:5 [INFO] [stdout] | [INFO] [stdout] 611 | pub unsafe fn handle_drop_event(&mut self, event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:625:5 [INFO] [stdout] | [INFO] [stdout] 625 | pub unsafe fn handle_leave_event(&mut self, _event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:634:5 [INFO] [stdout] | [INFO] [stdout] 634 | pub unsafe fn handle_position_event(&mut self, event: &x11_sys::XClientMessageEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:646:24 [INFO] [stdout] | [INFO] [stdout] 646 | let accepted = self.type_list.as_ref().map_or(false, | type_list | type_list.contains(&self.atoms.uri_list)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 646 - let accepted = self.type_list.as_ref().map_or(false, | type_list | type_list.contains(&self.atoms.uri_list)); [INFO] [stdout] 646 + let accepted = self.type_list.as_ref().is_some_and(| type_list | type_list.contains(&self.atoms.uri_list)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:663:5 [INFO] [stdout] | [INFO] [stdout] 663 | pub unsafe fn handle_selection_event(&mut self, _event: &x11_sys::XSelectionEvent) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:676:5 [INFO] [stdout] | [INFO] [stdout] 676 | pub unsafe fn get_selection_property(&mut self, source_window: x11_sys::Window) -> Vec< std::os::raw::c_uchar> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:711:5 [INFO] [stdout] | [INFO] [stdout] 711 | pub unsafe fn get_type_list_property(&mut self, source_window: x11_sys::Window) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:746:5 [INFO] [stdout] | [INFO] [stdout] 746 | pub unsafe fn send_status_event(&mut self, source_window: x11_sys::Window, target_window: x11_sys::Window, accepted: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:776:5 [INFO] [stdout] | [INFO] [stdout] 776 | pub unsafe fn convert_selection(&self, target_window: x11_sys::Window) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:803:5 [INFO] [stdout] | [INFO] [stdout] 803 | pub unsafe fn new(display: *mut x11_sys::Display) -> DndAtoms { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:805:59 [INFO] [stdout] | [INFO] [stdout] 805 | action_private: x11_sys::XInternAtom(display, "XdndActionPrivate\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndActionPrivate"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:806:50 [INFO] [stdout] | [INFO] [stdout] 806 | aware: x11_sys::XInternAtom(display, "XdndAware\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndAware"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:807:49 [INFO] [stdout] | [INFO] [stdout] 807 | drop: x11_sys::XInternAtom(display, "XdndDrop\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndDrop"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:808:50 [INFO] [stdout] | [INFO] [stdout] 808 | enter: x11_sys::XInternAtom(display, "XdndEnter\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndEnter"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:809:50 [INFO] [stdout] | [INFO] [stdout] 809 | leave: x11_sys::XInternAtom(display, "XdndLeave\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndLeave"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:810:49 [INFO] [stdout] | [INFO] [stdout] 810 | none: x11_sys::XInternAtom(display, "None\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"None"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:811:53 [INFO] [stdout] | [INFO] [stdout] 811 | position: x11_sys::XInternAtom(display, "XdndPosition\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndPosition"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:812:54 [INFO] [stdout] | [INFO] [stdout] 812 | selection: x11_sys::XInternAtom(display, "XdndSelection\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndSelection"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:813:51 [INFO] [stdout] | [INFO] [stdout] 813 | status: x11_sys::XInternAtom(display, "XdndStatus\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndStatus"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:814:54 [INFO] [stdout] | [INFO] [stdout] 814 | type_list: x11_sys::XInternAtom(display, "XdndTypeList\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"XdndTypeList"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/x11/xlib_window.rs:815:53 [INFO] [stdout] | [INFO] [stdout] 815 | uri_list: x11_sys::XInternAtom(display, "text/uri-list\0".as_ptr() as *const _, 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"text/uri-list"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/ipc.rs:25:14 [INFO] [stdout] | [INFO] [stdout] 25 | _marker: PhantomData<(fn(TX) -> RX, fn(RX) -> TX)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/os/linux/ipc.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 174 - io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] 174 + io::Error::other(error) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:53:58 [INFO] [stdout] | [INFO] [stdout] 53 | cx.xlib_event_callback(xlib_app, events, &mut *opengl_windows) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&mut opengl_windows` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/os/linux/ipc.rs:205:27 [INFO] [stdout] | [INFO] [stdout] 205 | const _: () = assert!(std::mem::size_of::() % std::mem::size_of::() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `std::mem::size_of::().is_multiple_of(std::mem::size_of::())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:127:24 [INFO] [stdout] | [INFO] [stdout] 127 | if opengl_windows.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `opengl_windows.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: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:135:20 [INFO] [stdout] | [INFO] [stdout] 135 | if self.new_next_frames.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.new_next_frames.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: useless conversion to the same type: `event::finger::MouseDownEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:153:59 [INFO] [stdout] | [INFO] [stdout] 153 | self.call_event_handler(&Event::MouseDown(e.into())) [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `event::finger::MouseMoveEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:156:59 [INFO] [stdout] | [INFO] [stdout] 156 | self.call_event_handler(&Event::MouseMove(e.into())); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `event::finger::MouseUpEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:162:57 [INFO] [stdout] | [INFO] [stdout] 162 | self.call_event_handler(&Event::MouseUp(e.into())); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/os/linux/ipc.rs:317:39 [INFO] [stdout] | [INFO] [stdout] 317 | return Err(io_error_other(format!("unsupported non-SCM_RIGHTS CMSG"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"unsupported non-SCM_RIGHTS CMSG".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `event::finger::ScrollEvent` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:167:56 [INFO] [stdout] | [INFO] [stdout] 167 | self.call_event_handler(&Event::Scroll(e.into())) [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/os/linux/ipc.rs:321:39 [INFO] [stdout] | [INFO] [stdout] 321 | return Err(io_error_other(format!("recvmsg got invalid (-1) fds"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"recvmsg got invalid (-1) fds".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `KeyEvent` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:188:48 [INFO] [stdout] | [INFO] [stdout] 188 | self.keyboard.process_key_down(e.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `KeyEvent` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:192:46 [INFO] [stdout] | [INFO] [stdout] 192 | self.keyboard.process_key_up(e.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:233:62 [INFO] [stdout] | [INFO] [stdout] 233 | pub (crate) fn handle_repaint(&mut self, opengl_windows: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 233 - pub (crate) fn handle_repaint(&mut self, opengl_windows: &mut Vec) { [INFO] [stdout] 233 + pub (crate) fn handle_repaint(&mut self, opengl_windows: &mut [OpenglWindow]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/os/linux/ipc.rs:371:29 [INFO] [stdout] | [INFO] [stdout] 371 | .ok_or_else(|| io::Error::last_os_error())? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `io::Error::last_os_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:283:28 [INFO] [stdout] | [INFO] [stdout] 283 | if opengl_windows.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `opengl_windows.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: accessing first element with `opengl_windows.get(0)` [INFO] [stdout] --> src/os/linux/x11/linux_x11.rs:321:43 [INFO] [stdout] | [INFO] [stdout] 321 | if let Some(window) = opengl_windows.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `opengl_windows.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/os/linux/x11/linux_x11_stdin.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | windows: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - windows: &mut Vec, [INFO] [stdout] 17 + windows: &mut [StdinWindow], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/x11/linux_x11_stdin.rs:239:24 [INFO] [stdout] | [INFO] [stdout] 239 | if self.new_next_frames.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.new_next_frames.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: name `PFNEGLPRESENTATIONTIMEANDROID` contains a capitalized acronym [INFO] [stdout] --> src/os/linux/egl_sys.rs:252:6 [INFO] [stdout] | [INFO] [stdout] 252 | type PFNEGLPRESENTATIONTIMEANDROID = ::std::option::Option< [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Pfneglpresentationtimeandroid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PFNEGLSURFACEATTRIB` contains a capitalized acronym [INFO] [stdout] --> src/os/linux/egl_sys.rs:260:6 [INFO] [stdout] | [INFO] [stdout] 260 | type PFNEGLSURFACEATTRIB = ::std::option::Option< [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Pfneglsurfaceattrib` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/os/linux/alsa_audio.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let _ = std::thread::sleep(std::time::Duration::new(1, 0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 71 - let _ = std::thread::sleep(std::time::Duration::new(1, 0)); [INFO] [stdout] 71 + std::thread::sleep(std::time::Duration::new(1, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:100:55 [INFO] [stdout] | [INFO] [stdout] 100 | let mut hints: *mut *mut c_void = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:101:64 [INFO] [stdout] | [INFO] [stdout] 101 | alsa_error!(snd_device_name_hint(card_num, "pcm\0".as_ptr(), &mut hints)) ?; [INFO] [stdout] | ^^^^^^^ help: use a `c""` literal: `c"pcm"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/alsa_audio.rs:105:27 [INFO] [stdout] | [INFO] [stdout] 105 | while *hints.offset(index) != std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(*hints.offset(index)).is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:107:92 [INFO] [stdout] | [INFO] [stdout] 107 | let name_str = from_alsa_string(snd_device_name_get_hint(hint_ptr, "NAME\0".as_ptr())).unwrap_or("".into()); [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"NAME"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:108:92 [INFO] [stdout] | [INFO] [stdout] 108 | ... let desc_str = from_alsa_string(snd_device_name_get_hint(hint_ptr, "DESC\0".as_ptr())).unwrap_or("".into()).replace("\n", " "); [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"DESC"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:109:88 [INFO] [stdout] | [INFO] [stdout] 109 | let ioid = from_alsa_string(snd_device_name_get_hint(hint_ptr, "IOID\0".as_ptr())).unwrap_or("".into()); [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"IOID"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/os/linux/alsa_audio.rs:119:28 [INFO] [stdout] | [INFO] [stdout] 119 | if ioid == "" || ioid == "Input" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ioid.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/os/linux/alsa_audio.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | if ioid == "" || ioid == "Output" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ioid.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/gl_sys.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | 0 as * const _, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/gl_sys.rs:330:53 [INFO] [stdout] | [INFO] [stdout] 330 | unsafe{(self.glDebugMessageCallback)(debug, 0 as *const _)}; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [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/os/linux/alsa_audio.rs:207:25 [INFO] [stdout] | [INFO] [stdout] 207 | / match device.read_input_buffer(&mut audio_buffer) { [INFO] [stdout] 208 | | Err(e) => { [INFO] [stdout] 209 | | println!("Write output buffer error {}", e.0); [INFO] [stdout] 210 | | break; [INFO] [stdout] 211 | | } [INFO] [stdout] 212 | | Ok(_) => () [INFO] [stdout] 213 | | } [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] 207 ~ if let Err(e) = device.read_input_buffer(&mut audio_buffer) { [INFO] [stdout] 208 + println!("Write output buffer error {}", e.0); [INFO] [stdout] 209 + break; [INFO] [stdout] 210 + } [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/os/linux/alsa_audio.rs:282:25 [INFO] [stdout] | [INFO] [stdout] 282 | / match device.write_output_buffer(&audio_buffer) { [INFO] [stdout] 283 | | Err(e) => { [INFO] [stdout] 284 | | println!("Write output buffer error {}", e.0); [INFO] [stdout] 285 | | break; [INFO] [stdout] 286 | | } [INFO] [stdout] 287 | | Ok(_) => () [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] 282 ~ if let Err(e) = device.write_output_buffer(&audio_buffer) { [INFO] [stdout] 283 + println!("Write output buffer error {}", e.0); [INFO] [stdout] 284 + break; [INFO] [stdout] 285 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:307:46 [INFO] [stdout] | [INFO] [stdout] 307 | let mut handle: *mut snd_pcm_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:308:59 [INFO] [stdout] | [INFO] [stdout] 308 | let mut hw_params: *mut snd_pcm_hw_params_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:316:87 [INFO] [stdout] | [INFO] [stdout] 316 | alsa_error!(snd_pcm_hw_params_set_rate_near(handle, hw_params, &mut rate, 0 as *mut _)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:330:88 [INFO] [stdout] | [INFO] [stdout] 330 | alsa_error!(snd_pcm_hw_params_get_period_size(hw_params, &mut frame_count, 0 as *mut _)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/os/linux/alsa_midi.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let _ = self.0.lock().unwrap().send_midi(port_id, d); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 29 - let _ = self.0.lock().unwrap().send_midi(port_id, d); [INFO] [stdout] 29 + self.0.lock().unwrap().send_midi(port_id, d); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:118:55 [INFO] [stdout] | [INFO] [stdout] 118 | let mut subs: *mut snd_seq_port_subscribe_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:162:45 [INFO] [stdout] | [INFO] [stdout] 162 | let mut in_client: *mut snd_seq_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:163:50 [INFO] [stdout] | [INFO] [stdout] 163 | alsa_error!(snd_seq_open(&mut in_client, "default\0".as_ptr(), SND_SEQ_OPEN_INPUT, 0)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"default"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:164:56 [INFO] [stdout] | [INFO] [stdout] 164 | alsa_error!(snd_seq_set_client_name(in_client, "Makepad Midi In\0".as_ptr())) ?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi In"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:167:46 [INFO] [stdout] | [INFO] [stdout] 167 | let mut out_client: *mut snd_seq_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:168:51 [INFO] [stdout] | [INFO] [stdout] 168 | alsa_error!(snd_seq_open(&mut out_client, "default\0".as_ptr(), SND_SEQ_OPEN_OUTPUT, 0)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"default"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:169:57 [INFO] [stdout] | [INFO] [stdout] 169 | alsa_error!(snd_seq_set_client_name(out_client, "Makepad Midi Out\0".as_ptr())) ?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi Out"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | "Makepad Midi In\0".as_ptr(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi In"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:180:55 [INFO] [stdout] | [INFO] [stdout] 180 | let mut subs: *mut snd_seq_port_subscribe_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | "Makepad Midi Out\0".as_ptr(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi Out"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:203:52 [INFO] [stdout] | [INFO] [stdout] 203 | let mut midi_send: *mut snd_midi_event_t = 0 as * mut _; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:219:59 [INFO] [stdout] | [INFO] [stdout] 219 | let mut client_info: *mut snd_seq_client_info_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:222:55 [INFO] [stdout] | [INFO] [stdout] 222 | let mut port_info: *mut snd_seq_port_info_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:306:52 [INFO] [stdout] | [INFO] [stdout] 306 | let mut ev: *mut snd_seq_event_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/alsa_midi.rs:364:28 [INFO] [stdout] | [INFO] [stdout] 364 | if senders.len()>0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!senders.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: this `if` statement can be collapsed [INFO] [stdout] --> src/os/linux/alsa_midi.rs:435:13 [INFO] [stdout] | [INFO] [stdout] 435 | / if ports.iter().find( | p | **p == port.desc.port_id).is_none() { [INFO] [stdout] 436 | | if port.desc.port_type.is_output() { [INFO] [stdout] 437 | | unsafe { [INFO] [stdout] 438 | | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [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] 435 ~ if ports.iter().find( | p | **p == port.desc.port_id).is_none() [INFO] [stdout] 436 ~ && port.desc.port_type.is_output() { [INFO] [stdout] 437 | unsafe { [INFO] [stdout] 438 | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] 439 | } [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/os/linux/alsa_midi.rs:460:13 [INFO] [stdout] | [INFO] [stdout] 460 | / if ports.iter().find( | p | **p == port.desc.port_id).is_none() { [INFO] [stdout] 461 | | if port.desc.port_type.is_input() { [INFO] [stdout] 462 | | unsafe { [INFO] [stdout] 463 | | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] ... | [INFO] [stdout] 466 | | } [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] 460 ~ if ports.iter().find( | p | **p == port.desc.port_id).is_none() [INFO] [stdout] 461 ~ && port.desc.port_type.is_input() { [INFO] [stdout] 462 | unsafe { [INFO] [stdout] 463 | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] 464 | } [INFO] [stdout] 465 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SelectTimers` [INFO] [stdout] --> src/os/linux/select_timer.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | Self { [INFO] [stdout] 25 | | timers: Default::default(), [INFO] [stdout] 26 | | time_start: Instant::now(), [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for SelectTimers { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/pulse_audio.rs:63:51 [INFO] [stdout] | [INFO] [stdout] 63 | let stream = pa_stream_new(pulse.context, "makepad input stream\0".as_ptr(), &sample_spec, std::ptr::null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"makepad input stream"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/pulse_audio.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | if stream == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stream.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:77:24 [INFO] [stdout] | [INFO] [stdout] 77 | maxlength: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 77 - maxlength: std::u32::MAX, [INFO] [stdout] 77 + maxlength: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | minreq: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 80 - minreq: std::u32::MAX, [INFO] [stdout] 80 + minreq: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:81:23 [INFO] [stdout] | [INFO] [stdout] 81 | fragsize: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 81 - fragsize: std::u32::MAX, [INFO] [stdout] 81 + fragsize: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/os/linux/pulse_audio.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | let mut input_fn = (*input).input_fn.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: try: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a `Box` from a void raw pointer [INFO] [stdout] --> src/os/linux/pulse_audio.rs:163:25 [INFO] [stdout] | [INFO] [stdout] 163 | let _ = Box::from_raw(output_ptr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: cast this to a pointer of the appropriate type [INFO] [stdout] --> src/os/linux/pulse_audio.rs:163:39 [INFO] [stdout] | [INFO] [stdout] 163 | let _ = Box::from_raw(output_ptr); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_raw_with_void_ptr [INFO] [stdout] = note: `#[warn(clippy::from_raw_with_void_ptr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/libc_sys.rs:63:1 [INFO] [stdout] | [INFO] [stdout] 63 | pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/pulse_audio.rs:194:51 [INFO] [stdout] | [INFO] [stdout] 194 | let stream = pa_stream_new(pulse.context, "makepad output stream\0".as_ptr(), &sample_spec, std::ptr::null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"makepad output stream"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/os/linux/libc_sys.rs:63:50 [INFO] [stdout] | [INFO] [stdout] 63 | pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/pulse_audio.rs:195:12 [INFO] [stdout] | [INFO] [stdout] 195 | if stream == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stream.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/os/linux/libc_sys.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | return [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 66 - (*set).fds_bits[fd / size] |= 1 << (fd % size); [INFO] [stdout] 67 - return [INFO] [stdout] 66 + (*set).fds_bits[fd / size] |= 1 << (fd % size); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/os/linux/libc_sys.rs:70:1 [INFO] [stdout] | [INFO] [stdout] 70 | pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | maxlength: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 210 - maxlength: std::u32::MAX, [INFO] [stdout] 210 + maxlength: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/os/linux/libc_sys.rs:70:40 [INFO] [stdout] | [INFO] [stdout] 70 | pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | minreq: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 213 - minreq: std::u32::MAX, [INFO] [stdout] 213 + minreq: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:214:23 [INFO] [stdout] | [INFO] [stdout] 214 | fragsize: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 214 - fragsize: std::u32::MAX, [INFO] [stdout] 214 + fragsize: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/pulse_audio.rs:247:12 [INFO] [stdout] | [INFO] [stdout] 247 | if op == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `op.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/os/linux/pulse_audio.rs:283:33 [INFO] [stdout] | [INFO] [stdout] 283 | let mut output_fn = (*output).output_fn.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: try: `output` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/pulse_audio.rs:376:71 [INFO] [stdout] | [INFO] [stdout] 376 | let context = pa_context_new_with_proplist(main_loop_api, "makepad\0".as_ptr(), prop_list); [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"makepad"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/os/linux/pulse_audio.rs:378:25 [INFO] [stdout] | [INFO] [stdout] 378 | let pulse = Arc::new(Mutex::new( [INFO] [stdout] | _________________________^ [INFO] [stdout] 379 | | PulseAudioAccess { [INFO] [stdout] 380 | | buffer_frames: 256, [INFO] [stdout] 381 | | audio_inputs: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 395 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>` is not `Send` and `Sync` as `Mutex` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `*mut pa_context` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/pulse_audio.rs:385:30 [INFO] [stdout] | [INFO] [stdout] 385 | context: context.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `context` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/os/linux/pulse_audio.rs:512:13 [INFO] [stdout] | [INFO] [stdout] 512 | query.main_loop = Some(self.main_loop); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `os::linux::pulse_audio::PulseDeviceQuery { main_loop: Some(self.main_loop), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/os/linux/pulse_audio.rs:511:13 [INFO] [stdout] | [INFO] [stdout] 511 | let mut query = PulseDeviceQuery::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` 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/os/linux/opengl.rs:276:37 [INFO] [stdout] | [INFO] [stdout] 276 | self.call_event_handler(&event); [INFO] [stdout] | ^^^^^^ help: change this to: `event` [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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/os/linux/opengl.rs:441:29 [INFO] [stdout] | [INFO] [stdout] 441 | (gl.glViewport)(x as i32, y as i32, width as i32, height as i32); [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:476:67 [INFO] [stdout] | [INFO] [stdout] 476 | if let Some(item) = self.draw_shaders.ptr_to_item.get(&draw_shader_ptr) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `draw_shader_ptr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:478:81 [INFO] [stdout] | [INFO] [stdout] 478 | let draw_shader_def = self.shader_registry.draw_shader_defs.get(&draw_shader_ptr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `draw_shader_ptr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:620:63 [INFO] [stdout] | [INFO] [stdout] 620 | let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:620:83 [INFO] [stdout] | [INFO] [stdout] 620 | let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/os/linux/opengl.rs:623:17 [INFO] [stdout] | [INFO] [stdout] 623 | / ... match os_type { [INFO] [stdout] 624 | | ... OsType::Android(params) => { [INFO] [stdout] 625 | | ... base_filename = format!("{}_av{}_bn{}_kv{}", base_filename, params.android_version, params.build_number, params.ker... [INFO] [stdout] 626 | | ... }, [INFO] [stdout] 627 | | ... _ => (), [INFO] [stdout] 628 | | ... }; [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] 623 ~ if let OsType::Android(params) = os_type { [INFO] [stdout] 624 + base_filename = format!("{}_av{}_bn{}_kv{}", base_filename, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 625 ~ }; [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/os/linux/opengl.rs:642:37 [INFO] [stdout] | [INFO] [stdout] 642 | / ... match os_type { [INFO] [stdout] 643 | | ... OsType::Android(params) => { [INFO] [stdout] 644 | | ... let current_filename = format!("{}/shader_{:08x}_av{}_bn{}_kv{}.bin", cache_dir, shader_hash.0, params.android_vers... [INFO] [stdout] 645 | | ... version_consistency_conflict = filename != current_filename; [INFO] [stdout] 646 | | ... }, [INFO] [stdout] 647 | | ... _ => (), [INFO] [stdout] 648 | | ... }; [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] 642 ~ if let OsType::Android(params) = os_type { [INFO] [stdout] 643 + let current_filename = format!("{}/shader_{:08x}_av{}_bn{}_kv{}.bin", cache_dir, shader_hash.0, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 644 + version_consistency_conflict = filename != current_filename; [INFO] [stdout] 645 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/os/linux/opengl.rs:779:13 [INFO] [stdout] | [INFO] [stdout] 771 | / let t = Self{ [INFO] [stdout] 772 | | program, [INFO] [stdout] 773 | | geometries:Self::opengl_get_attributes(gl, program, "packed_geometry_", mapping.geometries.total_slots), [INFO] [stdout] 774 | | instances: Self::opengl_get_attributes(gl, program, "packed_instance_", mapping.instances.total_slots), [INFO] [stdout] ... | [INFO] [stdout] 777 | | uniforms [INFO] [stdout] 778 | | }; [INFO] [stdout] | |______________- unnecessary `let` binding [INFO] [stdout] 779 | t [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 771 ~ [INFO] [stdout] 772 ~ Self{ [INFO] [stdout] 773 + program, [INFO] [stdout] 774 + geometries:Self::opengl_get_attributes(gl, program, "packed_geometry_", mapping.geometries.total_slots), [INFO] [stdout] 775 + instances: Self::opengl_get_attributes(gl, program, "packed_instance_", mapping.instances.total_slots), [INFO] [stdout] 776 + textures: Self::opengl_get_texture_slots(gl, program, &mapping.textures), [INFO] [stdout] 777 + xr_depth_texture: Self::opengl_get_uniform(gl, program, "xr_depth_texture"), [INFO] [stdout] 778 + uniforms [INFO] [stdout] 779 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:682:65 [INFO] [stdout] | [INFO] [stdout] 682 | let program = if let Some(program) = read_cache(gl, &vertex,&pixel,os_type){ [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:682:73 [INFO] [stdout] | [INFO] [stdout] 682 | let program = if let Some(program) = read_cache(gl, &vertex,&pixel,os_type){ [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:690:91 [INFO] [stdout] | [INFO] [stdout] 690 | if let Some(error) = Self::opengl_has_shader_error(gl, true, vs as usize, &vertex) { [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:697:91 [INFO] [stdout] | [INFO] [stdout] 697 | if let Some(error) = Self::opengl_has_shader_error(gl, true, fs as usize, &pixel) { [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/web_socket.rs:82:80 [INFO] [stdout] | [INFO] [stdout] 82 | write_bytes_to_tcp_stream_no_error(&mut output_stream, &data.as_bytes()){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `data.as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:723:75 [INFO] [stdout] | [INFO] [stdout] 723 | ... let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^^ help: change this to: `vertex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/opengl.rs:723:95 [INFO] [stdout] | [INFO] [stdout] 723 | ... let shader_hash = live_id!(shader).str_append(&vertex).str_append(&pixel); [INFO] [stdout] | ^^^^^^ help: change this to: `pixel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/os/linux/opengl.rs:726:29 [INFO] [stdout] | [INFO] [stdout] 726 | / ... match os_type { [INFO] [stdout] 727 | | ... OsType::Android(params) => { [INFO] [stdout] 728 | | ... filename = format!("{}_av{}_bn{}_kv{}", filename, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 729 | | ... }, [INFO] [stdout] 730 | | ... _ => (), [INFO] [stdout] 731 | | ... }; [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] 726 ~ if let OsType::Android(params) = os_type { [INFO] [stdout] 727 + filename = format!("{}_av{}_bn{}_kv{}", filename, params.android_version, params.build_number, params.kernel_version); [INFO] [stdout] 728 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/opengl.rs:765:16 [INFO] [stdout] | [INFO] [stdout] 765 | if ct.len()>0 { [INFO] [stdout] | ^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ct.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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/live_prims.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(_) = Animator::last_keyframe_value_from_array(index, nodes) { [INFO] [stdout] | -------^^^^^^^--------------------------------------------------------- help: try: `if Animator::last_keyframe_value_from_array(index, nodes).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:60:25 [INFO] [stdout] | [INFO] [stdout] 60 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cx` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:63:28 [INFO] [stdout] | [INFO] [stdout] 63 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:60:38 [INFO] [stdout] | [INFO] [stdout] 60 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:63:32 [INFO] [stdout] | [INFO] [stdout] 63 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:835:13 [INFO] [stdout] | [INFO] [stdout] 835 | r.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `r.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:839:17 [INFO] [stdout] | [INFO] [stdout] 839 | r.push_str(":"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `r.push(':')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:841:17 [INFO] [stdout] | [INFO] [stdout] 841 | r.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `r.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:83:38 [INFO] [stdout] | [INFO] [stdout] 83 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:95:36 [INFO] [stdout] | [INFO] [stdout] 95 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:885:13 [INFO] [stdout] | [INFO] [stdout] 885 | name0.push_str("\0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `name0.push('\0')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:141:28 [INFO] [stdout] | [INFO] [stdout] 141 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] = note: `#[warn(clippy::unneeded_struct_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:113:38 [INFO] [stdout] | [INFO] [stdout] 113 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:137:36 [INFO] [stdout] | [INFO] [stdout] 137 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/os/linux/opengl.rs:917:13 [INFO] [stdout] | [INFO] [stdout] 917 | name0.push_str("\0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `name0.push('\0')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:178:28 [INFO] [stdout] | [INFO] [stdout] 178 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:160:38 [INFO] [stdout] | [INFO] [stdout] 160 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:183:36 [INFO] [stdout] | [INFO] [stdout] 183 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/live_prims.rs:237:28 [INFO] [stdout] | [INFO] [stdout] 237 | LiveValue::Float64(*self as f64) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/opengl.rs:1112:12 [INFO] [stdout] | [INFO] [stdout] 1112 | if string_ptr == ptr::null(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `string_ptr.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:220:28 [INFO] [stdout] | [INFO] [stdout] 220 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:202:38 [INFO] [stdout] | [INFO] [stdout] 202 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:225:36 [INFO] [stdout] | [INFO] [stdout] 225 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/live_prims.rs:255:25 [INFO] [stdout] | [INFO] [stdout] 255 | *self = *val as i64; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `*val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:262:28 [INFO] [stdout] | [INFO] [stdout] 262 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:244:38 [INFO] [stdout] | [INFO] [stdout] 244 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:267:36 [INFO] [stdout] | [INFO] [stdout] 267 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/live_prims.rs:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | *self = *val as u64; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `*val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:304:28 [INFO] [stdout] | [INFO] [stdout] 304 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:286:38 [INFO] [stdout] | [INFO] [stdout] 286 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:309:36 [INFO] [stdout] | [INFO] [stdout] 309 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/os/linux/opengl.rs:1321:29 [INFO] [stdout] | [INFO] [stdout] 1321 | ... 0 as *const _ [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `std::ptr::null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:346:28 [INFO] [stdout] | [INFO] [stdout] 346 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:328:38 [INFO] [stdout] | [INFO] [stdout] 328 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:351:36 [INFO] [stdout] | [INFO] [stdout] 351 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:388:28 [INFO] [stdout] | [INFO] [stdout] 388 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:370:38 [INFO] [stdout] | [INFO] [stdout] 370 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:393:36 [INFO] [stdout] | [INFO] [stdout] 393 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:430:28 [INFO] [stdout] | [INFO] [stdout] 430 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:412:38 [INFO] [stdout] | [INFO] [stdout] 412 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:435:36 [INFO] [stdout] | [INFO] [stdout] 435 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DVec2` which implements the `Copy` trait [INFO] [stdout] --> src/live_prims.rs:494:25 [INFO] [stdout] | [INFO] [stdout] 494 | LiveValue::Vec2(self.clone().into()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Vec2` which implements the `Copy` trait [INFO] [stdout] --> src/live_prims.rs:474:25 [INFO] [stdout] | [INFO] [stdout] 474 | *self = val.clone().into(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `(*val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:483:28 [INFO] [stdout] | [INFO] [stdout] 483 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:455:38 [INFO] [stdout] | [INFO] [stdout] 455 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:479:36 [INFO] [stdout] | [INFO] [stdout] 479 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/os/linux/opengl.rs:1567:17 [INFO] [stdout] | [INFO] [stdout] 1567 | (data.len() * mem::size_of::()) as gl_sys::GLsizeiptr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/live_prims.rs:512:35 [INFO] [stdout] | [INFO] [stdout] 512 | *self = Vec2::all(*v as f32); [INFO] [stdout] | ^^^^^^^^^ help: try: `(*v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:529:28 [INFO] [stdout] | [INFO] [stdout] 529 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:501:38 [INFO] [stdout] | [INFO] [stdout] 501 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:525:36 [INFO] [stdout] | [INFO] [stdout] 525 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/os/linux/opengl.rs:1583:17 [INFO] [stdout] | [INFO] [stdout] 1583 | (data.len() * mem::size_of::()) as gl_sys::GLsizeiptr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/os/linux/opengl.rs:1600:17 [INFO] [stdout] | [INFO] [stdout] 1600 | (data.len() * mem::size_of::()) as gl_sys::GLsizeiptr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/live_prims.rs:562:35 [INFO] [stdout] | [INFO] [stdout] 562 | *self = Vec3::all(*v as f32); [INFO] [stdout] | ^^^^^^^^^ help: try: `(*v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:579:28 [INFO] [stdout] | [INFO] [stdout] 579 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/os/linux/module_loader.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn load(path: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:547:38 [INFO] [stdout] | [INFO] [stdout] 547 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:575:36 [INFO] [stdout] | [INFO] [stdout] 575 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/os/linux/module_loader.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn get_symbol(&self, name: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/live_prims.rs:620:35 [INFO] [stdout] | [INFO] [stdout] 620 | *self = Vec4::all(*v as f32); [INFO] [stdout] | ^^^^^^^^^ help: try: `(*v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:637:28 [INFO] [stdout] | [INFO] [stdout] 637 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:597:38 [INFO] [stdout] | [INFO] [stdout] 597 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:633:36 [INFO] [stdout] | [INFO] [stdout] 633 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:664:28 [INFO] [stdout] | [INFO] [stdout] 664 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:656:38 [INFO] [stdout] | [INFO] [stdout] 656 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:660:36 [INFO] [stdout] | [INFO] [stdout] 660 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/live_prims.rs:729:58 [INFO] [stdout] | [INFO] [stdout] 729 | if let Some(inline_str) = InlineString::from_str(&self) { [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:699:28 [INFO] [stdout] | [INFO] [stdout] 699 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:682:38 [INFO] [stdout] | [INFO] [stdout] 682 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:704:36 [INFO] [stdout] | [INFO] [stdout] 704 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:751:17 [INFO] [stdout] | [INFO] [stdout] 751 | return rc.clone(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 751 - return rc.clone(); [INFO] [stdout] 751 + rc.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:754:17 [INFO] [stdout] | [INFO] [stdout] 754 | return Arc::new(s.clone()) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 754 - return Arc::new(s.clone()) [INFO] [stdout] 754 + Arc::new(s.clone()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_mut` can be confused for the standard trait method `std::convert::AsMut::as_mut` [INFO] [stdout] --> src/live_prims.rs:758:5 [INFO] [stdout] | [INFO] [stdout] 758 | / pub fn as_mut(&mut self)->&mut String{ [INFO] [stdout] 759 | | match self{ [INFO] [stdout] 760 | | Self::Arc(rc)=>{ [INFO] [stdout] 761 | | *self = Self::String(rc.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 768 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::convert::AsMut` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:762:17 [INFO] [stdout] | [INFO] [stdout] 762 | return self.as_mut(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 762 - return self.as_mut(); [INFO] [stdout] 762 + self.as_mut() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:765:17 [INFO] [stdout] | [INFO] [stdout] 765 | return s [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 765 - return s [INFO] [stdout] 765 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:773:17 [INFO] [stdout] | [INFO] [stdout] 773 | return self.as_mut(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 773 - return self.as_mut(); [INFO] [stdout] 773 + self.as_mut() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:777:17 [INFO] [stdout] | [INFO] [stdout] 777 | return s [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 777 - return s [INFO] [stdout] 777 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_ref` can be confused for the standard trait method `std::convert::AsRef::as_ref` [INFO] [stdout] --> src/live_prims.rs:794:5 [INFO] [stdout] | [INFO] [stdout] 794 | / pub fn as_ref(&self)->&str{ [INFO] [stdout] 795 | | match self{ [INFO] [stdout] 796 | | Self::Arc(rc)=>{ [INFO] [stdout] 797 | | &*rc [INFO] [stdout] ... | [INFO] [stdout] 803 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::convert::AsRef` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:800:17 [INFO] [stdout] | [INFO] [stdout] 800 | return &s [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 800 - return &s [INFO] [stdout] 800 + &s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/live_prims.rs:797:17 [INFO] [stdout] | [INFO] [stdout] 797 | &*rc [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 797 - &*rc [INFO] [stdout] 797 + rc [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 797 | &**rc [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/live_prims.rs:800:24 [INFO] [stdout] | [INFO] [stdout] 800 | return &s [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/live_prims.rs:854:58 [INFO] [stdout] | [INFO] [stdout] 854 | if let Some(inline_str) = InlineString::from_str(&self.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:824:28 [INFO] [stdout] | [INFO] [stdout] 824 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/os/linux/ipc.rs:25:14 [INFO] [stdout] | [INFO] [stdout] 25 | _marker: PhantomData<(fn(TX) -> RX, fn(RX) -> TX)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/os/linux/ipc.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 174 - io::Error::new(io::ErrorKind::Other, error) [INFO] [stdout] 174 + io::Error::other(error) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:810:38 [INFO] [stdout] | [INFO] [stdout] 810 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:829:36 [INFO] [stdout] | [INFO] [stdout] 829 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/os/linux/ipc.rs:205:27 [INFO] [stdout] | [INFO] [stdout] 205 | const _: () = assert!(std::mem::size_of::() % std::mem::size_of::() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `std::mem::size_of::().is_multiple_of(std::mem::size_of::())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_ref` can be confused for the standard trait method `std::convert::AsRef::as_ref` [INFO] [stdout] --> src/live_prims.rs:939:5 [INFO] [stdout] | [INFO] [stdout] 939 | pub fn as_ref(&self)->&Arc{&self.0} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::convert::AsRef` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:952:28 [INFO] [stdout] | [INFO] [stdout] 952 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/os/linux/ipc.rs:317:39 [INFO] [stdout] | [INFO] [stdout] 317 | return Err(io_error_other(format!("unsupported non-SCM_RIGHTS CMSG"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"unsupported non-SCM_RIGHTS CMSG".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cx.rs:109:32 [INFO] [stdout] | [INFO] [stdout] 109 | pub (crate) event_handler: Option>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/os/linux/ipc.rs:321:39 [INFO] [stdout] | [INFO] [stdout] 321 | return Err(io_error_other(format!("recvmsg got invalid (-1) fds"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"recvmsg got invalid (-1) fds".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/os/linux/ipc.rs:371:29 [INFO] [stdout] | [INFO] [stdout] 371 | .ok_or_else(|| io::Error::last_os_error())? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `io::Error::last_os_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/cx.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / match self{ [INFO] [stdout] 203 | | OsType::Web(_) => true, [INFO] [stdout] 204 | | OsType::Ios=>true, [INFO] [stdout] 205 | | OsType::Android(_) => true, [INFO] [stdout] 206 | | OsType::LinuxDirect=> true, [INFO] [stdout] 207 | | _=> false [INFO] [stdout] 208 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 202 - match self{ [INFO] [stdout] 203 - OsType::Web(_) => true, [INFO] [stdout] 204 - OsType::Ios=>true, [INFO] [stdout] 205 - OsType::Android(_) => true, [INFO] [stdout] 206 - OsType::LinuxDirect=> true, [INFO] [stdout] 207 - _=> false [INFO] [stdout] 208 - } [INFO] [stdout] 202 + matches!(self, OsType::Web(_) | OsType::Ios | OsType::Android(_) | OsType::LinuxDirect) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/cx.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | / match self { [INFO] [stdout] 212 | | OsType::Web(_) => true, [INFO] [stdout] 213 | | _ => false [INFO] [stdout] 214 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 211 - match self { [INFO] [stdout] 212 - OsType::Web(_) => true, [INFO] [stdout] 213 - _ => false [INFO] [stdout] 214 - } [INFO] [stdout] 211 + matches!(self, OsType::Web(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cx.rs:238:31 [INFO] [stdout] | [INFO] [stdout] 238 | pub fn new(event_handler: Box) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/cx_api.rs:322:64 [INFO] [stdout] | [INFO] [stdout] 322 | if let Some(p) = self.platform_ops.iter_mut().find(|p| match p { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 323 | | CxOsOp::SetCursor(_) => true, [INFO] [stdout] 324 | | _ => false, [INFO] [stdout] 325 | | }) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 322 - if let Some(p) = self.platform_ops.iter_mut().find(|p| match p { [INFO] [stdout] 323 - CxOsOp::SetCursor(_) => true, [INFO] [stdout] 324 - _ => false, [INFO] [stdout] 325 - }) { [INFO] [stdout] 322 + if let Some(p) = self.platform_ops.iter_mut().find(|p| matches!(p, CxOsOp::SetCursor(_))) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/os/linux/alsa_audio.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let _ = std::thread::sleep(std::time::Duration::new(1, 0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 71 - let _ = std::thread::sleep(std::time::Duration::new(1, 0)); [INFO] [stdout] 71 + std::thread::sleep(std::time::Duration::new(1, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cx_api.rs:372:9 [INFO] [stdout] | [INFO] [stdout] 372 | return 1.0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 372 - return 1.0; [INFO] [stdout] 372 + 1.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:100:55 [INFO] [stdout] | [INFO] [stdout] 100 | let mut hints: *mut *mut c_void = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:101:64 [INFO] [stdout] | [INFO] [stdout] 101 | alsa_error!(snd_device_name_hint(card_num, "pcm\0".as_ptr(), &mut hints)) ?; [INFO] [stdout] | ^^^^^^^ help: use a `c""` literal: `c"pcm"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/alsa_audio.rs:105:27 [INFO] [stdout] | [INFO] [stdout] 105 | while *hints.offset(index) != std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(*hints.offset(index)).is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:107:92 [INFO] [stdout] | [INFO] [stdout] 107 | let name_str = from_alsa_string(snd_device_name_get_hint(hint_ptr, "NAME\0".as_ptr())).unwrap_or("".into()); [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"NAME"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:108:92 [INFO] [stdout] | [INFO] [stdout] 108 | ... let desc_str = from_alsa_string(snd_device_name_get_hint(hint_ptr, "DESC\0".as_ptr())).unwrap_or("".into()).replace("\n", " "); [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"DESC"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_audio.rs:109:88 [INFO] [stdout] | [INFO] [stdout] 109 | let ioid = from_alsa_string(snd_device_name_get_hint(hint_ptr, "IOID\0".as_ptr())).unwrap_or("".into()); [INFO] [stdout] | ^^^^^^^^ help: use a `c""` literal: `c"IOID"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/os/linux/alsa_audio.rs:119:28 [INFO] [stdout] | [INFO] [stdout] 119 | if ioid == "" || ioid == "Input" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ioid.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/os/linux/alsa_audio.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | if ioid == "" || ioid == "Output" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ioid.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/cx_api.rs:599:13 [INFO] [stdout] | [INFO] [stdout] 599 | / let mut new_set = Vec::new(); [INFO] [stdout] 600 | | new_set.push(trigger); [INFO] [stdout] | |__________________________________^ help: consider using the `vec![]` macro: `let new_set = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` 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/os/linux/alsa_audio.rs:207:25 [INFO] [stdout] | [INFO] [stdout] 207 | / match device.read_input_buffer(&mut audio_buffer) { [INFO] [stdout] 208 | | Err(e) => { [INFO] [stdout] 209 | | println!("Write output buffer error {}", e.0); [INFO] [stdout] 210 | | break; [INFO] [stdout] 211 | | } [INFO] [stdout] 212 | | Ok(_) => () [INFO] [stdout] 213 | | } [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] 207 ~ if let Err(e) = device.read_input_buffer(&mut audio_buffer) { [INFO] [stdout] 208 + println!("Write output buffer error {}", e.0); [INFO] [stdout] 209 + break; [INFO] [stdout] 210 + } [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/os/linux/alsa_audio.rs:282:25 [INFO] [stdout] | [INFO] [stdout] 282 | / match device.write_output_buffer(&audio_buffer) { [INFO] [stdout] 283 | | Err(e) => { [INFO] [stdout] 284 | | println!("Write output buffer error {}", e.0); [INFO] [stdout] 285 | | break; [INFO] [stdout] 286 | | } [INFO] [stdout] 287 | | Ok(_) => () [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] 282 ~ if let Err(e) = device.write_output_buffer(&audio_buffer) { [INFO] [stdout] 283 + println!("Write output buffer error {}", e.0); [INFO] [stdout] 284 + break; [INFO] [stdout] 285 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:307:46 [INFO] [stdout] | [INFO] [stdout] 307 | let mut handle: *mut snd_pcm_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:308:59 [INFO] [stdout] | [INFO] [stdout] 308 | let mut hw_params: *mut snd_pcm_hw_params_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:316:87 [INFO] [stdout] | [INFO] [stdout] 316 | alsa_error!(snd_pcm_hw_params_set_rate_near(handle, hw_params, &mut rate, 0 as *mut _)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_audio.rs:330:88 [INFO] [stdout] | [INFO] [stdout] 330 | alsa_error!(snd_pcm_hw_params_get_period_size(hw_params, &mut frame_count, 0 as *mut _)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_traits.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | return ret [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return ret [INFO] [stdout] 86 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/os/linux/alsa_midi.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let _ = self.0.lock().unwrap().send_midi(port_id, d); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 29 - let _ = self.0.lock().unwrap().send_midi(port_id, d); [INFO] [stdout] 29 + self.0.lock().unwrap().send_midi(port_id, d); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_traits.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | return ret [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 112 - return ret [INFO] [stdout] 112 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:118:55 [INFO] [stdout] | [INFO] [stdout] 118 | let mut subs: *mut snd_seq_port_subscribe_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:162:45 [INFO] [stdout] | [INFO] [stdout] 162 | let mut in_client: *mut snd_seq_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:163:50 [INFO] [stdout] | [INFO] [stdout] 163 | alsa_error!(snd_seq_open(&mut in_client, "default\0".as_ptr(), SND_SEQ_OPEN_INPUT, 0)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"default"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:164:56 [INFO] [stdout] | [INFO] [stdout] 164 | alsa_error!(snd_seq_set_client_name(in_client, "Makepad Midi In\0".as_ptr())) ?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi In"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `self` [INFO] [stdout] --> src/live_traits.rs:202:18 [INFO] [stdout] | [INFO] [stdout] 202 | for i in 0..N{ [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 202 - for i in 0..N{ [INFO] [stdout] 202 + for (i, ) in self.iter().enumerate().take(N){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:167:46 [INFO] [stdout] | [INFO] [stdout] 167 | let mut out_client: *mut snd_seq_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:168:51 [INFO] [stdout] | [INFO] [stdout] 168 | alsa_error!(snd_seq_open(&mut out_client, "default\0".as_ptr(), SND_SEQ_OPEN_OUTPUT, 0)) ?; [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"default"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:169:57 [INFO] [stdout] | [INFO] [stdout] 169 | alsa_error!(snd_seq_set_client_name(out_client, "Makepad Midi Out\0".as_ptr())) ?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi Out"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | "Makepad Midi In\0".as_ptr(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi In"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:180:55 [INFO] [stdout] | [INFO] [stdout] 180 | let mut subs: *mut snd_seq_port_subscribe_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/alsa_midi.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | "Makepad Midi Out\0".as_ptr(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"Makepad Midi Out"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:203:52 [INFO] [stdout] | [INFO] [stdout] 203 | let mut midi_send: *mut snd_midi_event_t = 0 as * mut _; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:219:59 [INFO] [stdout] | [INFO] [stdout] 219 | let mut client_info: *mut snd_seq_client_info_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:222:55 [INFO] [stdout] | [INFO] [stdout] 222 | let mut port_info: *mut snd_seq_port_info_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 262 | / match self { [INFO] [stdout] 263 | | Self::NewFromDoc {..} => true, [INFO] [stdout] 264 | | Self::UpdateFromDoc {..} => true, [INFO] [stdout] 265 | | _ => false [INFO] [stdout] 266 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 262 - match self { [INFO] [stdout] 263 - Self::NewFromDoc {..} => true, [INFO] [stdout] 264 - Self::UpdateFromDoc {..} => true, [INFO] [stdout] 265 - _ => false [INFO] [stdout] 266 - } [INFO] [stdout] 262 + matches!(self, Self::NewFromDoc {..} | Self::UpdateFromDoc {..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 270 | / match self { [INFO] [stdout] 271 | | Self::NewFromDoc {..} => true, [INFO] [stdout] 272 | | _ => false [INFO] [stdout] 273 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 270 - match self { [INFO] [stdout] 271 - Self::NewFromDoc {..} => true, [INFO] [stdout] 272 - _ => false [INFO] [stdout] 273 - } [INFO] [stdout] 270 + matches!(self, Self::NewFromDoc {..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:277:9 [INFO] [stdout] | [INFO] [stdout] 277 | / match self { [INFO] [stdout] 278 | | Self::UpdateFromDoc{..} => true, [INFO] [stdout] 279 | | _ => false [INFO] [stdout] 280 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 277 - match self { [INFO] [stdout] 278 - Self::UpdateFromDoc{..} => true, [INFO] [stdout] 279 - _ => false [INFO] [stdout] 280 - } [INFO] [stdout] 277 + matches!(self, Self::UpdateFromDoc{..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:284:9 [INFO] [stdout] | [INFO] [stdout] 284 | / match self { [INFO] [stdout] 285 | | Self::UpdateFromDoc {..} => true, [INFO] [stdout] 286 | | _ => false [INFO] [stdout] 287 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 284 - match self { [INFO] [stdout] 285 - Self::UpdateFromDoc {..} => true, [INFO] [stdout] 286 - _ => false [INFO] [stdout] 287 - } [INFO] [stdout] 284 + matches!(self, Self::UpdateFromDoc {..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/os/linux/alsa_midi.rs:306:52 [INFO] [stdout] | [INFO] [stdout] 306 | let mut ev: *mut snd_seq_event_t = 0 as *mut _; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `std::ptr::null_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/os/linux/alsa_midi.rs:364:28 [INFO] [stdout] | [INFO] [stdout] 364 | if senders.len()>0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!senders.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: this `if` statement can be collapsed [INFO] [stdout] --> src/os/linux/alsa_midi.rs:435:13 [INFO] [stdout] | [INFO] [stdout] 435 | / if ports.iter().find( | p | **p == port.desc.port_id).is_none() { [INFO] [stdout] 436 | | if port.desc.port_type.is_output() { [INFO] [stdout] 437 | | unsafe { [INFO] [stdout] 438 | | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [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] 435 ~ if ports.iter().find( | p | **p == port.desc.port_id).is_none() [INFO] [stdout] 436 ~ && port.desc.port_type.is_output() { [INFO] [stdout] 437 | unsafe { [INFO] [stdout] 438 | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] 439 | } [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/os/linux/alsa_midi.rs:460:13 [INFO] [stdout] | [INFO] [stdout] 460 | / if ports.iter().find( | p | **p == port.desc.port_id).is_none() { [INFO] [stdout] 461 | | if port.desc.port_type.is_input() { [INFO] [stdout] 462 | | unsafe { [INFO] [stdout] 463 | | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] ... | [INFO] [stdout] 466 | | } [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] 460 ~ if ports.iter().find( | p | **p == port.desc.port_id).is_none() [INFO] [stdout] 461 ~ && port.desc.port_type.is_input() { [INFO] [stdout] 462 | unsafe { [INFO] [stdout] 463 | port.unsubscribe(self.client.as_ref().unwrap()) [INFO] [stdout] 464 | } [INFO] [stdout] 465 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/live_cx.rs:119:48 [INFO] [stdout] | [INFO] [stdout] 119 | self.apply_error(origin, index, nodes, format!("Newed empty ClassName, forgot to call 'use'")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Newed empty ClassName, forgot to call 'use'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/live_cx.rs:127:48 [INFO] [stdout] | [INFO] [stdout] 127 | self.apply_error(origin, index, nodes, format!("animate missing apply:{{}} block")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"animate missing apply:{} block".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/live_cx.rs:134:52 [INFO] [stdout] | [INFO] [stdout] 134 | self.apply_error(origin, index, nodes, format!("Video Player widget is currently only supported on Android")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Video Player widget is currently only supported on Android".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SelectTimers` [INFO] [stdout] --> src/os/linux/select_timer.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | Self { [INFO] [stdout] 25 | | timers: Default::default(), [INFO] [stdout] 26 | | time_start: Instant::now(), [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for SelectTimers { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/pulse_audio.rs:63:51 [INFO] [stdout] | [INFO] [stdout] 63 | let stream = pa_stream_new(pulse.context, "makepad input stream\0".as_ptr(), &sample_spec, std::ptr::null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"makepad input stream"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/pulse_audio.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | if stream == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stream.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:77:24 [INFO] [stdout] | [INFO] [stdout] 77 | maxlength: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 77 - maxlength: std::u32::MAX, [INFO] [stdout] 77 + maxlength: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | minreq: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 80 - minreq: std::u32::MAX, [INFO] [stdout] 80 + minreq: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:81:23 [INFO] [stdout] | [INFO] [stdout] 81 | fragsize: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 81 - fragsize: std::u32::MAX, [INFO] [stdout] 81 + fragsize: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/live_cx.rs:228:16 [INFO] [stdout] | [INFO] [stdout] 228 | if changed_files.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!changed_files.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: deref which would be done by auto-deref [INFO] [stdout] --> src/os/linux/pulse_audio.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | let mut input_fn = (*input).input_fn.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: try: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [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/live_cx.rs:256:17 [INFO] [stdout] | [INFO] [stdout] 256 | / match msg { [INFO] [stdout] 257 | | WebSocketMessage::Binary(bin)=>{ [INFO] [stdout] 258 | | if let Ok(data) = StudioToAppVec::deserialize_bin(&bin){ [INFO] [stdout] 259 | | for data in data.0{ [INFO] [stdout] ... | [INFO] [stdout] 277 | | _=>() [INFO] [stdout] 278 | | } [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] 256 ~ if let WebSocketMessage::Binary(bin) = msg { [INFO] [stdout] 257 + if let Ok(data) = StudioToAppVec::deserialize_bin(&bin){ [INFO] [stdout] 258 + for data in data.0{ [INFO] [stdout] 259 + match data{ [INFO] [stdout] 260 + StudioToApp::LiveChange{file_name, content}=>{ [INFO] [stdout] 261 + all_changes.retain(|v| v.file_name != file_name); [INFO] [stdout] 262 + all_changes.push(LiveFileChange{file_name, content}) [INFO] [stdout] 263 + } [INFO] [stdout] 264 + StudioToApp::Screenshot(req)=>{ [INFO] [stdout] 265 + self.screenshot_requests.push(req); [INFO] [stdout] 266 + } [INFO] [stdout] 267 + StudioToApp::KeepAlive=>{} [INFO] [stdout] 268 + x=>{ [INFO] [stdout] 269 + actions.push(x); [INFO] [stdout] 270 + } [INFO] [stdout] 271 + } [INFO] [stdout] 272 + [INFO] [stdout] 273 + } [INFO] [stdout] 274 + } [INFO] [stdout] 275 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a `Box` from a void raw pointer [INFO] [stdout] --> src/os/linux/pulse_audio.rs:163:25 [INFO] [stdout] | [INFO] [stdout] 163 | let _ = Box::from_raw(output_ptr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: cast this to a pointer of the appropriate type [INFO] [stdout] --> src/os/linux/pulse_audio.rs:163:39 [INFO] [stdout] | [INFO] [stdout] 163 | let _ = Box::from_raw(output_ptr); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_raw_with_void_ptr [INFO] [stdout] = note: `#[warn(clippy::from_raw_with_void_ptr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/live_cx.rs:291:16 [INFO] [stdout] | [INFO] [stdout] 291 | if changes.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `changes.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: length comparison to zero [INFO] [stdout] --> src/live_cx.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if all_changes.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!all_changes.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: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/pulse_audio.rs:194:51 [INFO] [stdout] | [INFO] [stdout] 194 | let stream = pa_stream_new(pulse.context, "makepad output stream\0".as_ptr(), &sample_spec, std::ptr::null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"makepad output stream"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/pulse_audio.rs:195:12 [INFO] [stdout] | [INFO] [stdout] 195 | if stream == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stream.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | maxlength: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 210 - maxlength: std::u32::MAX, [INFO] [stdout] 210 + maxlength: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | minreq: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 213 - minreq: std::u32::MAX, [INFO] [stdout] 213 + minreq: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/os/linux/pulse_audio.rs:214:23 [INFO] [stdout] | [INFO] [stdout] 214 | fragsize: std::u32::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 214 - fragsize: std::u32::MAX, [INFO] [stdout] 214 + fragsize: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/os/linux/pulse_audio.rs:247:12 [INFO] [stdout] | [INFO] [stdout] 247 | if op == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `op.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/os/linux/pulse_audio.rs:283:33 [INFO] [stdout] | [INFO] [stdout] 283 | let mut output_fn = (*output).output_fn.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: try: `output` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually constructing a nul-terminated string [INFO] [stdout] --> src/os/linux/pulse_audio.rs:376:71 [INFO] [stdout] | [INFO] [stdout] 376 | let context = pa_context_new_with_proplist(main_loop_api, "makepad\0".as_ptr(), prop_list); [INFO] [stdout] | ^^^^^^^^^^^ help: use a `c""` literal: `c"makepad"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/os/linux/pulse_audio.rs:378:25 [INFO] [stdout] | [INFO] [stdout] 378 | let pulse = Arc::new(Mutex::new( [INFO] [stdout] | _________________________^ [INFO] [stdout] 379 | | PulseAudioAccess { [INFO] [stdout] 380 | | buffer_frames: 256, [INFO] [stdout] 381 | | audio_inputs: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 395 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>` is not `Send` and `Sync` as `Mutex` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `*mut pa_context` which implements the `Copy` trait [INFO] [stdout] --> src/os/linux/pulse_audio.rs:385:30 [INFO] [stdout] | [INFO] [stdout] 385 | context: context.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `context` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | impl Into for f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 179 ~ impl From for f32a { [INFO] [stdout] 180 ~ fn from(val: f32) -> Self { [INFO] [stdout] 181 ~ f32a(AtomicU32::new(val.to_bits())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:244:1 [INFO] [stdout] | [INFO] [stdout] 244 | impl Into for f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 244 ~ impl From for f64a { [INFO] [stdout] 245 ~ fn from(val: f64) -> Self { [INFO] [stdout] 246 ~ f64a(AtomicU64::new(val.to_bits())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/os/linux/pulse_audio.rs:512:13 [INFO] [stdout] | [INFO] [stdout] 512 | query.main_loop = Some(self.main_loop); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `os::linux::pulse_audio::PulseDeviceQuery { main_loop: Some(self.main_loop), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/os/linux/pulse_audio.rs:511:13 [INFO] [stdout] | [INFO] [stdout] 511 | let mut query = PulseDeviceQuery::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:305:1 [INFO] [stdout] | [INFO] [stdout] 305 | impl Into for u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 305 ~ impl From for u32a { [INFO] [stdout] 306 ~ fn from(val: u32) -> Self { [INFO] [stdout] 307 ~ u32a(AtomicU32::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:399:1 [INFO] [stdout] | [INFO] [stdout] 399 | impl Into for i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 399 ~ impl From for i64a { [INFO] [stdout] 400 ~ fn from(val: i64) -> Self { [INFO] [stdout] 401 ~ i64a(AtomicI64::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:467:1 [INFO] [stdout] | [INFO] [stdout] 467 | impl Into for i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 467 ~ impl From for i32a { [INFO] [stdout] 468 ~ fn from(val: i32) -> Self { [INFO] [stdout] 469 ~ i32a(AtomicI32::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:537:1 [INFO] [stdout] | [INFO] [stdout] 537 | impl Into for bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 537 ~ impl From for boola { [INFO] [stdout] 538 ~ fn from(val: bool) -> Self { [INFO] [stdout] 539 ~ boola(AtomicBool::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:210:12 [INFO] [stdout] | [INFO] [stdout] 210 | tasks: Arc> >>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:215:20 [INFO] [stdout] | [INFO] [stdout] 215 | let tasks: Arc> >> = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:246:12 [INFO] [stdout] | [INFO] [stdout] 246 | tasks: Arc) >> >, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:251:20 [INFO] [stdout] | [INFO] [stdout] 251 | let tasks: Arc) >> > = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/os/linux/web_socket.rs:82:80 [INFO] [stdout] | [INFO] [stdout] 82 | write_bytes_to_tcp_stream_no_error(&mut output_stream, &data.as_bytes()){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `data.as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/audio.rs:96:12 [INFO] [stdout] | [INFO] [stdout] 96 | if results.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `results.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: unneeded `return` statement [INFO] [stdout] --> src/audio.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return results [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return results [INFO] [stdout] 113 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/audio.rs:120:17 [INFO] [stdout] | [INFO] [stdout] 120 | let _ = write!(f,"Audio Devices:\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 120 - let _ = write!(f,"Audio Devices:\n"); [INFO] [stdout] 120 + let _ = writeln!(f,"Audio Devices:"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/live_prims.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(_) = Animator::last_keyframe_value_from_array(index, nodes) { [INFO] [stdout] | -------^^^^^^^--------------------------------------------------------- help: try: `if Animator::last_keyframe_value_from_array(index, nodes).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/audio.rs:122:20 [INFO] [stdout] | [INFO] [stdout] 122 | let _ = write!(f, "{}\n", d); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 122 - let _ = write!(f, "{}\n", d); [INFO] [stdout] 122 + let _ = writeln!(f, "{}", d); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:60:25 [INFO] [stdout] | [INFO] [stdout] 60 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cx` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:63:28 [INFO] [stdout] | [INFO] [stdout] 63 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:60:38 [INFO] [stdout] | [INFO] [stdout] 60 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:63:32 [INFO] [stdout] | [INFO] [stdout] 63 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/audio.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match self{ [INFO] [stdout] 138 | | AudioDeviceType::Input=>true, [INFO] [stdout] 139 | | _=>false [INFO] [stdout] 140 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 137 - match self{ [INFO] [stdout] 138 - AudioDeviceType::Input=>true, [INFO] [stdout] 139 - _=>false [INFO] [stdout] 140 - } [INFO] [stdout] 137 + matches!(self, AudioDeviceType::Input) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/audio.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / match self{ [INFO] [stdout] 144 | | AudioDeviceType::Output=>true, [INFO] [stdout] 145 | | _=>false [INFO] [stdout] 146 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 143 - match self{ [INFO] [stdout] 144 - AudioDeviceType::Output=>true, [INFO] [stdout] 145 - _=>false [INFO] [stdout] 146 - } [INFO] [stdout] 143 + matches!(self, AudioDeviceType::Output) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:83:38 [INFO] [stdout] | [INFO] [stdout] 83 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:95:36 [INFO] [stdout] | [INFO] [stdout] 95 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/audio.rs:201:23 [INFO] [stdout] | [INFO] [stdout] 201 | let mut out = Vec::new(); [INFO] [stdout] | _______________________^ [INFO] [stdout] 202 | | out.resize(self.data.len(), 0); [INFO] [stdout] | |______________________________________^ help: consider replacing this with: `vec![0; self.data.len()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `out` [INFO] [stdout] --> src/audio.rs:203:18 [INFO] [stdout] | [INFO] [stdout] 203 | for i in 0..self.data.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 203 - for i in 0..self.data.len() { [INFO] [stdout] 203 + for (i, ) in out.iter_mut().enumerate().take(self.data.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:141:28 [INFO] [stdout] | [INFO] [stdout] 141 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] = note: `#[warn(clippy::unneeded_struct_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/audio.rs:204:50 [INFO] [stdout] | [INFO] [stdout] 204 | let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 204 - let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] 204 + let f = (self.data[i] * 32767.0).max(i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/audio.rs:204:76 [INFO] [stdout] | [INFO] [stdout] 204 | let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 204 - let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] 204 + let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(i16::MAX as f32); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:113:38 [INFO] [stdout] | [INFO] [stdout] 113 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:137:36 [INFO] [stdout] | [INFO] [stdout] 137 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:178:28 [INFO] [stdout] | [INFO] [stdout] 178 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/audio.rs:244:44 [INFO] [stdout] | [INFO] [stdout] 244 | self.data.resize(frame_count * channel_count as usize, 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `channel_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:160:38 [INFO] [stdout] | [INFO] [stdout] 160 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:183:36 [INFO] [stdout] | [INFO] [stdout] 183 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/live_prims.rs:237:28 [INFO] [stdout] | [INFO] [stdout] 237 | LiveValue::Float64(*self as f64) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:220:28 [INFO] [stdout] | [INFO] [stdout] 220 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/midi.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | write!(f, "MIDI ports:\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 36 - write!(f, "MIDI ports:\n").unwrap(); [INFO] [stdout] 36 + writeln!(f, "MIDI ports:").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/midi.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | write!(f, "[Input] {}\n", desc.name).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 39 - write!(f, "[Input] {}\n", desc.name).unwrap() [INFO] [stdout] 39 + writeln!(f, "[Input] {}", desc.name).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/midi.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | write!(f, "[Output] {}\n", desc.name).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 42 - write!(f, "[Output] {}\n", desc.name).unwrap() [INFO] [stdout] 42 + writeln!(f, "[Output] {}", desc.name).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:202:38 [INFO] [stdout] | [INFO] [stdout] 202 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:225:36 [INFO] [stdout] | [INFO] [stdout] 225 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/midi.rs:84:78 [INFO] [stdout] | [INFO] [stdout] 84 | data: [((data >> 16) & 0xff) as u8, ((data >> 8) & 0xff) as u8, ((data >> 0) & 0xff) as u8] [INFO] [stdout] | ^^^^^^^^^^^ help: consider reducing it to: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/live_prims.rs:255:25 [INFO] [stdout] | [INFO] [stdout] 255 | *self = *val as i64; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `*val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:262:28 [INFO] [stdout] | [INFO] [stdout] 262 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/midi.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | / match self { [INFO] [stdout] 98 | | Self::Input => true, [INFO] [stdout] 99 | | _ => false [INFO] [stdout] 100 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 97 - match self { [INFO] [stdout] 98 - Self::Input => true, [INFO] [stdout] 99 - _ => false [INFO] [stdout] 100 - } [INFO] [stdout] 97 + matches!(self, Self::Input) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:244:38 [INFO] [stdout] | [INFO] [stdout] 244 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:267:36 [INFO] [stdout] | [INFO] [stdout] 267 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/midi.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | / match self { [INFO] [stdout] 104 | | Self::Output => true, [INFO] [stdout] 105 | | _ => false [INFO] [stdout] 106 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 103 - match self { [INFO] [stdout] 104 - Self::Output => true, [INFO] [stdout] 105 - _ => false [INFO] [stdout] 106 - } [INFO] [stdout] 103 + matches!(self, Self::Output) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/live_prims.rs:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | *self = *val as u64; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `*val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:304:28 [INFO] [stdout] | [INFO] [stdout] 304 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:129:1 [INFO] [stdout] | [INFO] [stdout] 129 | impl Into for MidiNote { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 129 ~ impl From for MidiData { [INFO] [stdout] 130 ~ fn from(val: MidiNote) -> Self { [INFO] [stdout] 131 | MidiData { [INFO] [stdout] 132 | data: [ [INFO] [stdout] 133 ~ (if val.is_on {0x9}else {0x8} << 4) | val.channel, [INFO] [stdout] 134 ~ val.note_number, [INFO] [stdout] 135 ~ val.velocity [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:286:38 [INFO] [stdout] | [INFO] [stdout] 286 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:309:36 [INFO] [stdout] | [INFO] [stdout] 309 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:149:1 [INFO] [stdout] | [INFO] [stdout] 149 | impl Into for MidiAftertouch { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 149 ~ impl From for MidiData { [INFO] [stdout] 150 ~ fn from(val: MidiAftertouch) -> Self { [INFO] [stdout] 151 | MidiData { [INFO] [stdout] 152 | data: [ [INFO] [stdout] 153 ~ 0xA0 | val.channel, [INFO] [stdout] 154 ~ val.note_number, [INFO] [stdout] 155 ~ val.velocity [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:346:28 [INFO] [stdout] | [INFO] [stdout] 346 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:168:1 [INFO] [stdout] | [INFO] [stdout] 168 | impl Into for MidiControlChange { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 168 ~ impl From for MidiData { [INFO] [stdout] 169 ~ fn from(val: MidiControlChange) -> Self { [INFO] [stdout] 170 | MidiData { [INFO] [stdout] 171 | data: [ [INFO] [stdout] 172 ~ 0xB0 | val.channel, [INFO] [stdout] 173 ~ val.param, [INFO] [stdout] 174 ~ val.value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:328:38 [INFO] [stdout] | [INFO] [stdout] 328 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:351:36 [INFO] [stdout] | [INFO] [stdout] 351 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | impl Into for MidiProgramChange { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 188 ~ impl From for MidiData { [INFO] [stdout] 189 ~ fn from(val: MidiProgramChange) -> Self { [INFO] [stdout] 190 | MidiData { [INFO] [stdout] 191 | data: [ [INFO] [stdout] 192 ~ 0xC0 | val.channel, [INFO] [stdout] 193 ~ val.hi, [INFO] [stdout] 194 ~ val.lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:207:1 [INFO] [stdout] | [INFO] [stdout] 207 | impl Into for MidiChannelAftertouch { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 207 ~ impl From for MidiData { [INFO] [stdout] 208 ~ fn from(val: MidiChannelAftertouch) -> Self { [INFO] [stdout] 209 | MidiData { [INFO] [stdout] 210 | data: [ [INFO] [stdout] 211 ~ 0xD0 | val.channel, [INFO] [stdout] 212 ~ (((val.value as u32)>>7)&0x7f) as u8, [INFO] [stdout] 213 ~ ((val.value as u32)&0x7f) as u8, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:388:28 [INFO] [stdout] | [INFO] [stdout] 388 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:370:38 [INFO] [stdout] | [INFO] [stdout] 370 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:393:36 [INFO] [stdout] | [INFO] [stdout] 393 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:430:28 [INFO] [stdout] | [INFO] [stdout] 430 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:412:38 [INFO] [stdout] | [INFO] [stdout] 412 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:435:36 [INFO] [stdout] | [INFO] [stdout] 435 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:226:1 [INFO] [stdout] | [INFO] [stdout] 226 | impl Into for MidiPitchBend { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 226 ~ impl From for MidiData { [INFO] [stdout] 227 ~ fn from(val: MidiPitchBend) -> Self { [INFO] [stdout] 228 | MidiData { [INFO] [stdout] 229 | data: [ [INFO] [stdout] 230 ~ 0xE0 | val.channel, [INFO] [stdout] 231 ~ (((val.bend as u32)>>7)&0x7f) as u8, [INFO] [stdout] 232 ~ ((val.bend as u32)&0x7f) as u8, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:245:1 [INFO] [stdout] | [INFO] [stdout] 245 | impl Into for MidiSystem { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 245 ~ impl From for MidiData { [INFO] [stdout] 246 ~ fn from(val: MidiSystem) -> Self { [INFO] [stdout] 247 | MidiData { [INFO] [stdout] 248 | data: [ [INFO] [stdout] 249 ~ 0xF0 | val.channel, [INFO] [stdout] 250 ~ val.hi, [INFO] [stdout] 251 ~ val.lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/midi.rs:292:29 [INFO] [stdout] | [INFO] [stdout] 292 | let is_on = if status == 0x8 || velocity == 0 { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 293 | | false [INFO] [stdout] 294 | | } else { [INFO] [stdout] 295 | | true [INFO] [stdout] 296 | | }; [INFO] [stdout] | |_________________^ help: you can reduce it to: `!(status == 0x8 || velocity == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DVec2` which implements the `Copy` trait [INFO] [stdout] --> src/live_prims.rs:494:25 [INFO] [stdout] | [INFO] [stdout] 494 | LiveValue::Vec2(self.clone().into()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Vec2` which implements the `Copy` trait [INFO] [stdout] --> src/live_prims.rs:474:25 [INFO] [stdout] | [INFO] [stdout] 474 | *self = val.clone().into(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `(*val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:483:28 [INFO] [stdout] | [INFO] [stdout] 483 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:455:38 [INFO] [stdout] | [INFO] [stdout] 455 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:479:36 [INFO] [stdout] | [INFO] [stdout] 479 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/live_prims.rs:512:35 [INFO] [stdout] | [INFO] [stdout] 512 | *self = Vec2::all(*v as f32); [INFO] [stdout] | ^^^^^^^^^ help: try: `(*v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:529:28 [INFO] [stdout] | [INFO] [stdout] 529 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:501:38 [INFO] [stdout] | [INFO] [stdout] 501 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:525:36 [INFO] [stdout] | [INFO] [stdout] 525 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | / return (clip((298 * c + 516 * d + 128) >> 8) << 16) [INFO] [stdout] 57 | | | (clip((298 * c - 100 * d - 208 * e + 128) >> 8) << 8) [INFO] [stdout] 58 | | | (clip((298 * c + 409 * e + 128) >> 8) << 0) [INFO] [stdout] 59 | | | (255 << 24); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 ~ (clip((298 * c + 516 * d + 128) >> 8) << 16) [INFO] [stdout] 57 + | (clip((298 * c - 100 * d - 208 * e + 128) >> 8) << 8) [INFO] [stdout] 58 + | (clip((298 * c + 409 * e + 128) >> 8) << 0) [INFO] [stdout] 59 ~ | (255 << 24) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | return a as u32 [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - return a as u32 [INFO] [stdout] 51 + a as u32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:53:21 [INFO] [stdout] | [INFO] [stdout] 53 | let c = y as i32 - 16; [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | let d = v as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | let e = u as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/video.rs:58:15 [INFO] [stdout] | [INFO] [stdout] 58 | | (clip((298 * c + 409 * e + 128) >> 8) << 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `clip((298 * c + 409 * e + 128) >> 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/live_prims.rs:562:35 [INFO] [stdout] | [INFO] [stdout] 562 | *self = Vec3::all(*v as f32); [INFO] [stdout] | ^^^^^^^^^ help: try: `(*v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:579:28 [INFO] [stdout] | [INFO] [stdout] 579 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:547:38 [INFO] [stdout] | [INFO] [stdout] 547 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:575:36 [INFO] [stdout] | [INFO] [stdout] 575 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/video.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | let y2 = (d>>0)&0xff ; [INFO] [stdout] | ^^^^^^ help: consider reducing it to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/video.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn buffer_to_rgb_8(&self, input:&[u32], rgb:&mut Vec, in_width:usize, _in_height:usize, left:usize, top:usize, out_width:usize, out_height:usize){ [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: unneeded `return` statement [INFO] [stdout] --> src/video.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | return a as u32 [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 92 - return a as u32 [INFO] [stdout] 92 + a as u32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | let c = y as i32 - 16; [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | let d = v as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:96:21 [INFO] [stdout] | [INFO] [stdout] 96 | let e = u as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/live_prims.rs:620:35 [INFO] [stdout] | [INFO] [stdout] 620 | *self = Vec4::all(*v as f32); [INFO] [stdout] | ^^^^^^^^^ help: try: `(*v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/video.rs:111:34 [INFO] [stdout] | [INFO] [stdout] 111 | let y2 = (d>>0)&0xff ; [INFO] [stdout] | ^^^^^^ help: consider reducing it to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:637:28 [INFO] [stdout] | [INFO] [stdout] 637 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:597:38 [INFO] [stdout] | [INFO] [stdout] 597 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:633:36 [INFO] [stdout] | [INFO] [stdout] 633 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VideoFormat` which implements the `Copy` trait [INFO] [stdout] --> src/video.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | format: self.format.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.format` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:156:41 [INFO] [stdout] | [INFO] [stdout] 156 | VideoBufferRefData::U32(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - VideoBufferRefData::U32(v)=>return Some(v), [INFO] [stdout] 156 + VideoBufferRefData::U32(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:157:16 [INFO] [stdout] | [INFO] [stdout] 157 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - _=>return None [INFO] [stdout] 157 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:664:28 [INFO] [stdout] | [INFO] [stdout] 664 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:162:40 [INFO] [stdout] | [INFO] [stdout] 162 | VideoBufferRefData::U8(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - VideoBufferRefData::U8(v)=>return Some(v), [INFO] [stdout] 162 + VideoBufferRefData::U8(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:163:16 [INFO] [stdout] | [INFO] [stdout] 163 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 163 - _=>return None [INFO] [stdout] 163 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:656:38 [INFO] [stdout] | [INFO] [stdout] 656 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:660:36 [INFO] [stdout] | [INFO] [stdout] 660 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:181:38 [INFO] [stdout] | [INFO] [stdout] 181 | VideoBufferData::U32(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 181 - VideoBufferData::U32(v)=>return Some(v), [INFO] [stdout] 181 + VideoBufferData::U32(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 182 - _=>return None [INFO] [stdout] 182 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/live_prims.rs:729:58 [INFO] [stdout] | [INFO] [stdout] 729 | if let Some(inline_str) = InlineString::from_str(&self) { [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:187:37 [INFO] [stdout] | [INFO] [stdout] 187 | VideoBufferData::U8(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 187 - VideoBufferData::U8(v)=>return Some(v), [INFO] [stdout] 187 + VideoBufferData::U8(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:188:16 [INFO] [stdout] | [INFO] [stdout] 188 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 188 - _=>return None [INFO] [stdout] 188 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:197:38 [INFO] [stdout] | [INFO] [stdout] 197 | VideoBufferData::U32(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 - VideoBufferData::U32(v)=>return Some(v), [INFO] [stdout] 197 + VideoBufferData::U32(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:198:16 [INFO] [stdout] | [INFO] [stdout] 198 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 198 - _=>return None [INFO] [stdout] 198 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:699:28 [INFO] [stdout] | [INFO] [stdout] 699 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:203:37 [INFO] [stdout] | [INFO] [stdout] 203 | VideoBufferData::U8(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 203 - VideoBufferData::U8(v)=>return Some(v), [INFO] [stdout] 203 + VideoBufferData::U8(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:204:16 [INFO] [stdout] | [INFO] [stdout] 204 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 204 - _=>return None [INFO] [stdout] 204 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:682:38 [INFO] [stdout] | [INFO] [stdout] 682 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:704:36 [INFO] [stdout] | [INFO] [stdout] 704 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:751:17 [INFO] [stdout] | [INFO] [stdout] 751 | return rc.clone(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 751 - return rc.clone(); [INFO] [stdout] 751 + rc.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:236:9 [INFO] [stdout] | [INFO] [stdout] 236 | return 0 [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 236 - return 0 [INFO] [stdout] 236 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:754:17 [INFO] [stdout] | [INFO] [stdout] 754 | return Arc::new(s.clone()) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 754 - return Arc::new(s.clone()) [INFO] [stdout] 754 + Arc::new(s.clone()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_mut` can be confused for the standard trait method `std::convert::AsMut::as_mut` [INFO] [stdout] --> src/live_prims.rs:758:5 [INFO] [stdout] | [INFO] [stdout] 758 | / pub fn as_mut(&mut self)->&mut String{ [INFO] [stdout] 759 | | match self{ [INFO] [stdout] 760 | | Self::Arc(rc)=>{ [INFO] [stdout] 761 | | *self = Self::String(rc.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 768 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::convert::AsMut` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:762:17 [INFO] [stdout] | [INFO] [stdout] 762 | return self.as_mut(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 762 - return self.as_mut(); [INFO] [stdout] 762 + self.as_mut() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:765:17 [INFO] [stdout] | [INFO] [stdout] 765 | return s [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 765 - return s [INFO] [stdout] 765 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:773:17 [INFO] [stdout] | [INFO] [stdout] 773 | return self.as_mut(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 773 - return self.as_mut(); [INFO] [stdout] 773 + self.as_mut() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:777:17 [INFO] [stdout] | [INFO] [stdout] 777 | return s [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 777 - return s [INFO] [stdout] 777 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_ref` can be confused for the standard trait method `std::convert::AsRef::as_ref` [INFO] [stdout] --> src/live_prims.rs:794:5 [INFO] [stdout] | [INFO] [stdout] 794 | / pub fn as_ref(&self)->&str{ [INFO] [stdout] 795 | | match self{ [INFO] [stdout] 796 | | Self::Arc(rc)=>{ [INFO] [stdout] 797 | | &*rc [INFO] [stdout] ... | [INFO] [stdout] 803 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::convert::AsRef` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_prims.rs:800:17 [INFO] [stdout] | [INFO] [stdout] 800 | return &s [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 800 - return &s [INFO] [stdout] 800 + &s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/live_prims.rs:797:17 [INFO] [stdout] | [INFO] [stdout] 797 | &*rc [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 797 - &*rc [INFO] [stdout] 797 + rc [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 797 | &**rc [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/live_prims.rs:800:24 [INFO] [stdout] | [INFO] [stdout] 800 | return &s [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/live_prims.rs:854:58 [INFO] [stdout] | [INFO] [stdout] 854 | if let Some(inline_str) = InlineString::from_str(&self.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:824:28 [INFO] [stdout] | [INFO] [stdout] 824 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/live_prims.rs:810:38 [INFO] [stdout] | [INFO] [stdout] 810 | fn apply(&mut self, cx: &mut Cx, apply: &mut Apply, index: usize, nodes: &[LiveNode]) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_apply` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/live_prims.rs:829:36 [INFO] [stdout] | [INFO] [stdout] 829 | self.apply(cx, apply, index, nodes); [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/video.rs:330:13 [INFO] [stdout] | [INFO] [stdout] 330 | write!(f, "Capture Device: {}\n", desc.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 330 - write!(f, "Capture Device: {}\n", desc.name).unwrap(); [INFO] [stdout] 330 + writeln!(f, "Capture Device: {}", desc.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/video.rs:332:17 [INFO] [stdout] | [INFO] [stdout] 332 | ... write!(f, " format: w:{} h:{} framerate:{:?} pixel:{:?} \n", format.width, format.height, format.frame_rate, format.pixel_format).un... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 332 - write!(f, " format: w:{} h:{} framerate:{:?} pixel:{:?} \n", format.width, format.height, format.frame_rate, format.pixel_format).unwrap(); [INFO] [stdout] 332 + writeln!(f, " format: w:{} h:{} framerate:{:?} pixel:{:?} ", format.width, format.height, format.frame_rate, format.pixel_format).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_ref` can be confused for the standard trait method `std::convert::AsRef::as_ref` [INFO] [stdout] --> src/live_prims.rs:939:5 [INFO] [stdout] | [INFO] [stdout] 939 | pub fn as_ref(&self)->&Arc{&self.0} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::convert::AsRef` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> src/live_prims.rs:952:28 [INFO] [stdout] | [INFO] [stdout] 952 | LiveValue::Expr {..} => { [INFO] [stdout] | ^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cx.rs:109:32 [INFO] [stdout] | [INFO] [stdout] 109 | pub (crate) event_handler: Option>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_matrix.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | / return Self{ [INFO] [stdout] 50 | | pool, [INFO] [stdout] 51 | | identity [INFO] [stdout] 52 | | } [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 ~ Self{ [INFO] [stdout] 50 + pool, [INFO] [stdout] 51 + identity [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/cx.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / match self{ [INFO] [stdout] 203 | | OsType::Web(_) => true, [INFO] [stdout] 204 | | OsType::Ios=>true, [INFO] [stdout] 205 | | OsType::Android(_) => true, [INFO] [stdout] 206 | | OsType::LinuxDirect=> true, [INFO] [stdout] 207 | | _=> false [INFO] [stdout] 208 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 202 - match self{ [INFO] [stdout] 203 - OsType::Web(_) => true, [INFO] [stdout] 204 - OsType::Ios=>true, [INFO] [stdout] 205 - OsType::Android(_) => true, [INFO] [stdout] 206 - OsType::LinuxDirect=> true, [INFO] [stdout] 207 - _=> false [INFO] [stdout] 208 - } [INFO] [stdout] 202 + matches!(self, OsType::Web(_) | OsType::Ios | OsType::Android(_) | OsType::LinuxDirect) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/cx.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | / match self { [INFO] [stdout] 212 | | OsType::Web(_) => true, [INFO] [stdout] 213 | | _ => false [INFO] [stdout] 214 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 211 - match self { [INFO] [stdout] 212 - OsType::Web(_) => true, [INFO] [stdout] 213 - _ => false [INFO] [stdout] 214 - } [INFO] [stdout] 211 + matches!(self, OsType::Web(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cx.rs:238:31 [INFO] [stdout] | [INFO] [stdout] 238 | pub fn new(event_handler: Box) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [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/draw_shader.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | / match node.value { [INFO] [stdout] 144 | | LiveValue::DSL {token_start, token_count, ..} => { [INFO] [stdout] 145 | | fingerprint.push(LiveNode { [INFO] [stdout] 146 | | id: node.id, [INFO] [stdout] ... | [INFO] [stdout] 151 | | _ => () [INFO] [stdout] 152 | | } [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] 143 ~ if let LiveValue::DSL {token_start, token_count, ..} = node.value { [INFO] [stdout] 144 + fingerprint.push(LiveNode { [INFO] [stdout] 145 + id: node.id, [INFO] [stdout] 146 + origin: node.origin, [INFO] [stdout] 147 + value: LiveValue::DSL {token_start, token_count, expand_index: None} [INFO] [stdout] 148 + }); [INFO] [stdout] 149 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/cx_api.rs:322:64 [INFO] [stdout] | [INFO] [stdout] 322 | if let Some(p) = self.platform_ops.iter_mut().find(|p| match p { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 323 | | CxOsOp::SetCursor(_) => true, [INFO] [stdout] 324 | | _ => false, [INFO] [stdout] 325 | | }) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 322 - if let Some(p) = self.platform_ops.iter_mut().find(|p| match p { [INFO] [stdout] 323 - CxOsOp::SetCursor(_) => true, [INFO] [stdout] 324 - _ => false, [INFO] [stdout] 325 - }) { [INFO] [stdout] 322 + if let Some(p) = self.platform_ops.iter_mut().find(|p| matches!(p, CxOsOp::SetCursor(_))) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cx_api.rs:372:9 [INFO] [stdout] | [INFO] [stdout] 372 | return 1.0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 372 - return 1.0; [INFO] [stdout] 372 + 1.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_list.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | return Some(&d.item) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - return Some(&d.item) [INFO] [stdout] 64 + Some(&d.item) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/cx_api.rs:599:13 [INFO] [stdout] | [INFO] [stdout] 599 | / let mut new_set = Vec::new(); [INFO] [stdout] 600 | | new_set.push(trigger); [INFO] [stdout] | |__________________________________^ help: consider using the `vec![]` macro: `let new_set = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/draw_list.rs:136:1 [INFO] [stdout] | [INFO] [stdout] 136 | / pub enum CxDrawKind{ [INFO] [stdout] 137 | | SubList(DrawListId), [INFO] [stdout] | | ------------------- the second-largest variant contains at least 16 bytes [INFO] [stdout] 138 | | DrawCall(CxDrawCall), [INFO] [stdout] | | -------------------- the largest variant contains at least 1160 bytes [INFO] [stdout] 139 | | Empty [INFO] [stdout] 140 | | } [INFO] [stdout] | |_^ the entire enum is at least 1160 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 138 - DrawCall(CxDrawCall), [INFO] [stdout] 138 + DrawCall(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/draw_list.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | / match self{ [INFO] [stdout] 159 | | CxDrawKind::Empty=>true, [INFO] [stdout] 160 | | _=>false [INFO] [stdout] 161 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 158 - match self{ [INFO] [stdout] 159 - CxDrawKind::Empty=>true, [INFO] [stdout] 160 - _=>false [INFO] [stdout] 161 - } [INFO] [stdout] 158 + matches!(self, CxDrawKind::Empty) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/draw_list.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | / if draw_vars.draw_shader.is_none(){ [INFO] [stdout] 337 | | return None [INFO] [stdout] 338 | | } [INFO] [stdout] | |_________^ help: replace it with: `draw_vars.draw_shader?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_list.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... return false [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 372 - return false [INFO] [stdout] 372 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_traits.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | return ret [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return ret [INFO] [stdout] 86 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/live_traits.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | return ret [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 112 - return ret [INFO] [stdout] 112 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/draw_vars.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | module_id: LiveModuleId::from_str(&module_path!()).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `module_path!()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/draw_vars.rs:170:21 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn as_slice<'a>(&'a self) -> &'a [f32] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 170 - pub fn as_slice<'a>(&'a self) -> &'a [f32] { [INFO] [stdout] 170 + pub fn as_slice(&self) -> &[f32] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting raw pointers to the same type and constness is unnecessary (`*const f32` -> `*const f32`) [INFO] [stdout] --> src/draw_vars.rs:172:40 [INFO] [stdout] | [INFO] [stdout] 172 | ...lice::from_raw_parts((&self.var_instances[self.var_instance_start - 1] as *const _ as *const f32).offset(1), self.var_instance_s... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.var_instances[self.var_instance_start - 1] as *const _` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `self` [INFO] [stdout] --> src/live_traits.rs:202:18 [INFO] [stdout] | [INFO] [stdout] 202 | for i in 0..N{ [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 202 - for i in 0..N{ [INFO] [stdout] 202 + for (i, ) in self.iter().enumerate().take(N){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 262 | / match self { [INFO] [stdout] 263 | | Self::NewFromDoc {..} => true, [INFO] [stdout] 264 | | Self::UpdateFromDoc {..} => true, [INFO] [stdout] 265 | | _ => false [INFO] [stdout] 266 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 262 - match self { [INFO] [stdout] 263 - Self::NewFromDoc {..} => true, [INFO] [stdout] 264 - Self::UpdateFromDoc {..} => true, [INFO] [stdout] 265 - _ => false [INFO] [stdout] 266 - } [INFO] [stdout] 262 + matches!(self, Self::NewFromDoc {..} | Self::UpdateFromDoc {..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 270 | / match self { [INFO] [stdout] 271 | | Self::NewFromDoc {..} => true, [INFO] [stdout] 272 | | _ => false [INFO] [stdout] 273 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 270 - match self { [INFO] [stdout] 271 - Self::NewFromDoc {..} => true, [INFO] [stdout] 272 - _ => false [INFO] [stdout] 273 - } [INFO] [stdout] 270 + matches!(self, Self::NewFromDoc {..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:277:9 [INFO] [stdout] | [INFO] [stdout] 277 | / match self { [INFO] [stdout] 278 | | Self::UpdateFromDoc{..} => true, [INFO] [stdout] 279 | | _ => false [INFO] [stdout] 280 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 277 - match self { [INFO] [stdout] 278 - Self::UpdateFromDoc{..} => true, [INFO] [stdout] 279 - _ => false [INFO] [stdout] 280 - } [INFO] [stdout] 277 + matches!(self, Self::UpdateFromDoc{..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/live_traits.rs:284:9 [INFO] [stdout] | [INFO] [stdout] 284 | / match self { [INFO] [stdout] 285 | | Self::UpdateFromDoc {..} => true, [INFO] [stdout] 286 | | _ => false [INFO] [stdout] 287 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 284 - match self { [INFO] [stdout] 285 - Self::UpdateFromDoc {..} => true, [INFO] [stdout] 286 - _ => false [INFO] [stdout] 287 - } [INFO] [stdout] 284 + matches!(self, Self::UpdateFromDoc {..}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&live_type).is_some()` [INFO] [stdout] --> src/draw_vars.rs:258:66 [INFO] [stdout] | [INFO] [stdout] 258 | ... if shader_registry.enums.get(&live_type).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(&live_type)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:447:39 [INFO] [stdout] | [INFO] [stdout] 447 | ... instances[input.offset + 0 + j * stride] = rect.pos.x as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `input.offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:453:39 [INFO] [stdout] | [INFO] [stdout] 453 | ... instances[input.offset + 0 + j * stride] = rect.size.x as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `input.offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 544 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 545 | | value[i] = self_slice[offset + i] [INFO] [stdout] 546 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `value[..value.len().min(slots)].copy_from_slice(&self_slice[offset..(value.len().min(slots) + offset)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:559:21 [INFO] [stdout] | [INFO] [stdout] 559 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 560 | | self.var_instances[offset + i] = value[i]; [INFO] [stdout] 561 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `self.var_instances[offset..(value.len().min(slots) + offset)].copy_from_slice(&value[..value.len().min(slots)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:574:21 [INFO] [stdout] | [INFO] [stdout] 574 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 575 | | value[i] = self.user_uniforms[offset + i]; [INFO] [stdout] 576 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `value[..value.len().min(slots)].copy_from_slice(&self.user_uniforms[offset..(value.len().min(slots) + offset)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/live_cx.rs:119:48 [INFO] [stdout] | [INFO] [stdout] 119 | self.apply_error(origin, index, nodes, format!("Newed empty ClassName, forgot to call 'use'")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Newed empty ClassName, forgot to call 'use'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/live_cx.rs:127:48 [INFO] [stdout] | [INFO] [stdout] 127 | self.apply_error(origin, index, nodes, format!("animate missing apply:{{}} block")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"animate missing apply:{} block".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:589:21 [INFO] [stdout] | [INFO] [stdout] 589 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 590 | | self.user_uniforms[offset + i] = value[i] [INFO] [stdout] 591 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `self.user_uniforms[offset..(value.len().min(slots) + offset)].copy_from_slice(&value[..value.len().min(slots)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/live_cx.rs:134:52 [INFO] [stdout] | [INFO] [stdout] 134 | self.apply_error(origin, index, nodes, format!("Video Player widget is currently only supported on Android")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Video Player widget is currently only supported on Android".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:627:17 [INFO] [stdout] | [INFO] [stdout] 627 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 627 - return index; [INFO] [stdout] 627 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:634:17 [INFO] [stdout] | [INFO] [stdout] 634 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 634 - return index; [INFO] [stdout] 634 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:642:17 [INFO] [stdout] | [INFO] [stdout] 642 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 642 - return index; [INFO] [stdout] 642 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:651:17 [INFO] [stdout] | [INFO] [stdout] 651 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 651 - return index; [INFO] [stdout] 651 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:654:17 [INFO] [stdout] | [INFO] [stdout] 654 | return nodes.skip_node(index) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 654 - return nodes.skip_node(index) [INFO] [stdout] 654 + nodes.skip_node(index) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:626:24 [INFO] [stdout] | [INFO] [stdout] 626 | output[offset + 0] = v; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:632:24 [INFO] [stdout] | [INFO] [stdout] 632 | output[offset + 0] = v.x; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:639:24 [INFO] [stdout] | [INFO] [stdout] 639 | output[offset + 0] = v.x; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:647:24 [INFO] [stdout] | [INFO] [stdout] 647 | output[offset + 0] = v.x; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/draw_vars.rs:695:36 [INFO] [stdout] | [INFO] [stdout] 695 | let unknown_shader_props = match nodes[index].id { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 696 | | live_id!(debug) => false, [INFO] [stdout] 697 | | live_id!(debug_id) => false, [INFO] [stdout] 698 | | live_id!(draw_call_group) => false, [INFO] [stdout] 699 | | _ => true [INFO] [stdout] 700 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 695 - let unknown_shader_props = match nodes[index].id { [INFO] [stdout] 696 - live_id!(debug) => false, [INFO] [stdout] 697 - live_id!(debug_id) => false, [INFO] [stdout] 698 - live_id!(draw_call_group) => false, [INFO] [stdout] 699 - _ => true [INFO] [stdout] 700 - }; [INFO] [stdout] 695 + let unknown_shader_props = !matches!(nodes[index].id, live_id!(debug) | live_id!(debug_id) | live_id!(draw_call_group)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/live_cx.rs:228:16 [INFO] [stdout] | [INFO] [stdout] 228 | if changed_files.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!changed_files.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/live_cx.rs:256:17 [INFO] [stdout] | [INFO] [stdout] 256 | / match msg { [INFO] [stdout] 257 | | WebSocketMessage::Binary(bin)=>{ [INFO] [stdout] 258 | | if let Ok(data) = StudioToAppVec::deserialize_bin(&bin){ [INFO] [stdout] 259 | | for data in data.0{ [INFO] [stdout] ... | [INFO] [stdout] 277 | | _=>() [INFO] [stdout] 278 | | } [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] 256 ~ if let WebSocketMessage::Binary(bin) = msg { [INFO] [stdout] 257 + if let Ok(data) = StudioToAppVec::deserialize_bin(&bin){ [INFO] [stdout] 258 + for data in data.0{ [INFO] [stdout] 259 + match data{ [INFO] [stdout] 260 + StudioToApp::LiveChange{file_name, content}=>{ [INFO] [stdout] 261 + all_changes.retain(|v| v.file_name != file_name); [INFO] [stdout] 262 + all_changes.push(LiveFileChange{file_name, content}) [INFO] [stdout] 263 + } [INFO] [stdout] 264 + StudioToApp::Screenshot(req)=>{ [INFO] [stdout] 265 + self.screenshot_requests.push(req); [INFO] [stdout] 266 + } [INFO] [stdout] 267 + StudioToApp::KeepAlive=>{} [INFO] [stdout] 268 + x=>{ [INFO] [stdout] 269 + actions.push(x); [INFO] [stdout] 270 + } [INFO] [stdout] 271 + } [INFO] [stdout] 272 + [INFO] [stdout] 273 + } [INFO] [stdout] 274 + } [INFO] [stdout] 275 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/live_cx.rs:291:16 [INFO] [stdout] | [INFO] [stdout] 291 | if changes.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `changes.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: module has the same name as its containing module [INFO] [stdout] --> src/event/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod event; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/live_cx.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if all_changes.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!all_changes.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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | impl Into for f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 179 ~ impl From for f32a { [INFO] [stdout] 180 ~ fn from(val: f32) -> Self { [INFO] [stdout] 181 ~ f32a(AtomicU32::new(val.to_bits())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/event/event.rs:428:9 [INFO] [stdout] | [INFO] [stdout] 428 | / match self{ [INFO] [stdout] 429 | | Self::MouseDown(_)| [INFO] [stdout] 430 | | Self::MouseMove(_)| [INFO] [stdout] 431 | | Self::TouchUpdate(_)| [INFO] [stdout] 432 | | Self::Scroll(_)=>true, [INFO] [stdout] 433 | | _=>false [INFO] [stdout] 434 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 428 ~ matches!(self, Self::MouseDown(_)| [INFO] [stdout] 429 + Self::MouseMove(_)| [INFO] [stdout] 430 + Self::TouchUpdate(_)| [INFO] [stdout] 431 + Self::Scroll(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/event/event.rs:460:16 [INFO] [stdout] | [INFO] [stdout] 460 | || self.draw_lists.len() != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.draw_lists.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: length comparison to zero [INFO] [stdout] --> src/event/event.rs:461:16 [INFO] [stdout] | [INFO] [stdout] 461 | || self.draw_lists_and_children.len() != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.draw_lists_and_children.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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:244:1 [INFO] [stdout] | [INFO] [stdout] 244 | impl Into for f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 244 ~ impl From for f64a { [INFO] [stdout] 245 ~ fn from(val: f64) -> Self { [INFO] [stdout] 246 ~ f64a(AtomicU64::new(val.to_bits())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:305:1 [INFO] [stdout] | [INFO] [stdout] 305 | impl Into for u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 305 ~ impl From for u32a { [INFO] [stdout] 306 ~ fn from(val: u32) -> Self { [INFO] [stdout] 307 ~ u32a(AtomicU32::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:399:1 [INFO] [stdout] | [INFO] [stdout] 399 | impl Into for i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 399 ~ impl From for i64a { [INFO] [stdout] 400 ~ fn from(val: i64) -> Self { [INFO] [stdout] 401 ~ i64a(AtomicI64::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:467:1 [INFO] [stdout] | [INFO] [stdout] 467 | impl Into for i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 467 ~ impl From for i32a { [INFO] [stdout] 468 ~ fn from(val: i32) -> Self { [INFO] [stdout] 469 ~ i32a(AtomicI32::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/event.rs:551:32 [INFO] [stdout] | [INFO] [stdout] 551 | if ne.set.contains(&self){ [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/live_atomic.rs:537:1 [INFO] [stdout] | [INFO] [stdout] 537 | impl Into for bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 537 ~ impl From for boola { [INFO] [stdout] 538 ~ fn from(val: bool) -> Self { [INFO] [stdout] 539 ~ boola(AtomicBool::new(val)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:210:12 [INFO] [stdout] | [INFO] [stdout] 210 | tasks: Arc> >>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:215:20 [INFO] [stdout] | [INFO] [stdout] 215 | let tasks: Arc> >> = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:246:12 [INFO] [stdout] | [INFO] [stdout] 246 | tasks: Arc) >> >, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/thread.rs:251:20 [INFO] [stdout] | [INFO] [stdout] 251 | let tasks: Arc) >> > = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/audio.rs:96:12 [INFO] [stdout] | [INFO] [stdout] 96 | if results.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `results.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: unneeded `return` statement [INFO] [stdout] --> src/audio.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return results [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return results [INFO] [stdout] 113 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/audio.rs:120:17 [INFO] [stdout] | [INFO] [stdout] 120 | let _ = write!(f,"Audio Devices:\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 120 - let _ = write!(f,"Audio Devices:\n"); [INFO] [stdout] 120 + let _ = writeln!(f,"Audio Devices:"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/audio.rs:122:20 [INFO] [stdout] | [INFO] [stdout] 122 | let _ = write!(f, "{}\n", d); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 122 - let _ = write!(f, "{}\n", d); [INFO] [stdout] 122 + let _ = writeln!(f, "{}", d); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/audio.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match self{ [INFO] [stdout] 138 | | AudioDeviceType::Input=>true, [INFO] [stdout] 139 | | _=>false [INFO] [stdout] 140 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 137 - match self{ [INFO] [stdout] 138 - AudioDeviceType::Input=>true, [INFO] [stdout] 139 - _=>false [INFO] [stdout] 140 - } [INFO] [stdout] 137 + matches!(self, AudioDeviceType::Input) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/audio.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / match self{ [INFO] [stdout] 144 | | AudioDeviceType::Output=>true, [INFO] [stdout] 145 | | _=>false [INFO] [stdout] 146 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 143 - match self{ [INFO] [stdout] 144 - AudioDeviceType::Output=>true, [INFO] [stdout] 145 - _=>false [INFO] [stdout] 146 - } [INFO] [stdout] 143 + matches!(self, AudioDeviceType::Output) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/audio.rs:201:23 [INFO] [stdout] | [INFO] [stdout] 201 | let mut out = Vec::new(); [INFO] [stdout] | _______________________^ [INFO] [stdout] 202 | | out.resize(self.data.len(), 0); [INFO] [stdout] | |______________________________________^ help: consider replacing this with: `vec![0; self.data.len()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `out` [INFO] [stdout] --> src/audio.rs:203:18 [INFO] [stdout] | [INFO] [stdout] 203 | for i in 0..self.data.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 203 - for i in 0..self.data.len() { [INFO] [stdout] 203 + for (i, ) in out.iter_mut().enumerate().take(self.data.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/audio.rs:204:50 [INFO] [stdout] | [INFO] [stdout] 204 | let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 204 - let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] 204 + let f = (self.data[i] * 32767.0).max(i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/audio.rs:204:76 [INFO] [stdout] | [INFO] [stdout] 204 | let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 204 - let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(std::i16::MAX as f32); [INFO] [stdout] 204 + let f = (self.data[i] * 32767.0).max(std::i16::MIN as f32).min(i16::MAX as f32); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/audio.rs:244:44 [INFO] [stdout] | [INFO] [stdout] 244 | self.data.resize(frame_count * channel_count as usize, 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `channel_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/midi.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | write!(f, "MIDI ports:\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 36 - write!(f, "MIDI ports:\n").unwrap(); [INFO] [stdout] 36 + writeln!(f, "MIDI ports:").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/midi.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | write!(f, "[Input] {}\n", desc.name).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 39 - write!(f, "[Input] {}\n", desc.name).unwrap() [INFO] [stdout] 39 + writeln!(f, "[Input] {}", desc.name).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/midi.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | write!(f, "[Output] {}\n", desc.name).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 42 - write!(f, "[Output] {}\n", desc.name).unwrap() [INFO] [stdout] 42 + writeln!(f, "[Output] {}", desc.name).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/midi.rs:84:78 [INFO] [stdout] | [INFO] [stdout] 84 | data: [((data >> 16) & 0xff) as u8, ((data >> 8) & 0xff) as u8, ((data >> 0) & 0xff) as u8] [INFO] [stdout] | ^^^^^^^^^^^ help: consider reducing it to: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/midi.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | / match self { [INFO] [stdout] 98 | | Self::Input => true, [INFO] [stdout] 99 | | _ => false [INFO] [stdout] 100 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 97 - match self { [INFO] [stdout] 98 - Self::Input => true, [INFO] [stdout] 99 - _ => false [INFO] [stdout] 100 - } [INFO] [stdout] 97 + matches!(self, Self::Input) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/midi.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | / match self { [INFO] [stdout] 104 | | Self::Output => true, [INFO] [stdout] 105 | | _ => false [INFO] [stdout] 106 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 103 - match self { [INFO] [stdout] 104 - Self::Output => true, [INFO] [stdout] 105 - _ => false [INFO] [stdout] 106 - } [INFO] [stdout] 103 + matches!(self, Self::Output) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/finger.rs:273:13 [INFO] [stdout] | [INFO] [stdout] 273 | / return [INFO] [stdout] 274 | | pos.x >= rect.pos.x - margin.left [INFO] [stdout] 275 | | && pos.x <= rect.pos.x + rect.size.x + margin.right [INFO] [stdout] 276 | | && pos.y >= rect.pos.y - margin.top [INFO] [stdout] 277 | | && pos.y <= rect.pos.y + rect.size.y + margin.bottom; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 273 ~ pos.x >= rect.pos.x - margin.left [INFO] [stdout] 274 + && pos.x <= rect.pos.x + rect.size.x + margin.right [INFO] [stdout] 275 + && pos.y >= rect.pos.y - margin.top [INFO] [stdout] 276 ~ && pos.y <= rect.pos.y + rect.size.y + margin.bottom [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/finger.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | return rect.contains(pos); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 280 - return rect.contains(pos); [INFO] [stdout] 280 + rect.contains(pos) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:129:1 [INFO] [stdout] | [INFO] [stdout] 129 | impl Into for MidiNote { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 129 ~ impl From for MidiData { [INFO] [stdout] 130 ~ fn from(val: MidiNote) -> Self { [INFO] [stdout] 131 | MidiData { [INFO] [stdout] 132 | data: [ [INFO] [stdout] 133 ~ (if val.is_on {0x9}else {0x8} << 4) | val.channel, [INFO] [stdout] 134 ~ val.note_number, [INFO] [stdout] 135 ~ val.velocity [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:149:1 [INFO] [stdout] | [INFO] [stdout] 149 | impl Into for MidiAftertouch { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 149 ~ impl From for MidiData { [INFO] [stdout] 150 ~ fn from(val: MidiAftertouch) -> Self { [INFO] [stdout] 151 | MidiData { [INFO] [stdout] 152 | data: [ [INFO] [stdout] 153 ~ 0xA0 | val.channel, [INFO] [stdout] 154 ~ val.note_number, [INFO] [stdout] 155 ~ val.velocity [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:168:1 [INFO] [stdout] | [INFO] [stdout] 168 | impl Into for MidiControlChange { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 168 ~ impl From for MidiData { [INFO] [stdout] 169 ~ fn from(val: MidiControlChange) -> Self { [INFO] [stdout] 170 | MidiData { [INFO] [stdout] 171 | data: [ [INFO] [stdout] 172 ~ 0xB0 | val.channel, [INFO] [stdout] 173 ~ val.param, [INFO] [stdout] 174 ~ val.value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | impl Into for MidiProgramChange { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 188 ~ impl From for MidiData { [INFO] [stdout] 189 ~ fn from(val: MidiProgramChange) -> Self { [INFO] [stdout] 190 | MidiData { [INFO] [stdout] 191 | data: [ [INFO] [stdout] 192 ~ 0xC0 | val.channel, [INFO] [stdout] 193 ~ val.hi, [INFO] [stdout] 194 ~ val.lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:207:1 [INFO] [stdout] | [INFO] [stdout] 207 | impl Into for MidiChannelAftertouch { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 207 ~ impl From for MidiData { [INFO] [stdout] 208 ~ fn from(val: MidiChannelAftertouch) -> Self { [INFO] [stdout] 209 | MidiData { [INFO] [stdout] 210 | data: [ [INFO] [stdout] 211 ~ 0xD0 | val.channel, [INFO] [stdout] 212 ~ (((val.value as u32)>>7)&0x7f) as u8, [INFO] [stdout] 213 ~ ((val.value as u32)&0x7f) as u8, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:226:1 [INFO] [stdout] | [INFO] [stdout] 226 | impl Into for MidiPitchBend { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 226 ~ impl From for MidiData { [INFO] [stdout] 227 ~ fn from(val: MidiPitchBend) -> Self { [INFO] [stdout] 228 | MidiData { [INFO] [stdout] 229 | data: [ [INFO] [stdout] 230 ~ 0xE0 | val.channel, [INFO] [stdout] 231 ~ (((val.bend as u32)>>7)&0x7f) as u8, [INFO] [stdout] 232 ~ ((val.bend as u32)&0x7f) as u8, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/midi.rs:245:1 [INFO] [stdout] | [INFO] [stdout] 245 | impl Into for MidiSystem { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 245 ~ impl From for MidiData { [INFO] [stdout] 246 ~ fn from(val: MidiSystem) -> Self { [INFO] [stdout] 247 | MidiData { [INFO] [stdout] 248 | data: [ [INFO] [stdout] 249 ~ 0xF0 | val.channel, [INFO] [stdout] 250 ~ val.hi, [INFO] [stdout] 251 ~ val.lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/event/finger.rs:442:9 [INFO] [stdout] | [INFO] [stdout] 442 | self.captures.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.captures.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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/midi.rs:292:29 [INFO] [stdout] | [INFO] [stdout] 292 | let is_on = if status == 0x8 || velocity == 0 { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 293 | | false [INFO] [stdout] 294 | | } else { [INFO] [stdout] 295 | | true [INFO] [stdout] 296 | | }; [INFO] [stdout] | |_________________^ help: you can reduce it to: `!(status == 0x8 || velocity == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/finger.rs:474:9 [INFO] [stdout] | [INFO] [stdout] 474 | return self.tap.count [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 474 - return self.tap.count [INFO] [stdout] 474 + self.tap.count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | / return (clip((298 * c + 516 * d + 128) >> 8) << 16) [INFO] [stdout] 57 | | | (clip((298 * c - 100 * d - 208 * e + 128) >> 8) << 8) [INFO] [stdout] 58 | | | (clip((298 * c + 409 * e + 128) >> 8) << 0) [INFO] [stdout] 59 | | | (255 << 24); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 ~ (clip((298 * c + 516 * d + 128) >> 8) << 16) [INFO] [stdout] 57 + | (clip((298 * c - 100 * d - 208 * e + 128) >> 8) << 8) [INFO] [stdout] 58 + | (clip((298 * c + 409 * e + 128) >> 8) << 0) [INFO] [stdout] 59 ~ | (255 << 24) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | return a as u32 [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - return a as u32 [INFO] [stdout] 51 + a as u32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:53:21 [INFO] [stdout] | [INFO] [stdout] 53 | let c = y as i32 - 16; [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | let d = v as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | let e = u as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/video.rs:58:15 [INFO] [stdout] | [INFO] [stdout] 58 | | (clip((298 * c + 409 * e + 128) >> 8) << 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `clip((298 * c + 409 * e + 128) >> 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/video.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | let y2 = (d>>0)&0xff ; [INFO] [stdout] | ^^^^^^ help: consider reducing it to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/video.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn buffer_to_rgb_8(&self, input:&[u32], rgb:&mut Vec, in_width:usize, _in_height:usize, left:usize, top:usize, out_width:usize, out_height:usize){ [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: unneeded `return` statement [INFO] [stdout] --> src/video.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | return a as u32 [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 92 - return a as u32 [INFO] [stdout] 92 + a as u32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | let c = y as i32 - 16; [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | let d = v as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/video.rs:96:21 [INFO] [stdout] | [INFO] [stdout] 96 | let e = u as i32 - 128; [INFO] [stdout] | ^^^^^^^^ help: try: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/video.rs:111:34 [INFO] [stdout] | [INFO] [stdout] 111 | let y2 = (d>>0)&0xff ; [INFO] [stdout] | ^^^^^^ help: consider reducing it to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VideoFormat` which implements the `Copy` trait [INFO] [stdout] --> src/video.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | format: self.format.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.format` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:156:41 [INFO] [stdout] | [INFO] [stdout] 156 | VideoBufferRefData::U32(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - VideoBufferRefData::U32(v)=>return Some(v), [INFO] [stdout] 156 + VideoBufferRefData::U32(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:157:16 [INFO] [stdout] | [INFO] [stdout] 157 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - _=>return None [INFO] [stdout] 157 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:162:40 [INFO] [stdout] | [INFO] [stdout] 162 | VideoBufferRefData::U8(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - VideoBufferRefData::U8(v)=>return Some(v), [INFO] [stdout] 162 + VideoBufferRefData::U8(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:163:16 [INFO] [stdout] | [INFO] [stdout] 163 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 163 - _=>return None [INFO] [stdout] 163 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:181:38 [INFO] [stdout] | [INFO] [stdout] 181 | VideoBufferData::U32(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 181 - VideoBufferData::U32(v)=>return Some(v), [INFO] [stdout] 181 + VideoBufferData::U32(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 182 - _=>return None [INFO] [stdout] 182 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:187:37 [INFO] [stdout] | [INFO] [stdout] 187 | VideoBufferData::U8(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 187 - VideoBufferData::U8(v)=>return Some(v), [INFO] [stdout] 187 + VideoBufferData::U8(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:188:16 [INFO] [stdout] | [INFO] [stdout] 188 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 188 - _=>return None [INFO] [stdout] 188 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:197:38 [INFO] [stdout] | [INFO] [stdout] 197 | VideoBufferData::U32(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 - VideoBufferData::U32(v)=>return Some(v), [INFO] [stdout] 197 + VideoBufferData::U32(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:198:16 [INFO] [stdout] | [INFO] [stdout] 198 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 198 - _=>return None [INFO] [stdout] 198 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:203:37 [INFO] [stdout] | [INFO] [stdout] 203 | VideoBufferData::U8(v)=>return Some(v), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 203 - VideoBufferData::U8(v)=>return Some(v), [INFO] [stdout] 203 + VideoBufferData::U8(v)=>Some(v), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:204:16 [INFO] [stdout] | [INFO] [stdout] 204 | _=>return None [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 204 - _=>return None [INFO] [stdout] 204 + _=>None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/event/finger.rs:852:17 [INFO] [stdout] | [INFO] [stdout] 852 | / if cx.keyboard.has_key_focus(area) { [INFO] [stdout] 853 | | return Hit::KeyDown(kd.clone()) [INFO] [stdout] 854 | | } [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] 851 ~ Event::KeyDown(kd) [INFO] [stdout] 852 ~ if cx.keyboard.has_key_focus(area) => { [INFO] [stdout] 853 | return Hit::KeyDown(kd.clone()) [INFO] [stdout] 854 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/video.rs:236:9 [INFO] [stdout] | [INFO] [stdout] 236 | return 0 [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 236 - return 0 [INFO] [stdout] 236 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/event/finger.rs:857:17 [INFO] [stdout] | [INFO] [stdout] 857 | / if cx.keyboard.has_key_focus(area) { [INFO] [stdout] 858 | | return Hit::KeyUp(ku.clone()) [INFO] [stdout] 859 | | } [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] 856 ~ Event::KeyUp(ku) [INFO] [stdout] 857 ~ if cx.keyboard.has_key_focus(area) => { [INFO] [stdout] 858 | return Hit::KeyUp(ku.clone()) [INFO] [stdout] 859 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/event/finger.rs:862:17 [INFO] [stdout] | [INFO] [stdout] 862 | / if cx.keyboard.has_key_focus(area) { [INFO] [stdout] 863 | | return Hit::TextInput(ti.clone()) [INFO] [stdout] 864 | | } [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] 861 ~ Event::TextInput(ti) [INFO] [stdout] 862 ~ if cx.keyboard.has_key_focus(area) => { [INFO] [stdout] 863 | return Hit::TextInput(ti.clone()) [INFO] [stdout] 864 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/event/finger.rs:867:17 [INFO] [stdout] | [INFO] [stdout] 867 | / if cx.keyboard.has_key_focus(area) { [INFO] [stdout] 868 | | return Hit::TextCopy(tc.clone()); [INFO] [stdout] 869 | | } [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] 866 ~ Event::TextCopy(tc) [INFO] [stdout] 867 ~ if cx.keyboard.has_key_focus(area) => { [INFO] [stdout] 868 | return Hit::TextCopy(tc.clone()); [INFO] [stdout] 869 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/event/finger.rs:872:17 [INFO] [stdout] | [INFO] [stdout] 872 | / if cx.keyboard.has_key_focus(area) { [INFO] [stdout] 873 | | return Hit::TextCut(tc.clone()); [INFO] [stdout] 874 | | } [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] 871 ~ Event::TextCut(tc) [INFO] [stdout] 872 ~ if cx.keyboard.has_key_focus(area) => { [INFO] [stdout] 873 | return Hit::TextCut(tc.clone()); [INFO] [stdout] 874 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `KeyEvent` which implements the `Copy` trait [INFO] [stdout] --> src/event/finger.rs:853:41 [INFO] [stdout] | [INFO] [stdout] 853 | return Hit::KeyDown(kd.clone()) [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*kd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `KeyEvent` which implements the `Copy` trait [INFO] [stdout] --> src/event/finger.rs:858:39 [INFO] [stdout] | [INFO] [stdout] 858 | return Hit::KeyUp(ku.clone()) [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ku` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:883:46 [INFO] [stdout] | [INFO] [stdout] 883 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:913:62 [INFO] [stdout] | [INFO] [stdout] 913 | ... let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:934:58 [INFO] [stdout] | [INFO] [stdout] 934 | ... let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:955:58 [INFO] [stdout] | [INFO] [stdout] 955 | ... let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:977:58 [INFO] [stdout] | [INFO] [stdout] 977 | ... let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/video.rs:330:13 [INFO] [stdout] | [INFO] [stdout] 330 | write!(f, "Capture Device: {}\n", desc.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 330 - write!(f, "Capture Device: {}\n", desc.name).unwrap(); [INFO] [stdout] 330 + writeln!(f, "Capture Device: {}", desc.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/video.rs:332:17 [INFO] [stdout] | [INFO] [stdout] 332 | ... write!(f, " format: w:{} h:{} framerate:{:?} pixel:{:?} \n", format.width, format.height, format.frame_rate, format.pixel_format).un... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 332 - write!(f, " format: w:{} h:{} framerate:{:?} pixel:{:?} \n", format.width, format.height, format.frame_rate, format.pixel_format).unwrap(); [INFO] [stdout] 332 + writeln!(f, " format: w:{} h:{} framerate:{:?} pixel:{:?} ", format.width, format.height, format.frame_rate, format.pixel_format).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:1067:46 [INFO] [stdout] | [INFO] [stdout] 1067 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:1198:50 [INFO] [stdout] | [INFO] [stdout] 1198 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:1225:46 [INFO] [stdout] | [INFO] [stdout] 1225 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:1265:46 [INFO] [stdout] | [INFO] [stdout] 1265 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:1297:46 [INFO] [stdout] | [INFO] [stdout] 1297 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:1320:46 [INFO] [stdout] | [INFO] [stdout] 1320 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/finger.rs:1344:46 [INFO] [stdout] | [INFO] [stdout] 1344 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_matrix.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | / return Self{ [INFO] [stdout] 50 | | pool, [INFO] [stdout] 51 | | identity [INFO] [stdout] 52 | | } [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 ~ Self{ [INFO] [stdout] 50 + pool, [INFO] [stdout] 51 + identity [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/keyboard.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | return false [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 91 - return false [INFO] [stdout] 91 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/event/keyboard.rs:88:16 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(_) = self.keys_down.iter().position( | k | k.key_code == key_code) { [INFO] [stdout] | -------^^^^^^^---------------------------------------------------------------- help: try: `if self.keys_down.iter().position( | k | k.key_code == key_code).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/event/keyboard.rs:96:16 [INFO] [stdout] | [INFO] [stdout] 96 | if let Some(_) = self.keys_down.iter().position( | k | k.key_code == key_event.key_code) { [INFO] [stdout] | -------^^^^^^^-------------------------------------------------------------------------- help: try: `if self.keys_down.iter().position( | k | k.key_code == key_event.key_code).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [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/draw_shader.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | / match node.value { [INFO] [stdout] 144 | | LiveValue::DSL {token_start, token_count, ..} => { [INFO] [stdout] 145 | | fingerprint.push(LiveNode { [INFO] [stdout] 146 | | id: node.id, [INFO] [stdout] ... | [INFO] [stdout] 151 | | _ => () [INFO] [stdout] 152 | | } [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] 143 ~ if let LiveValue::DSL {token_start, token_count, ..} = node.value { [INFO] [stdout] 144 + fingerprint.push(LiveNode { [INFO] [stdout] 145 + id: node.id, [INFO] [stdout] 146 + origin: node.origin, [INFO] [stdout] 147 + value: LiveValue::DSL {token_start, token_count, expand_index: None} [INFO] [stdout] 148 + }); [INFO] [stdout] 149 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/event/keyboard.rs:136:1 [INFO] [stdout] | [INFO] [stdout] 136 | / impl Default for KeyCode { [INFO] [stdout] 137 | | fn default() -> Self {KeyCode::Unknown} [INFO] [stdout] 138 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 136 + [INFO] [stdout] 137 | [INFO] [stdout] ... [INFO] [stdout] 140 | #[derive(Live, LiveHook, Clone, Copy, Debug, SerBin, DeBin, SerJson, DeJson, Eq, PartialEq)] [INFO] [stdout] 141 + #[derive(Default)] [INFO] [stdout] 142 | pub enum KeyCode { [INFO] [stdout] 143 | #[pick] Escape, [INFO] [stdout] ... [INFO] [stdout] 257 | [INFO] [stdout] 258 ~ #[default] [INFO] [stdout] 259 ~ Unknown, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_list.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | return Some(&d.item) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - return Some(&d.item) [INFO] [stdout] 64 + Some(&d.item) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/draw_list.rs:136:1 [INFO] [stdout] | [INFO] [stdout] 136 | / pub enum CxDrawKind{ [INFO] [stdout] 137 | | SubList(DrawListId), [INFO] [stdout] | | ------------------- the second-largest variant contains at least 16 bytes [INFO] [stdout] 138 | | DrawCall(CxDrawCall), [INFO] [stdout] | | -------------------- the largest variant contains at least 1160 bytes [INFO] [stdout] 139 | | Empty [INFO] [stdout] 140 | | } [INFO] [stdout] | |_^ the entire enum is at least 1160 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 138 - DrawCall(CxDrawCall), [INFO] [stdout] 138 + DrawCall(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/draw_list.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | / match self{ [INFO] [stdout] 159 | | CxDrawKind::Empty=>true, [INFO] [stdout] 160 | | _=>false [INFO] [stdout] 161 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 158 - match self{ [INFO] [stdout] 159 - CxDrawKind::Empty=>true, [INFO] [stdout] 160 - _=>false [INFO] [stdout] 161 - } [INFO] [stdout] 158 + matches!(self, CxDrawKind::Empty) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/draw_list.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | / if draw_vars.draw_shader.is_none(){ [INFO] [stdout] 337 | | return None [INFO] [stdout] 338 | | } [INFO] [stdout] | |_________^ help: replace it with: `draw_vars.draw_shader?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_list.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... return false [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 372 - return false [INFO] [stdout] 372 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/draw_vars.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | module_id: LiveModuleId::from_str(&module_path!()).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `module_path!()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/draw_vars.rs:170:21 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn as_slice<'a>(&'a self) -> &'a [f32] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 170 - pub fn as_slice<'a>(&'a self) -> &'a [f32] { [INFO] [stdout] 170 + pub fn as_slice(&self) -> &[f32] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting raw pointers to the same type and constness is unnecessary (`*const f32` -> `*const f32`) [INFO] [stdout] --> src/draw_vars.rs:172:40 [INFO] [stdout] | [INFO] [stdout] 172 | ...lice::from_raw_parts((&self.var_instances[self.var_instance_start - 1] as *const _ as *const f32).offset(1), self.var_instance_s... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.var_instances[self.var_instance_start - 1] as *const _` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&live_type).is_some()` [INFO] [stdout] --> src/draw_vars.rs:258:66 [INFO] [stdout] | [INFO] [stdout] 258 | ... if shader_registry.enums.get(&live_type).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(&live_type)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:447:39 [INFO] [stdout] | [INFO] [stdout] 447 | ... instances[input.offset + 0 + j * stride] = rect.pos.x as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `input.offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:453:39 [INFO] [stdout] | [INFO] [stdout] 453 | ... instances[input.offset + 0 + j * stride] = rect.size.x as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `input.offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 544 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 545 | | value[i] = self_slice[offset + i] [INFO] [stdout] 546 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `value[..value.len().min(slots)].copy_from_slice(&self_slice[offset..(value.len().min(slots) + offset)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:559:21 [INFO] [stdout] | [INFO] [stdout] 559 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 560 | | self.var_instances[offset + i] = value[i]; [INFO] [stdout] 561 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `self.var_instances[offset..(value.len().min(slots) + offset)].copy_from_slice(&value[..value.len().min(slots)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:574:21 [INFO] [stdout] | [INFO] [stdout] 574 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 575 | | value[i] = self.user_uniforms[offset + i]; [INFO] [stdout] 576 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `value[..value.len().min(slots)].copy_from_slice(&self.user_uniforms[offset..(value.len().min(slots) + offset)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/draw_vars.rs:589:21 [INFO] [stdout] | [INFO] [stdout] 589 | / for i in 0..value.len().min(slots) { [INFO] [stdout] 590 | | self.user_uniforms[offset + i] = value[i] [INFO] [stdout] 591 | | } [INFO] [stdout] | |_____________________^ help: try replacing the loop by: `self.user_uniforms[offset..(value.len().min(slots) + offset)].copy_from_slice(&value[..value.len().min(slots)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:627:17 [INFO] [stdout] | [INFO] [stdout] 627 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 627 - return index; [INFO] [stdout] 627 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:634:17 [INFO] [stdout] | [INFO] [stdout] 634 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 634 - return index; [INFO] [stdout] 634 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:642:17 [INFO] [stdout] | [INFO] [stdout] 642 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 642 - return index; [INFO] [stdout] 642 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:651:17 [INFO] [stdout] | [INFO] [stdout] 651 | return index; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 651 - return index; [INFO] [stdout] 651 + index [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/draw_vars.rs:654:17 [INFO] [stdout] | [INFO] [stdout] 654 | return nodes.skip_node(index) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 654 - return nodes.skip_node(index) [INFO] [stdout] 654 + nodes.skip_node(index) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:626:24 [INFO] [stdout] | [INFO] [stdout] 626 | output[offset + 0] = v; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:632:24 [INFO] [stdout] | [INFO] [stdout] 632 | output[offset + 0] = v.x; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:639:24 [INFO] [stdout] | [INFO] [stdout] 639 | output[offset + 0] = v.x; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/draw_vars.rs:647:24 [INFO] [stdout] | [INFO] [stdout] 647 | output[offset + 0] = v.x; [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/draw_vars.rs:695:36 [INFO] [stdout] | [INFO] [stdout] 695 | let unknown_shader_props = match nodes[index].id { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 696 | | live_id!(debug) => false, [INFO] [stdout] 697 | | live_id!(debug_id) => false, [INFO] [stdout] 698 | | live_id!(draw_call_group) => false, [INFO] [stdout] 699 | | _ => true [INFO] [stdout] 700 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 695 - let unknown_shader_props = match nodes[index].id { [INFO] [stdout] 696 - live_id!(debug) => false, [INFO] [stdout] 697 - live_id!(debug_id) => false, [INFO] [stdout] 698 - live_id!(draw_call_group) => false, [INFO] [stdout] 699 - _ => true [INFO] [stdout] 700 - }; [INFO] [stdout] 695 + let unknown_shader_props = !matches!(nodes[index].id, live_id!(debug) | live_id!(debug_id) | live_id!(draw_call_group)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/event/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod event; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/event/event.rs:428:9 [INFO] [stdout] | [INFO] [stdout] 428 | / match self{ [INFO] [stdout] 429 | | Self::MouseDown(_)| [INFO] [stdout] 430 | | Self::MouseMove(_)| [INFO] [stdout] 431 | | Self::TouchUpdate(_)| [INFO] [stdout] 432 | | Self::Scroll(_)=>true, [INFO] [stdout] 433 | | _=>false [INFO] [stdout] 434 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 428 ~ matches!(self, Self::MouseDown(_)| [INFO] [stdout] 429 + Self::MouseMove(_)| [INFO] [stdout] 430 + Self::TouchUpdate(_)| [INFO] [stdout] 431 + Self::Scroll(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/event/keyboard.rs:264:9 [INFO] [stdout] | [INFO] [stdout] 264 | / match self{ [INFO] [stdout] 265 | | Self::Unknown=>true, [INFO] [stdout] 266 | | _=>false [INFO] [stdout] 267 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 264 - match self{ [INFO] [stdout] 265 - Self::Unknown=>true, [INFO] [stdout] 266 - _=>false [INFO] [stdout] 267 - } [INFO] [stdout] 264 + matches!(self, Self::Unknown) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/event/event.rs:460:16 [INFO] [stdout] | [INFO] [stdout] 460 | || self.draw_lists.len() != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.draw_lists.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: length comparison to zero [INFO] [stdout] --> src/event/event.rs:461:16 [INFO] [stdout] | [INFO] [stdout] 461 | || self.draw_lists_and_children.len() != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.draw_lists_and_children.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/event.rs:551:32 [INFO] [stdout] | [INFO] [stdout] 551 | if ne.set.contains(&self){ [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/event/xr.rs:317:80 [INFO] [stdout] | [INFO] [stdout] 317 | for (_hindex, hand) in [&e.state.left_hand, &e.state.right_hand].iter().enumerate(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 317 - for (_hindex, hand) in [&e.state.left_hand, &e.state.right_hand].iter().enumerate(){ [INFO] [stdout] 317 + for hand in [&e.state.left_hand, &e.state.right_hand].iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/event/xr.rs:319:58 [INFO] [stdout] | [INFO] [stdout] 319 | for (_index,_joint) in hand.joints.iter().enumerate(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 319 - for (_index,_joint) in hand.joints.iter().enumerate(){ [INFO] [stdout] 319 + for _joint in hand.joints.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/xr.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | return Hit::Nothing [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 394 - return Hit::Nothing [INFO] [stdout] 394 + Hit::Nothing [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/event/xr.rs:349:13 [INFO] [stdout] | [INFO] [stdout] 349 | / if hit_test(abs, &rect, &options.margin) { [INFO] [stdout] 350 | | if tip.pos.z <20.0 && tip.pos.z > -30.0{ [INFO] [stdout] 351 | | let device = DigitDevice::XrHand { is_left: tip.is_left, index: tip.index }; [INFO] [stdout] 352 | | let digit_id = live_id_num!(xrfinger, tip.index as u64 + if tip.is_left{10} else{0}).into(); [INFO] [stdout] ... | [INFO] [stdout] 365 | | } [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] 349 ~ if hit_test(abs, &rect, &options.margin) [INFO] [stdout] 350 ~ && tip.pos.z <20.0 && tip.pos.z > -30.0{ [INFO] [stdout] 351 | let device = DigitDevice::XrHand { is_left: tip.is_left, index: tip.index }; [INFO] [stdout] ... [INFO] [stdout] 363 | }); [INFO] [stdout] 364 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/network.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | / return SplitUrl{ [INFO] [stdout] 118 | | proto, [INFO] [stdout] 119 | | host, [INFO] [stdout] 120 | | port, [INFO] [stdout] 121 | | file, [INFO] [stdout] 122 | | hash [INFO] [stdout] 123 | | } [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 117 ~ SplitUrl{ [INFO] [stdout] 118 + proto, [INFO] [stdout] 119 + host, [INFO] [stdout] 120 + port, [INFO] [stdout] 121 + file, [INFO] [stdout] 122 + hash [INFO] [stdout] 123 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/finger.rs:273:13 [INFO] [stdout] | [INFO] [stdout] 273 | / return [INFO] [stdout] 274 | | pos.x >= rect.pos.x - margin.left [INFO] [stdout] 275 | | && pos.x <= rect.pos.x + rect.size.x + margin.right [INFO] [stdout] 276 | | && pos.y >= rect.pos.y - margin.top [INFO] [stdout] 277 | | && pos.y <= rect.pos.y + rect.size.y + margin.bottom; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 273 ~ pos.x >= rect.pos.x - margin.left [INFO] [stdout] 274 + && pos.x <= rect.pos.x + rect.size.x + margin.right [INFO] [stdout] 275 + && pos.y >= rect.pos.y - margin.top [INFO] [stdout] 276 ~ && pos.y <= rect.pos.y + rect.size.y + margin.bottom [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/event/finger.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | return rect.contains(pos); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 280 - return rect.contains(pos); [INFO] [stdout] 280 + rect.contains(pos) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/event/network.rs:139:46 [INFO] [stdout] | [INFO] [stdout] 139 | let entry = self.headers.entry(name).or_insert(Vec::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/event/network.rs:189:46 [INFO] [stdout] | [INFO] [stdout] 189 | let entry = self.headers.entry(name).or_insert(Vec::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/network.rs:209:39 [INFO] [stdout] | [INFO] [stdout] 209 | let json = str::from_utf8(&body).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/network.rs:210:38 [INFO] [stdout] | [INFO] [stdout] 210 | DeJson::deserialize_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/event/finger.rs:442:9 [INFO] [stdout] | [INFO] [stdout] 442 | self.captures.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.captures.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: unneeded `return` statement [INFO] [stdout] --> src/event/finger.rs:474:9 [INFO] [stdout] | [INFO] [stdout] 474 | return self.tap.count [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 474 - return self.tap.count [INFO] [stdout] 474 + self.tap.count [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/event/designer.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / match self{ [INFO] [stdout] 24 | | Event::DesignerPick(e) => { [INFO] [stdout] 25 | | let rect = area.clipped_rect(&cx); [INFO] [stdout] 26 | | if Margin::rect_contains_with_margin(e.abs, &rect, &None){ [INFO] [stdout] ... | [INFO] [stdout] 30 | | _=>{} [INFO] [stdout] 31 | | } [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] 23 ~ if let Event::DesignerPick(e) = self { [INFO] [stdout] 24 + let rect = area.clipped_rect(&cx); [INFO] [stdout] 25 + if Margin::rect_contains_with_margin(e.abs, &rect, &None){ [INFO] [stdout] 26 + return HitDesigner::DesignerPick(e.clone()) [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/event/designer.rs:25:46 [INFO] [stdout] | [INFO] [stdout] 25 | let rect = area.clipped_rect(&cx); [INFO] [stdout] | ^^^ help: change this to: `cx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/area.rs:45:1 [INFO] [stdout] | [INFO] [stdout] 45 | / impl Default for Area { [INFO] [stdout] 46 | | fn default() -> Area { [INFO] [stdout] 47 | | Area::Empty [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 38 + #[derive(Default)] [INFO] [stdout] 39 | pub enum Area { [INFO] [stdout] 40 ~ #[default] [INFO] [stdout] 41 ~ Empty, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/area.rs:63:1 [INFO] [stdout] | [INFO] [stdout] 63 | impl Into for InstanceArea { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 63 ~ impl From for Area { [INFO] [stdout] 64 ~ fn from(val: InstanceArea) -> Self { [INFO] [stdout] 65 ~ Area::Instance(val) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Area` which implements the `Copy` trait [INFO] [stdout] --> src/area.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | self.clone() [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/area.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | / return match self { [INFO] [stdout] 97 | | Area::Instance(inst) => { [INFO] [stdout] 98 | | Some(inst.draw_list_id) [INFO] [stdout] 99 | | }, [INFO] [stdout] ... | [INFO] [stdout] 103 | | _ => None [INFO] [stdout] 104 | | } [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 96 ~ match self { [INFO] [stdout] 97 + Area::Instance(inst) => { [INFO] [stdout] 98 + Some(inst.draw_list_id) [INFO] [stdout] 99 + }, [INFO] [stdout] 100 + Area::Rect(list) => { [INFO] [stdout] 101 + Some(list.draw_list_id) [INFO] [stdout] 102 + } [INFO] [stdout] 103 + _ => None [INFO] [stdout] 104 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/area.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | / return match self { [INFO] [stdout] 109 | | Area::Instance(inst) => { [INFO] [stdout] 110 | | Some(inst.redraw_id) [INFO] [stdout] 111 | | }, [INFO] [stdout] ... | [INFO] [stdout] 115 | | _ => None [INFO] [stdout] 116 | | } [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 108 ~ match self { [INFO] [stdout] 109 + Area::Instance(inst) => { [INFO] [stdout] 110 + Some(inst.redraw_id) [INFO] [stdout] 111 + }, [INFO] [stdout] 112 + Area::Rect(list) => { [INFO] [stdout] 113 + Some(list.redraw_id) [INFO] [stdout] 114 + } [INFO] [stdout] 115 + _ => None [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/area.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | / return match self { [INFO] [stdout] 121 | | Area::Instance(inst) => { [INFO] [stdout] 122 | | inst.instance_offset == 0 [INFO] [stdout] 123 | | }, [INFO] [stdout] 124 | | _ => false, [WARN] too many lines in the log, truncating it