[INFO] cloning repository https://github.com/vecnode/web-timeline [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/vecnode/web-timeline" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvecnode%2Fweb-timeline", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvecnode%2Fweb-timeline'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c23414cdd972ba8f5408f9e82bb4c96d462347c1 [INFO] linting vecnode/web-timeline against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvecnode%2Fweb-timeline" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/vecnode/web-timeline [INFO] finished tweaking git repo https://github.com/vecnode/web-timeline [INFO] tweaked toml for git repo https://github.com/vecnode/web-timeline written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/vecnode/web-timeline on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/vecnode/web-timeline 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 egui_plot v0.29.0 [INFO] [stderr] Downloaded ecolor v0.29.1 [INFO] [stderr] Downloaded emath v0.29.1 [INFO] [stderr] Downloaded piper v0.2.5 [INFO] [stderr] Downloaded accesskit_unix v0.12.3 [INFO] [stderr] Downloaded egui-wgpu v0.29.1 [INFO] [stderr] Downloaded accesskit_consumer v0.24.3 [INFO] [stderr] Downloaded accesskit_windows v0.23.2 [INFO] [stderr] Downloaded epaint v0.29.1 [INFO] [stderr] Downloaded egui_glow v0.29.1 [INFO] [stderr] Downloaded eframe v0.29.1 [INFO] [stderr] Downloaded accesskit_macos v0.17.4 [INFO] [stderr] Downloaded accesskit_atspi_common v0.9.3 [INFO] [stderr] Downloaded wgpu v22.1.0 [INFO] [stderr] Downloaded glow v0.14.2 [INFO] [stderr] Downloaded uds_windows v1.2.1 [INFO] [stderr] Downloaded accesskit_winit v0.22.4 [INFO] [stderr] Downloaded egui-winit v0.29.1 [INFO] [stderr] Downloaded accesskit v0.16.3 [INFO] [stderr] Downloaded egui v0.29.1 [INFO] [stderr] Downloaded epaint_default_fonts v0.29.1 [INFO] [stderr] Downloaded orbclient v0.3.51 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a6bbe9b14e27192638d562db7e3f56c2a9a0033813743170d818506e0962c8b9 [INFO] running `Command { std: "docker" "start" "-a" "a6bbe9b14e27192638d562db7e3f56c2a9a0033813743170d818506e0962c8b9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a6bbe9b14e27192638d562db7e3f56c2a9a0033813743170d818506e0962c8b9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a6bbe9b14e27192638d562db7e3f56c2a9a0033813743170d818506e0962c8b9", kill_on_drop: false }` [INFO] [stdout] a6bbe9b14e27192638d562db7e3f56c2a9a0033813743170d818506e0962c8b9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9fe259ab2a76c72dd00bd2ed190b49efcefa07299f8c69e070e11ea06b7f87d5 [INFO] running `Command { std: "docker" "start" "-a" "9fe259ab2a76c72dd00bd2ed190b49efcefa07299f8c69e070e11ea06b7f87d5", kill_on_drop: false }` [INFO] [stderr] Checking once_cell v1.21.4 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling libc v0.2.183 [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Checking linux-raw-sys v0.12.1 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling memchr v2.8.0 [INFO] [stderr] Checking pin-project-lite v0.2.17 [INFO] [stderr] Checking libloading v0.8.9 [INFO] [stderr] Compiling wayland-sys v0.31.10 [INFO] [stderr] Checking dlib v0.5.3 [INFO] [stderr] Compiling find-msvc-tools v0.1.9 [INFO] [stderr] Checking slab v0.4.12 [INFO] [stderr] Compiling zerocopy v0.8.42 [INFO] [stderr] Compiling cc v1.2.57 [INFO] [stderr] Checking futures-core v0.3.32 [INFO] [stderr] Compiling wayland-client v0.31.13 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling quick-xml v0.39.2 [INFO] [stderr] Checking futures-io v0.3.32 [INFO] [stderr] Checking event-listener v5.4.1 [INFO] [stderr] Checking stable_deref_trait v1.2.1 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Checking futures-lite v2.6.1 [INFO] [stderr] Compiling wayland-scanner v0.31.9 [INFO] [stderr] Compiling wayland-backend v0.3.14 [INFO] [stderr] Checking endi v1.1.1 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking piper v0.2.5 [INFO] [stderr] Checking async-channel v2.5.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling async-io v2.6.0 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Checking blocking v1.6.2 [INFO] [stderr] Checking async-lock v3.4.2 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.10 [INFO] [stderr] Checking futures-task v0.3.32 [INFO] [stderr] Checking futures-sink v0.3.32 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking async-fs v2.2.0 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking nix v0.29.0 [INFO] [stderr] Checking async-executor v1.14.0 [INFO] [stderr] Checking xdg-home v1.3.0 [INFO] [stderr] Checking async-broadcast v0.7.2 [INFO] [stderr] Checking ordered-stream v0.2.0 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Compiling xml-rs v0.8.28 [INFO] [stderr] Checking writeable v0.6.2 [INFO] [stderr] Checking litemap v0.8.1 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Checking memmap2 v0.9.10 [INFO] [stderr] Compiling icu_properties_data v2.1.2 [INFO] [stderr] Compiling icu_normalizer_data v2.1.1 [INFO] [stderr] Checking accesskit v0.16.3 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling zvariant_utils v2.1.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking polling v3.11.0 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking x11rb-protocol v0.13.2 [INFO] [stderr] Checking immutable-chunkmap v2.1.2 [INFO] [stderr] Compiling winit v0.30.13 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking epaint_default_fonts v0.29.1 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Compiling glutin_glx_sys v0.6.1 [INFO] [stderr] Checking accesskit_consumer v0.24.3 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Compiling glutin_egl_sys v0.7.1 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling enumflags2_derive v0.7.12 [INFO] [stderr] Compiling zvariant_derive v4.2.0 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Checking wayland-protocols v0.32.11 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Compiling zbus_macros v4.4.0 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking wayland-cursor v0.31.13 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking enumflags2 v0.7.12 [INFO] [stderr] Compiling quick-xml v0.30.0 [INFO] [stderr] Checking zvariant v4.2.0 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking emath v0.29.1 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking ecolor v0.29.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking epaint v0.29.1 [INFO] [stderr] Checking calloop v0.14.4 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking zbus_names v3.0.0 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Compiling smithay-client-toolkit v0.20.0 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking zbus_xml v4.0.0 [INFO] [stderr] Checking zbus v4.4.0 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.11 [INFO] [stderr] Checking zbus-lockstep v0.4.4 [INFO] [stderr] Checking wayland-protocols-plasma v0.3.11 [INFO] [stderr] Checking wayland-protocols-misc v0.3.11 [INFO] [stderr] Checking wayland-protocols-experimental v20250721.0.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking egui v0.29.1 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Checking calloop-wayland-source v0.4.1 [INFO] [stderr] Checking smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking crc32fast v1.5.0 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Compiling glutin v0.32.3 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Compiling zbus-lockstep-macros v0.4.4 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Compiling glutin-winit v0.5.0 [INFO] [stderr] Checking pxfm v0.1.28 [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Checking sctk-adwaita v0.10.1 [INFO] [stderr] Checking png v0.18.1 [INFO] [stderr] Checking webbrowser v1.2.0 [INFO] [stderr] Checking smithay-clipboard v0.7.3 [INFO] [stderr] Compiling litrs v1.0.0 [INFO] [stderr] Checking glow v0.14.2 [INFO] [stderr] Compiling document-features v0.2.12 [INFO] [stderr] Checking egui_plot v0.29.0 [INFO] [stderr] Checking arboard v3.6.1 [INFO] [stderr] Checking egui_glow v0.29.1 [INFO] [stderr] Checking moxcms v0.8.1 [INFO] [stderr] Checking atspi-common v0.6.0 [INFO] [stderr] Checking atspi-proxies v0.6.0 [INFO] [stderr] Checking accesskit_atspi_common v0.9.3 [INFO] [stderr] Checking image v0.25.10 [INFO] [stderr] Checking atspi-connection v0.6.0 [INFO] [stderr] Checking atspi v0.22.0 [INFO] [stderr] Checking accesskit_unix v0.12.3 [INFO] [stderr] Checking accesskit_winit v0.22.4 [INFO] [stderr] Checking egui-winit v0.29.1 [INFO] [stderr] Checking eframe v0.29.1 [INFO] [stderr] Checking ams-timeline v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:226:9 [INFO] [stdout] | [INFO] [stdout] 226 | / if let Some(header_rect) = self.tracks.header_full_rect { [INFO] [stdout] 227 | | if self.track_id.is_some() { [INFO] [stdout] 228 | | const LEFT_COLUMN_WIDTH: f32 = 20.0; [INFO] [stdout] 229 | | let left_column_rect = egui::Rect::from_min_max( [INFO] [stdout] ... | [INFO] [stdout] 237 | | } [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] 226 ~ if let Some(header_rect) = self.tracks.header_full_rect [INFO] [stdout] 227 ~ && self.track_id.is_some() { [INFO] [stdout] 228 | const LEFT_COLUMN_WIDTH: f32 = 20.0; [INFO] [stdout] ... [INFO] [stdout] 235 | .rect_filled(left_column_rect, 0.0, egui::Color32::from_gray(95)); [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:297:9 [INFO] [stdout] | [INFO] [stdout] 297 | / if let Some(track_id) = &self.track_id { [INFO] [stdout] 298 | | if let Some(on_click) = on_track_click { [INFO] [stdout] 299 | | // Check if pointer clicked on the full track area [INFO] [stdout] 300 | | let pointer_pos = self.ui.input(|i| i.pointer.interact_pos()); [INFO] [stdout] ... | [INFO] [stdout] 314 | | } [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] 297 ~ if let Some(track_id) = &self.track_id [INFO] [stdout] 298 ~ && let Some(on_click) = on_track_click { [INFO] [stdout] 299 | // Check if pointer clicked on the full track area [INFO] [stdout] ... [INFO] [stdout] 312 | } [INFO] [stdout] 313 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | / if pointer_pressed { [INFO] [stdout] 304 | | if let Some(pos) = pointer_pos { [INFO] [stdout] 305 | | if full_track_rect.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 312 | | } [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] 303 ~ if pointer_pressed [INFO] [stdout] 304 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 305 | if full_track_rect.contains(pos) { [INFO] [stdout] ... [INFO] [stdout] 310 | } [INFO] [stdout] 311 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:304:21 [INFO] [stdout] | [INFO] [stdout] 304 | / if let Some(pos) = pointer_pos { [INFO] [stdout] 305 | | if full_track_rect.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 311 | | } [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] 304 ~ if let Some(pos) = pointer_pos [INFO] [stdout] 305 ~ && full_track_rect.contains(pos) { [INFO] [stdout] 306 | // Select track on any click within the full track area (header + content) [INFO] [stdout] ... [INFO] [stdout] 309 | on_click(track_id.clone(), shift_pressed); [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/grid.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Some(max_tick) = max_absolute_tick { [INFO] [stdout] 70 | | if absolute_tick > max_tick { [INFO] [stdout] 71 | | break; [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [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] 69 ~ if let Some(max_tick) = max_absolute_tick [INFO] [stdout] 70 ~ && absolute_tick > max_tick { [INFO] [stdout] 71 | break; [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/interaction.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | } else if shift_pressed || delta.x != 0.0 { [INFO] [stdout] | ____________^ [INFO] [stdout] 37 | | if delta.x != 0.0 { [INFO] [stdout] 38 | | let ticks_per_point = timeline_api.musical_ruler_info().ticks_per_point(); [INFO] [stdout] 39 | | let timeline_width = timeline_rect.width(); [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [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] 36 ~ } else if (shift_pressed || delta.x != 0.0) { [INFO] [stdout] 37 ~ && delta.x != 0.0 { [INFO] [stdout] 38 | let ticks_per_point = timeline_api.musical_ruler_info().ticks_per_point(); [INFO] [stdout] ... [INFO] [stdout] 72 | } [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/interaction.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 98 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] 98 + if !(!pointer_over || !pointer_pressed && !pointer_down) { [INFO] [stdout] | [INFO] [stdout] 98 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] 98 + if (pointer_down || pointer_pressed) && pointer_over { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/interaction.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | / if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] 99 | | if let Some(pt) = pointer_pos { [INFO] [stdout] 100 | | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 101 | | api.set_playhead_ticks(tick); [INFO] [stdout] 102 | | } [INFO] [stdout] 103 | | } [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] 98 ~ if ((pointer_pressed && pointer_over) || (pointer_down && pointer_over)) { [INFO] [stdout] 99 ~ && let Some(pt) = pointer_pos { [INFO] [stdout] 100 | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 101 | api.set_playhead_ticks(tick); [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/interaction.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | / if is_dragging_this_track { [INFO] [stdout] 207 | | if let Some((_, absolute_start_tick)) = api.get_drag_start() { [INFO] [stdout] 208 | | let timeline_start = api.timeline_start(); [INFO] [stdout] ... | [INFO] [stdout] 227 | | } [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] 206 ~ if is_dragging_this_track [INFO] [stdout] 207 ~ && let Some((_, absolute_start_tick)) = api.get_drag_start() { [INFO] [stdout] 208 | let timeline_start = api.timeline_start(); [INFO] [stdout] ... [INFO] [stdout] 225 | api.end_selection_drag(); [INFO] [stdout] 226 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/interaction.rs:118:39 [INFO] [stdout] | [INFO] [stdout] 118 | let ticks_per_point = if let Some(ref api) = playhead_api { [INFO] [stdout] | ^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 118 - let ticks_per_point = if let Some(ref api) = playhead_api { [INFO] [stdout] 118 + let ticks_per_point = if let Some(api) = playhead_api { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/interaction.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | } else if let Some(ref api) = selection_api { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - } else if let Some(ref api) = selection_api { [INFO] [stdout] 120 + } else if let Some(api) = selection_api { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/playhead.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | / if (pointer_pressed && pointer_over) || response.dragged() { [INFO] [stdout] 120 | | if let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 121 | | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 122 | | api.set_playhead_ticks(tick); [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [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] 119 ~ if ((pointer_pressed && pointer_over) || response.dragged()) { [INFO] [stdout] 120 ~ && let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 121 | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 122 | api.set_playhead_ticks(tick); [INFO] [stdout] 123 | response.mark_changed(); [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ruler.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] 54 + if !(!pointer_over || !pointer_pressed && !pointer_down) || response.dragged() { [INFO] [stdout] | [INFO] [stdout] 54 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] 54 + if (pointer_down || pointer_pressed) && pointer_over || response.dragged() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ruler.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] 55 | | if let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 56 | | // Calculate tick relative to timeline start (same calculation as tracks) [INFO] [stdout] 57 | | let tick = (((pt.x - rect.min.x) / w) * visible_ticks).max(0.0); [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [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] 54 ~ if ((pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged()) { [INFO] [stdout] 55 ~ && let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 56 | // Calculate tick relative to timeline start (same calculation as tracks) [INFO] [stdout] ... [INFO] [stdout] 59 | response.mark_changed(); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ruler.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | / if let Some(max_tick) = max_absolute_tick { [INFO] [stdout] 121 | | if absolute_tick >= max_tick { [INFO] [stdout] 122 | | break; [INFO] [stdout] 123 | | } [INFO] [stdout] 124 | | } [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] 120 ~ if let Some(max_tick) = max_absolute_tick [INFO] [stdout] 121 ~ && absolute_tick >= max_tick { [INFO] [stdout] 122 | break; [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ruler.rs:195:24 [INFO] [stdout] | [INFO] [stdout] 195 | let y = if subdivision_index % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `subdivision_index.is_multiple_of(2)` [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: you should consider adding a `Default` implementation for `Timeline` [INFO] [stdout] --> src/timeline.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> Self { [INFO] [stdout] 27 | | Self { header: None } [INFO] [stdout] 28 | | } [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] 24 + impl Default for Timeline { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:263:9 [INFO] [stdout] | [INFO] [stdout] 263 | / if let Some(top_rect) = self.top_panel_rect { [INFO] [stdout] 264 | | if top_rect.contains(pos) { [INFO] [stdout] 265 | | return Some("Top Panel"); [INFO] [stdout] 266 | | } [INFO] [stdout] 267 | | } [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] 263 ~ if let Some(top_rect) = self.top_panel_rect [INFO] [stdout] 264 ~ && top_rect.contains(pos) { [INFO] [stdout] 265 | return Some("Top Panel"); [INFO] [stdout] 266 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | / if let Some(bottom_rect) = self.bottom_bar_rect { [INFO] [stdout] 269 | | if bottom_rect.contains(pos) { [INFO] [stdout] 270 | | return Some("Bottom Bar (Global)"); [INFO] [stdout] 271 | | } [INFO] [stdout] 272 | | } [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] 268 ~ if let Some(bottom_rect) = self.bottom_bar_rect [INFO] [stdout] 269 ~ && bottom_rect.contains(pos) { [INFO] [stdout] 270 | return Some("Bottom Bar (Global)"); [INFO] [stdout] 271 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/timeline.rs:319:5 [INFO] [stdout] | [INFO] [stdout] 319 | / pub fn top_panel_time( [INFO] [stdout] 320 | | &self, [INFO] [stdout] 321 | | ui: &mut egui::Ui, [INFO] [stdout] 322 | | playhead_api: Option<&dyn crate::playhead::PlayheadApi>, [INFO] [stdout] ... | [INFO] [stdout] 332 | | mut set_total_seconds: impl FnMut(u32), [INFO] [stdout] 333 | | ) -> &Self { [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:371:29 [INFO] [stdout] | [INFO] [stdout] 371 | / ... if ui.button("<").clicked() { [INFO] [stdout] 372 | | ... if let Some(api) = playhead_api { [INFO] [stdout] 373 | | ... // Get current timeline_start (scroll offset) from the API [INFO] [stdout] 374 | | ... let timeline_start = api.timeline_start().unwrap_or(0.0); [INFO] [stdout] ... | [INFO] [stdout] 382 | | ... } [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] 371 ~ if ui.button("<").clicked() [INFO] [stdout] 372 ~ && let Some(api) = playhead_api { [INFO] [stdout] 373 | // Get current timeline_start (scroll offset) from the API [INFO] [stdout] ... [INFO] [stdout] 380 | } [INFO] [stdout] 381 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:387:29 [INFO] [stdout] | [INFO] [stdout] 387 | / ... if ui.button(">").clicked() { [INFO] [stdout] 388 | | ... if let Some(api) = playhead_api { [INFO] [stdout] 389 | | ... // Get current timeline_start (scroll offset) from the API [INFO] [stdout] 390 | | ... let timeline_start = api.timeline_start().unwrap_or(0.0); [INFO] [stdout] ... | [INFO] [stdout] 398 | | ... } [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] 387 ~ if ui.button(">").clicked() [INFO] [stdout] 388 ~ && let Some(api) = playhead_api { [INFO] [stdout] 389 | // Get current timeline_start (scroll offset) from the API [INFO] [stdout] ... [INFO] [stdout] 396 | } [INFO] [stdout] 397 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:226:9 [INFO] [stdout] | [INFO] [stdout] 226 | / if let Some(header_rect) = self.tracks.header_full_rect { [INFO] [stdout] 227 | | if self.track_id.is_some() { [INFO] [stdout] 228 | | const LEFT_COLUMN_WIDTH: f32 = 20.0; [INFO] [stdout] 229 | | let left_column_rect = egui::Rect::from_min_max( [INFO] [stdout] ... | [INFO] [stdout] 237 | | } [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] 226 ~ if let Some(header_rect) = self.tracks.header_full_rect [INFO] [stdout] 227 ~ && self.track_id.is_some() { [INFO] [stdout] 228 | const LEFT_COLUMN_WIDTH: f32 = 20.0; [INFO] [stdout] ... [INFO] [stdout] 235 | .rect_filled(left_column_rect, 0.0, egui::Color32::from_gray(95)); [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:297:9 [INFO] [stdout] | [INFO] [stdout] 297 | / if let Some(track_id) = &self.track_id { [INFO] [stdout] 298 | | if let Some(on_click) = on_track_click { [INFO] [stdout] 299 | | // Check if pointer clicked on the full track area [INFO] [stdout] 300 | | let pointer_pos = self.ui.input(|i| i.pointer.interact_pos()); [INFO] [stdout] ... | [INFO] [stdout] 314 | | } [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] 297 ~ if let Some(track_id) = &self.track_id [INFO] [stdout] 298 ~ && let Some(on_click) = on_track_click { [INFO] [stdout] 299 | // Check if pointer clicked on the full track area [INFO] [stdout] ... [INFO] [stdout] 312 | } [INFO] [stdout] 313 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | / if pointer_pressed { [INFO] [stdout] 304 | | if let Some(pos) = pointer_pos { [INFO] [stdout] 305 | | if full_track_rect.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 312 | | } [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] 303 ~ if pointer_pressed [INFO] [stdout] 304 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 305 | if full_track_rect.contains(pos) { [INFO] [stdout] ... [INFO] [stdout] 310 | } [INFO] [stdout] 311 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/context.rs:304:21 [INFO] [stdout] | [INFO] [stdout] 304 | / if let Some(pos) = pointer_pos { [INFO] [stdout] 305 | | if full_track_rect.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 311 | | } [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] 304 ~ if let Some(pos) = pointer_pos [INFO] [stdout] 305 ~ && full_track_rect.contains(pos) { [INFO] [stdout] 306 | // Select track on any click within the full track area (header + content) [INFO] [stdout] ... [INFO] [stdout] 309 | on_click(track_id.clone(), shift_pressed); [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/grid.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Some(max_tick) = max_absolute_tick { [INFO] [stdout] 70 | | if absolute_tick > max_tick { [INFO] [stdout] 71 | | break; [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [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] 69 ~ if let Some(max_tick) = max_absolute_tick [INFO] [stdout] 70 ~ && absolute_tick > max_tick { [INFO] [stdout] 71 | break; [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/interaction.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | } else if shift_pressed || delta.x != 0.0 { [INFO] [stdout] | ____________^ [INFO] [stdout] 37 | | if delta.x != 0.0 { [INFO] [stdout] 38 | | let ticks_per_point = timeline_api.musical_ruler_info().ticks_per_point(); [INFO] [stdout] 39 | | let timeline_width = timeline_rect.width(); [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [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] 36 ~ } else if (shift_pressed || delta.x != 0.0) { [INFO] [stdout] 37 ~ && delta.x != 0.0 { [INFO] [stdout] 38 | let ticks_per_point = timeline_api.musical_ruler_info().ticks_per_point(); [INFO] [stdout] ... [INFO] [stdout] 72 | } [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/interaction.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 98 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] 98 + if !(!pointer_over || !pointer_pressed && !pointer_down) { [INFO] [stdout] | [INFO] [stdout] 98 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] 98 + if (pointer_down || pointer_pressed) && pointer_over { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/interaction.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | / if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) { [INFO] [stdout] 99 | | if let Some(pt) = pointer_pos { [INFO] [stdout] 100 | | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 101 | | api.set_playhead_ticks(tick); [INFO] [stdout] 102 | | } [INFO] [stdout] 103 | | } [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] 98 ~ if ((pointer_pressed && pointer_over) || (pointer_down && pointer_over)) { [INFO] [stdout] 99 ~ && let Some(pt) = pointer_pos { [INFO] [stdout] 100 | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 101 | api.set_playhead_ticks(tick); [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/interaction.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | / if is_dragging_this_track { [INFO] [stdout] 207 | | if let Some((_, absolute_start_tick)) = api.get_drag_start() { [INFO] [stdout] 208 | | let timeline_start = api.timeline_start(); [INFO] [stdout] ... | [INFO] [stdout] 227 | | } [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] 206 ~ if is_dragging_this_track [INFO] [stdout] 207 ~ && let Some((_, absolute_start_tick)) = api.get_drag_start() { [INFO] [stdout] 208 | let timeline_start = api.timeline_start(); [INFO] [stdout] ... [INFO] [stdout] 225 | api.end_selection_drag(); [INFO] [stdout] 226 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/interaction.rs:118:39 [INFO] [stdout] | [INFO] [stdout] 118 | let ticks_per_point = if let Some(ref api) = playhead_api { [INFO] [stdout] | ^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 118 - let ticks_per_point = if let Some(ref api) = playhead_api { [INFO] [stdout] 118 + let ticks_per_point = if let Some(api) = playhead_api { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/interaction.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | } else if let Some(ref api) = selection_api { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - } else if let Some(ref api) = selection_api { [INFO] [stdout] 120 + } else if let Some(api) = selection_api { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/playhead.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | / if (pointer_pressed && pointer_over) || response.dragged() { [INFO] [stdout] 120 | | if let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 121 | | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 122 | | api.set_playhead_ticks(tick); [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [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] 119 ~ if ((pointer_pressed && pointer_over) || response.dragged()) { [INFO] [stdout] 120 ~ && let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 121 | let tick = (((pt.x - timeline_rect.min.x) / timeline_w) * visible_ticks).max(0.0); [INFO] [stdout] 122 | api.set_playhead_ticks(tick); [INFO] [stdout] 123 | response.mark_changed(); [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ruler.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] 54 + if !(!pointer_over || !pointer_pressed && !pointer_down) || response.dragged() { [INFO] [stdout] | [INFO] [stdout] 54 - if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] 54 + if (pointer_down || pointer_pressed) && pointer_over || response.dragged() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ruler.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / if (pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged() { [INFO] [stdout] 55 | | if let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 56 | | // Calculate tick relative to timeline start (same calculation as tracks) [INFO] [stdout] 57 | | let tick = (((pt.x - rect.min.x) / w) * visible_ticks).max(0.0); [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [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] 54 ~ if ((pointer_pressed && pointer_over) || (pointer_down && pointer_over) || response.dragged()) { [INFO] [stdout] 55 ~ && let Some(pt) = response.interact_pointer_pos() { [INFO] [stdout] 56 | // Calculate tick relative to timeline start (same calculation as tracks) [INFO] [stdout] ... [INFO] [stdout] 59 | response.mark_changed(); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ruler.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | / if let Some(max_tick) = max_absolute_tick { [INFO] [stdout] 121 | | if absolute_tick >= max_tick { [INFO] [stdout] 122 | | break; [INFO] [stdout] 123 | | } [INFO] [stdout] 124 | | } [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] 120 ~ if let Some(max_tick) = max_absolute_tick [INFO] [stdout] 121 ~ && absolute_tick >= max_tick { [INFO] [stdout] 122 | break; [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ruler.rs:195:24 [INFO] [stdout] | [INFO] [stdout] 195 | let y = if subdivision_index % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `subdivision_index.is_multiple_of(2)` [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: you should consider adding a `Default` implementation for `Timeline` [INFO] [stdout] --> src/timeline.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> Self { [INFO] [stdout] 27 | | Self { header: None } [INFO] [stdout] 28 | | } [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] 24 + impl Default for Timeline { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:263:9 [INFO] [stdout] | [INFO] [stdout] 263 | / if let Some(top_rect) = self.top_panel_rect { [INFO] [stdout] 264 | | if top_rect.contains(pos) { [INFO] [stdout] 265 | | return Some("Top Panel"); [INFO] [stdout] 266 | | } [INFO] [stdout] 267 | | } [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] 263 ~ if let Some(top_rect) = self.top_panel_rect [INFO] [stdout] 264 ~ && top_rect.contains(pos) { [INFO] [stdout] 265 | return Some("Top Panel"); [INFO] [stdout] 266 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | / if let Some(bottom_rect) = self.bottom_bar_rect { [INFO] [stdout] 269 | | if bottom_rect.contains(pos) { [INFO] [stdout] 270 | | return Some("Bottom Bar (Global)"); [INFO] [stdout] 271 | | } [INFO] [stdout] 272 | | } [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] 268 ~ if let Some(bottom_rect) = self.bottom_bar_rect [INFO] [stdout] 269 ~ && bottom_rect.contains(pos) { [INFO] [stdout] 270 | return Some("Bottom Bar (Global)"); [INFO] [stdout] 271 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/timeline.rs:319:5 [INFO] [stdout] | [INFO] [stdout] 319 | / pub fn top_panel_time( [INFO] [stdout] 320 | | &self, [INFO] [stdout] 321 | | ui: &mut egui::Ui, [INFO] [stdout] 322 | | playhead_api: Option<&dyn crate::playhead::PlayheadApi>, [INFO] [stdout] ... | [INFO] [stdout] 332 | | mut set_total_seconds: impl FnMut(u32), [INFO] [stdout] 333 | | ) -> &Self { [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:371:29 [INFO] [stdout] | [INFO] [stdout] 371 | / ... if ui.button("<").clicked() { [INFO] [stdout] 372 | | ... if let Some(api) = playhead_api { [INFO] [stdout] 373 | | ... // Get current timeline_start (scroll offset) from the API [INFO] [stdout] 374 | | ... let timeline_start = api.timeline_start().unwrap_or(0.0); [INFO] [stdout] ... | [INFO] [stdout] 382 | | ... } [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] 371 ~ if ui.button("<").clicked() [INFO] [stdout] 372 ~ && let Some(api) = playhead_api { [INFO] [stdout] 373 | // Get current timeline_start (scroll offset) from the API [INFO] [stdout] ... [INFO] [stdout] 380 | } [INFO] [stdout] 381 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/timeline.rs:387:29 [INFO] [stdout] | [INFO] [stdout] 387 | / ... if ui.button(">").clicked() { [INFO] [stdout] 388 | | ... if let Some(api) = playhead_api { [INFO] [stdout] 389 | | ... // Get current timeline_start (scroll offset) from the API [INFO] [stdout] 390 | | ... let timeline_start = api.timeline_start().unwrap_or(0.0); [INFO] [stdout] ... | [INFO] [stdout] 398 | | ... } [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] 387 ~ if ui.button(">").clicked() [INFO] [stdout] 388 ~ && let Some(api) = playhead_api { [INFO] [stdout] 389 | // Get current timeline_start (scroll offset) from the API [INFO] [stdout] ... [INFO] [stdout] 396 | } [INFO] [stdout] 397 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | / if ids_to_remove.is_empty() { [INFO] [stdout] 209 | | if let Some(track_id) = model.tracks.selected_track_id.borrow().clone() { [INFO] [stdout] 210 | | ids_to_remove.push(track_id); [INFO] [stdout] 211 | | } [INFO] [stdout] 212 | | } [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] 208 ~ if ids_to_remove.is_empty() [INFO] [stdout] 209 ~ && let Some(track_id) = model.tracks.selected_track_id.borrow().clone() { [INFO] [stdout] 210 | ids_to_remove.push(track_id); [INFO] [stdout] 211 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:268:36 [INFO] [stdout] | [INFO] [stdout] 268 | blocks.entry(track_id).or_insert_with(Vec::new).push(block); [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/main.rs:401:33 [INFO] [stdout] | [INFO] [stdout] 401 | self.model.zoom_level = (self.model.zoom_level * (1.0 + y_delta * 0.01)).max(0.1).min(3.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(self.model.zoom_level * (1.0 + y_delta * 0.01)).clamp(0.1, 3.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | / if ids_to_remove.is_empty() { [INFO] [stdout] 209 | | if let Some(track_id) = model.tracks.selected_track_id.borrow().clone() { [INFO] [stdout] 210 | | ids_to_remove.push(track_id); [INFO] [stdout] 211 | | } [INFO] [stdout] 212 | | } [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] 208 ~ if ids_to_remove.is_empty() [INFO] [stdout] 209 ~ && let Some(track_id) = model.tracks.selected_track_id.borrow().clone() { [INFO] [stdout] 210 | ids_to_remove.push(track_id); [INFO] [stdout] 211 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/main.rs:424:37 [INFO] [stdout] | [INFO] [stdout] 424 | bar_number = bar_number.min(*self.model.total_seconds.borrow() as u32 - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.model.total_seconds.borrow()` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:268:36 [INFO] [stdout] | [INFO] [stdout] 268 | blocks.entry(track_id).or_insert_with(Vec::new).push(block); [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: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:541:9 [INFO] [stdout] | [INFO] [stdout] 541 | / if let Some((drag_track_id, start_tick)) = self.model.tracks.drag_start_tick.borrow().as_ref() { [INFO] [stdout] 542 | | if drag_track_id == track_id { [INFO] [stdout] 543 | | // Clamp both start and end to maximum position (never exceed timeline end) [INFO] [stdout] 544 | | let max_pos = self.max_playhead_pos(); [INFO] [stdout] ... | [INFO] [stdout] 549 | | } [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] 541 ~ if let Some((drag_track_id, start_tick)) = self.model.tracks.drag_start_tick.borrow().as_ref() [INFO] [stdout] 542 ~ && drag_track_id == track_id { [INFO] [stdout] 543 | // Clamp both start and end to maximum position (never exceed timeline end) [INFO] [stdout] ... [INFO] [stdout] 547 | self.model.tracks.track_selections.borrow_mut().insert(track_id.to_string(), (start, end)); [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/main.rs:401:33 [INFO] [stdout] | [INFO] [stdout] 401 | self.model.zoom_level = (self.model.zoom_level * (1.0 + y_delta * 0.01)).max(0.1).min(3.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(self.model.zoom_level * (1.0 + y_delta * 0.01)).clamp(0.1, 3.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/main.rs:424:37 [INFO] [stdout] | [INFO] [stdout] 424 | bar_number = bar_number.min(*self.model.total_seconds.borrow() as u32 - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.model.total_seconds.borrow()` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:541:9 [INFO] [stdout] | [INFO] [stdout] 541 | / if let Some((drag_track_id, start_tick)) = self.model.tracks.drag_start_tick.borrow().as_ref() { [INFO] [stdout] 542 | | if drag_track_id == track_id { [INFO] [stdout] 543 | | // Clamp both start and end to maximum position (never exceed timeline end) [INFO] [stdout] 544 | | let max_pos = self.max_playhead_pos(); [INFO] [stdout] ... | [INFO] [stdout] 549 | | } [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] 541 ~ if let Some((drag_track_id, start_tick)) = self.model.tracks.drag_start_tick.borrow().as_ref() [INFO] [stdout] 542 ~ && drag_track_id == track_id { [INFO] [stdout] 543 | // Clamp both start and end to maximum position (never exceed timeline end) [INFO] [stdout] ... [INFO] [stdout] 547 | self.model.tracks.track_selections.borrow_mut().insert(track_id.to_string(), (start, end)); [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:931:45 [INFO] [stdout] | [INFO] [stdout] 931 | / ... if pointer_pressed && !block_clicked_this_frame { [INFO] [stdout] 932 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 933 | | ... const EDGE_DETECTION_WIDTH: f32 = 6.0; [INFO] [stdout] ... | [INFO] [stdout] 981 | | ... } [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] 931 ~ if pointer_pressed && !block_clicked_this_frame [INFO] [stdout] 932 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 933 | const EDGE_DETECTION_WIDTH: f32 = 6.0; [INFO] [stdout] ... [INFO] [stdout] 979 | } [INFO] [stdout] 980 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:931:45 [INFO] [stdout] | [INFO] [stdout] 931 | / ... if pointer_pressed && !block_clicked_this_frame { [INFO] [stdout] 932 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 933 | | ... const EDGE_DETECTION_WIDTH: f32 = 6.0; [INFO] [stdout] ... | [INFO] [stdout] 981 | | ... } [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] 931 ~ if pointer_pressed && !block_clicked_this_frame [INFO] [stdout] 932 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 933 | const EDGE_DETECTION_WIDTH: f32 = 6.0; [INFO] [stdout] ... [INFO] [stdout] 979 | } [INFO] [stdout] 980 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:984:45 [INFO] [stdout] | [INFO] [stdout] 984 | / ... if is_resizing_edge && pointer_down { [INFO] [stdout] 985 | | ... if let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() { [INFO] [stdout] 986 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 987 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] ... | [INFO] [stdout] 1017 | | ... } [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] 984 ~ if is_resizing_edge && pointer_down [INFO] [stdout] 985 ~ && let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() { [INFO] [stdout] 986 | if *resize_block_idx == block_idx { [INFO] [stdout] ... [INFO] [stdout] 1015 | } [INFO] [stdout] 1016 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:985:49 [INFO] [stdout] | [INFO] [stdout] 985 | / ... if let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() { [INFO] [stdout] 986 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 987 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 988 | | ... let relative_tick = (pos.x - timeline_rect.left()) * ticks_per_point; [INFO] [stdout] ... | [INFO] [stdout] 1016 | | ... } [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] 985 ~ if let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() [INFO] [stdout] 986 ~ && *resize_block_idx == block_idx { [INFO] [stdout] 987 | if let Some(pos) = pointer_pos { [INFO] [stdout] ... [INFO] [stdout] 1014 | } [INFO] [stdout] 1015 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:984:45 [INFO] [stdout] | [INFO] [stdout] 984 | / ... if is_resizing_edge && pointer_down { [INFO] [stdout] 985 | | ... if let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() { [INFO] [stdout] 986 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 987 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] ... | [INFO] [stdout] 1017 | | ... } [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] 984 ~ if is_resizing_edge && pointer_down [INFO] [stdout] 985 ~ && let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() { [INFO] [stdout] 986 | if *resize_block_idx == block_idx { [INFO] [stdout] ... [INFO] [stdout] 1015 | } [INFO] [stdout] 1016 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:986:53 [INFO] [stdout] | [INFO] [stdout] 986 | / ... if *resize_block_idx == block_idx { [INFO] [stdout] 987 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 988 | | ... let relative_tick = (pos.x - timeline_rect.left()) * ticks_per_point; [INFO] [stdout] 989 | | ... let new_edge_tick = timeline_start + relative_tick; [INFO] [stdout] ... | [INFO] [stdout] 1015 | | ... } [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] 986 ~ if *resize_block_idx == block_idx [INFO] [stdout] 987 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 988 | let relative_tick = (pos.x - timeline_rect.left()) * ticks_per_point; [INFO] [stdout] ... [INFO] [stdout] 1013 | } [INFO] [stdout] 1014 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:992:61 [INFO] [stdout] | [INFO] [stdout] 992 | / ... if let Some(track_blocks) = blocks.get_mut(&track_id_clone) { [INFO] [stdout] 993 | | ... if let Some(block_to_resize) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 994 | | ... let max_pos = self.max_playhead_pos(); [INFO] [stdout] ... | [INFO] [stdout] 1013 | | ... } [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] 992 ~ if let Some(track_blocks) = blocks.get_mut(&track_id_clone) [INFO] [stdout] 993 ~ && let Some(block_to_resize) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 994 | let max_pos = self.max_playhead_pos(); [INFO] [stdout] ... [INFO] [stdout] 1011 | } [INFO] [stdout] 1012 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1020:45 [INFO] [stdout] | [INFO] [stdout] 1020 | / ... if is_dragging_block && pointer_down { [INFO] [stdout] 1021 | | ... if let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() { [INFO] [stdout] 1022 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1023 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] ... | [INFO] [stdout] 1041 | | ... } [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] 1020 ~ if is_dragging_block && pointer_down [INFO] [stdout] 1021 ~ && let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() { [INFO] [stdout] 1022 | if *drag_block_idx == block_idx { [INFO] [stdout] ... [INFO] [stdout] 1039 | } [INFO] [stdout] 1040 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1021:49 [INFO] [stdout] | [INFO] [stdout] 1021 | / ... if let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() { [INFO] [stdout] 1022 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1023 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] ... | [INFO] [stdout] 1040 | | ... } [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] 1021 ~ if let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() [INFO] [stdout] 1022 ~ && *drag_block_idx == block_idx { [INFO] [stdout] 1023 | if let Some(pos) = pointer_pos { [INFO] [stdout] ... [INFO] [stdout] 1038 | } [INFO] [stdout] 1039 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:985:49 [INFO] [stdout] | [INFO] [stdout] 985 | / ... if let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() { [INFO] [stdout] 986 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 987 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 988 | | ... let relative_tick = (pos.x - timeline_rect.left()) * ticks_per_point; [INFO] [stdout] ... | [INFO] [stdout] 1016 | | ... } [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] 985 ~ if let Some((_, resize_block_idx, is_left_edge, _original_edge_tick)) = edge_resize_info.as_ref() [INFO] [stdout] 986 ~ && *resize_block_idx == block_idx { [INFO] [stdout] 987 | if let Some(pos) = pointer_pos { [INFO] [stdout] ... [INFO] [stdout] 1014 | } [INFO] [stdout] 1015 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1022:53 [INFO] [stdout] | [INFO] [stdout] 1022 | / ... if *drag_block_idx == block_idx { [INFO] [stdout] 1023 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 1024 | | ... // Calculate new block position: mouse_x - offset = block center x [INFO] [stdout] 1025 | | ... let block_center_x = pos.x - mouse_offset_x; [INFO] [stdout] ... | [INFO] [stdout] 1039 | | ... } [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] 1022 ~ if *drag_block_idx == block_idx [INFO] [stdout] 1023 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 1024 | // Calculate new block position: mouse_x - offset = block center x [INFO] [stdout] ... [INFO] [stdout] 1037 | } [INFO] [stdout] 1038 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1031:61 [INFO] [stdout] | [INFO] [stdout] 1031 | / ... if let Some(track_blocks) = blocks.get_mut(&track_id_clone) { [INFO] [stdout] 1032 | | ... if let Some(block_to_move) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 1033 | | ... // Clamp to valid range (0 to max_playhead_pos - duration) [INFO] [stdout] 1034 | | ... let max_pos = self.max_playhead_pos() - block_to_move.duration_ticks; [INFO] [stdout] ... | [INFO] [stdout] 1037 | | ... } [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] 1031 ~ if let Some(track_blocks) = blocks.get_mut(&track_id_clone) [INFO] [stdout] 1032 ~ && let Some(block_to_move) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 1033 | // Clamp to valid range (0 to max_playhead_pos - duration) [INFO] [stdout] 1034 | let max_pos = self.max_playhead_pos() - block_to_move.duration_ticks; [INFO] [stdout] 1035 | block_to_move.start_tick = self.controller.clamp_to_timeline_bounds(new_block_start, max_pos); [INFO] [stdout] 1036 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:986:53 [INFO] [stdout] | [INFO] [stdout] 986 | / ... if *resize_block_idx == block_idx { [INFO] [stdout] 987 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 988 | | ... let relative_tick = (pos.x - timeline_rect.left()) * ticks_per_point; [INFO] [stdout] 989 | | ... let new_edge_tick = timeline_start + relative_tick; [INFO] [stdout] ... | [INFO] [stdout] 1015 | | ... } [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] 986 ~ if *resize_block_idx == block_idx [INFO] [stdout] 987 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 988 | let relative_tick = (pos.x - timeline_rect.left()) * ticks_per_point; [INFO] [stdout] ... [INFO] [stdout] 1013 | } [INFO] [stdout] 1014 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1044:45 [INFO] [stdout] | [INFO] [stdout] 1044 | / ... if is_resizing_edge && pointer_released { [INFO] [stdout] 1045 | | ... if let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() { [INFO] [stdout] 1046 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 1047 | | ... *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] ... | [INFO] [stdout] 1050 | | ... } [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] 1044 ~ if is_resizing_edge && pointer_released [INFO] [stdout] 1045 ~ && let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() { [INFO] [stdout] 1046 | if *resize_block_idx == block_idx { [INFO] [stdout] 1047 | *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] 1048 | } [INFO] [stdout] 1049 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:992:61 [INFO] [stdout] | [INFO] [stdout] 992 | / ... if let Some(track_blocks) = blocks.get_mut(&track_id_clone) { [INFO] [stdout] 993 | | ... if let Some(block_to_resize) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 994 | | ... let max_pos = self.max_playhead_pos(); [INFO] [stdout] ... | [INFO] [stdout] 1013 | | ... } [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] 992 ~ if let Some(track_blocks) = blocks.get_mut(&track_id_clone) [INFO] [stdout] 993 ~ && let Some(block_to_resize) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 994 | let max_pos = self.max_playhead_pos(); [INFO] [stdout] ... [INFO] [stdout] 1011 | } [INFO] [stdout] 1012 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1045:49 [INFO] [stdout] | [INFO] [stdout] 1045 | / ... if let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() { [INFO] [stdout] 1046 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 1047 | | ... *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] 1048 | | ... } [INFO] [stdout] 1049 | | ... } [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] 1045 ~ if let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() [INFO] [stdout] 1046 ~ && *resize_block_idx == block_idx { [INFO] [stdout] 1047 | *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] 1048 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1053:45 [INFO] [stdout] | [INFO] [stdout] 1053 | / ... if is_dragging_block && pointer_released { [INFO] [stdout] 1054 | | ... if let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() { [INFO] [stdout] 1055 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1056 | | ... *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] ... | [INFO] [stdout] 1059 | | ... } [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] 1053 ~ if is_dragging_block && pointer_released [INFO] [stdout] 1054 ~ && let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() { [INFO] [stdout] 1055 | if *drag_block_idx == block_idx { [INFO] [stdout] 1056 | *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] 1057 | } [INFO] [stdout] 1058 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1054:49 [INFO] [stdout] | [INFO] [stdout] 1054 | / ... if let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() { [INFO] [stdout] 1055 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1056 | | ... *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] 1057 | | ... } [INFO] [stdout] 1058 | | ... } [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] 1054 ~ if let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() [INFO] [stdout] 1055 ~ && *drag_block_idx == block_idx { [INFO] [stdout] 1056 | *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] 1057 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1020:45 [INFO] [stdout] | [INFO] [stdout] 1020 | / ... if is_dragging_block && pointer_down { [INFO] [stdout] 1021 | | ... if let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() { [INFO] [stdout] 1022 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1023 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] ... | [INFO] [stdout] 1041 | | ... } [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] 1020 ~ if is_dragging_block && pointer_down [INFO] [stdout] 1021 ~ && let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() { [INFO] [stdout] 1022 | if *drag_block_idx == block_idx { [INFO] [stdout] ... [INFO] [stdout] 1039 | } [INFO] [stdout] 1040 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1021:49 [INFO] [stdout] | [INFO] [stdout] 1021 | / ... if let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() { [INFO] [stdout] 1022 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1023 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] ... | [INFO] [stdout] 1040 | | ... } [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] 1021 ~ if let Some((_, drag_block_idx, _original_block_start, mouse_offset_x)) = block_drag_info.as_ref() [INFO] [stdout] 1022 ~ && *drag_block_idx == block_idx { [INFO] [stdout] 1023 | if let Some(pos) = pointer_pos { [INFO] [stdout] ... [INFO] [stdout] 1038 | } [INFO] [stdout] 1039 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1074:37 [INFO] [stdout] | [INFO] [stdout] 1074 | / ... if pointer_pressed && !block_clicked_this_frame { [INFO] [stdout] 1075 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 1076 | | ... // If click is in track content area but not on any block, clear block selection [INFO] [stdout] 1077 | | ... if track_content_rect.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 1083 | | ... } [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] 1074 ~ if pointer_pressed && !block_clicked_this_frame [INFO] [stdout] 1075 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 1076 | // If click is in track content area but not on any block, clear block selection [INFO] [stdout] ... [INFO] [stdout] 1081 | } [INFO] [stdout] 1082 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1022:53 [INFO] [stdout] | [INFO] [stdout] 1022 | / ... if *drag_block_idx == block_idx { [INFO] [stdout] 1023 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 1024 | | ... // Calculate new block position: mouse_x - offset = block center x [INFO] [stdout] 1025 | | ... let block_center_x = pos.x - mouse_offset_x; [INFO] [stdout] ... | [INFO] [stdout] 1039 | | ... } [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] 1022 ~ if *drag_block_idx == block_idx [INFO] [stdout] 1023 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 1024 | // Calculate new block position: mouse_x - offset = block center x [INFO] [stdout] ... [INFO] [stdout] 1037 | } [INFO] [stdout] 1038 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 33s [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1031:61 [INFO] [stdout] | [INFO] [stdout] 1031 | / ... if let Some(track_blocks) = blocks.get_mut(&track_id_clone) { [INFO] [stdout] 1032 | | ... if let Some(block_to_move) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 1033 | | ... // Clamp to valid range (0 to max_playhead_pos - duration) [INFO] [stdout] 1034 | | ... let max_pos = self.max_playhead_pos() - block_to_move.duration_ticks; [INFO] [stdout] ... | [INFO] [stdout] 1037 | | ... } [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] 1031 ~ if let Some(track_blocks) = blocks.get_mut(&track_id_clone) [INFO] [stdout] 1032 ~ && let Some(block_to_move) = track_blocks.get_mut(block_idx) { [INFO] [stdout] 1033 | // Clamp to valid range (0 to max_playhead_pos - duration) [INFO] [stdout] 1034 | let max_pos = self.max_playhead_pos() - block_to_move.duration_ticks; [INFO] [stdout] 1035 | block_to_move.start_tick = self.controller.clamp_to_timeline_bounds(new_block_start, max_pos); [INFO] [stdout] 1036 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1044:45 [INFO] [stdout] | [INFO] [stdout] 1044 | / ... if is_resizing_edge && pointer_released { [INFO] [stdout] 1045 | | ... if let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() { [INFO] [stdout] 1046 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 1047 | | ... *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] ... | [INFO] [stdout] 1050 | | ... } [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] 1044 ~ if is_resizing_edge && pointer_released [INFO] [stdout] 1045 ~ && let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() { [INFO] [stdout] 1046 | if *resize_block_idx == block_idx { [INFO] [stdout] 1047 | *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] 1048 | } [INFO] [stdout] 1049 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1045:49 [INFO] [stdout] | [INFO] [stdout] 1045 | / ... if let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() { [INFO] [stdout] 1046 | | ... if *resize_block_idx == block_idx { [INFO] [stdout] 1047 | | ... *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] 1048 | | ... } [INFO] [stdout] 1049 | | ... } [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] 1045 ~ if let Some((_, resize_block_idx, _, _)) = edge_resize_info.as_ref() [INFO] [stdout] 1046 ~ && *resize_block_idx == block_idx { [INFO] [stdout] 1047 | *self.model.blocks.block_edge_resize.borrow_mut() = None; [INFO] [stdout] 1048 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:1123:25 [INFO] [stdout] | [INFO] [stdout] 1122 | let count = self.model.tracks.track_ids.borrow().len(); [INFO] [stdout] | ------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1123 | count [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] 1122 ~ [INFO] [stdout] 1123 ~ self.model.tracks.track_ids.borrow().len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1053:45 [INFO] [stdout] | [INFO] [stdout] 1053 | / ... if is_dragging_block && pointer_released { [INFO] [stdout] 1054 | | ... if let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() { [INFO] [stdout] 1055 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1056 | | ... *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] ... | [INFO] [stdout] 1059 | | ... } [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] 1053 ~ if is_dragging_block && pointer_released [INFO] [stdout] 1054 ~ && let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() { [INFO] [stdout] 1055 | if *drag_block_idx == block_idx { [INFO] [stdout] 1056 | *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] 1057 | } [INFO] [stdout] 1058 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1054:49 [INFO] [stdout] | [INFO] [stdout] 1054 | / ... if let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() { [INFO] [stdout] 1055 | | ... if *drag_block_idx == block_idx { [INFO] [stdout] 1056 | | ... *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] 1057 | | ... } [INFO] [stdout] 1058 | | ... } [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] 1054 ~ if let Some((_, drag_block_idx, _, _)) = block_drag_info.as_ref() [INFO] [stdout] 1055 ~ && *drag_block_idx == block_idx { [INFO] [stdout] 1056 | *self.model.blocks.block_drag_start.borrow_mut() = None; [INFO] [stdout] 1057 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1168:13 [INFO] [stdout] | [INFO] [stdout] 1168 | / if ui.input(|i| i.pointer.secondary_pressed()) { [INFO] [stdout] 1169 | | if let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 1170 | | if let Some(panel_name) = set_playhead.panel_name_at_pos(pos) { [INFO] [stdout] 1171 | | println!("Right-click panel: {panel_name}"); [INFO] [stdout] ... | [INFO] [stdout] 1180 | | } [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] 1168 ~ if ui.input(|i| i.pointer.secondary_pressed()) [INFO] [stdout] 1169 ~ && let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 1170 | if let Some(panel_name) = set_playhead.panel_name_at_pos(pos) { [INFO] [stdout] ... [INFO] [stdout] 1178 | } [INFO] [stdout] 1179 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1074:37 [INFO] [stdout] | [INFO] [stdout] 1074 | / ... if pointer_pressed && !block_clicked_this_frame { [INFO] [stdout] 1075 | | ... if let Some(pos) = pointer_pos { [INFO] [stdout] 1076 | | ... // If click is in track content area but not on any block, clear block selection [INFO] [stdout] 1077 | | ... if track_content_rect.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 1083 | | ... } [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] 1074 ~ if pointer_pressed && !block_clicked_this_frame [INFO] [stdout] 1075 ~ && let Some(pos) = pointer_pos { [INFO] [stdout] 1076 | // If click is in track content area but not on any block, clear block selection [INFO] [stdout] ... [INFO] [stdout] 1081 | } [INFO] [stdout] 1082 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:1123:25 [INFO] [stdout] | [INFO] [stdout] 1122 | let count = self.model.tracks.track_ids.borrow().len(); [INFO] [stdout] | ------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1123 | count [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] 1122 ~ [INFO] [stdout] 1123 ~ self.model.tracks.track_ids.borrow().len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1168:13 [INFO] [stdout] | [INFO] [stdout] 1168 | / if ui.input(|i| i.pointer.secondary_pressed()) { [INFO] [stdout] 1169 | | if let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 1170 | | if let Some(panel_name) = set_playhead.panel_name_at_pos(pos) { [INFO] [stdout] 1171 | | println!("Right-click panel: {panel_name}"); [INFO] [stdout] ... | [INFO] [stdout] 1180 | | } [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] 1168 ~ if ui.input(|i| i.pointer.secondary_pressed()) [INFO] [stdout] 1169 ~ && let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 1170 | if let Some(panel_name) = set_playhead.panel_name_at_pos(pos) { [INFO] [stdout] ... [INFO] [stdout] 1178 | } [INFO] [stdout] 1179 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "9fe259ab2a76c72dd00bd2ed190b49efcefa07299f8c69e070e11ea06b7f87d5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9fe259ab2a76c72dd00bd2ed190b49efcefa07299f8c69e070e11ea06b7f87d5", kill_on_drop: false }` [INFO] [stdout] 9fe259ab2a76c72dd00bd2ed190b49efcefa07299f8c69e070e11ea06b7f87d5