From 07ee3c7a60cd25a7dc14b12c53338264358c51b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 14 Aug 2026 13:26:34 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore(app):=20the=20dead=20impor?= =?UTF-8?q?ts=20and=20the=20arguments=20nothing=20reads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A build printed thirteen warnings and every one of them was something the code had stopped using: four imports nobody names any more, a picture duration the timeline is handed and never reads, and the export flag a rewrite of the hint line left behind. Removed rather than hushed. An unused argument is a caller handing over something the callee has no use for, and the two bindings that were computed and dropped read state on every frame to throw it away. What is left of the thirteen is five dead-code warnings whose only callers are tests -- a panel-height ladder, a volume label, the theme's focus stroke, the palette lookup beside it -- and taking those out means taking their tests out, which is a decision about that code and not a warning to be tidied on the way past. --- crates/app/src/render.rs | 1 - crates/app/src/tests/mod.rs | 10 +++++----- crates/app/src/ui/preview.rs | 1 - crates/app/src/ui/timeline.rs | 5 ----- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/crates/app/src/render.rs b/crates/app/src/render.rs index f54d65e..29ccae2 100644 --- a/crates/app/src/render.rs +++ b/crates/app/src/render.rs @@ -647,7 +647,6 @@ impl Render for Player { .child(self.toolbar(cx)) .child(self.timeline( position, - duration, state, f32::from(window.viewport_size().height), cx, diff --git a/crates/app/src/tests/mod.rs b/crates/app/src/tests/mod.rs index a5d942f..b2426c2 100644 --- a/crates/app/src/tests/mod.rs +++ b/crates/app/src/tests/mod.rs @@ -14,11 +14,11 @@ use super::{ EQ_CURVE_STEPS, EQ_FFT, EQ_FREQ_HIGH, EQ_FREQ_LOW, EQ_FREQ_STEP, EQ_GAIN_LIMIT, EQ_GRAPH_H, EQ_HANDLE, EQ_Q_HIGH, EQ_Q_LOW, EQ_Q_STEP, EQ_SPECTRUM_DB, EQ_TICKS, EQ_W_MAX, ESCAPE, EXPORT_FIXED_H, EXPORT_ROWS_H, EXPORT_W, Enable, EncoderSeat, FORMATS, - Format, HEADER_GAP, HEADER_H, HEADER_W, HIST_BINS, HIST_H, HIST_SAMPLES, HIT_MIN, FG_PRIMARY, - FG_SECONDARY, KEYS_ROW_H, KEYS_ROWS_H, KEYS_W, KeyRow, LABEL_H, LABEL_MIN_W, LANE_H, LANES_MAX, - BG_CANVAS, LIBRARY_MAX_W, LIBRARY_MIN_W, Lane, MENU_ITEMS, MENU_PAD, MENU_ROW_H, + Format, HEADER_GAP, HEADER_H, HEADER_W, HIST_BINS, HIST_H, HIST_SAMPLES, HIT_MIN, + KEYS_ROW_H, KEYS_ROWS_H, KEYS_W, KeyRow, LABEL_H, LABEL_MIN_W, LANE_H, LANES_MAX, + LIBRARY_MAX_W, LIBRARY_MIN_W, Lane, MENU_ITEMS, MENU_PAD, MENU_ROW_H, MBPS_DIGITS, MBPS_MAX, MBPS_MIN, MB_FLOOR, MENU_W, NO_FILE, NumberEdit, PANEL_H, ROW_ITEMS, RowCtx, RowItem, - Quality, ROW_H, RULER_HIT_H, BG_SELECTED, SCROLL_NOTCH_SHARE, SILENCE_ROWS, + Quality, ROW_H, RULER_HIT_H, SCROLL_NOTCH_SHARE, SILENCE_ROWS, SOURCE_TINTS, SPEED_PRESETS, SPEED_STEP, BG_RAISED, SWATCH_W, Source, Speed, StreamInfo, Transport, VOLUME_W, Volume, WAVE_BPS, WAVE_COL, WAVE_COLS_MAX, Wave, band_label, bitrate_detail, bitrate_refusal, can_add, cancels_export, clipboard_after_remove, color_snap, commit_mbps, @@ -54,7 +54,7 @@ use super::{ }; use super::{ - SUB_BOTTOM, SUB_CUE_MIN_W, SUB_HEAD_H, SUB_FG, SUB_LINE_H, SUB_ROWS_H, + SUB_BOTTOM, SUB_CUE_MIN_W, SUB_HEAD_H, SUB_LINE_H, SUB_ROWS_H, SUB_STEM_SHARE, SUB_TEXT, clip_middle, cue_box, sub_bottom, carries_subtitles, cues_at, file_tint, is_subtitle, lang_human, row_text_w, sub_headers_fit, Subs, subtitle_detail, subtitle_notice, subtitle_tail, diff --git a/crates/app/src/ui/preview.rs b/crates/app/src/ui/preview.rs index aed346a..8d1def8 100644 --- a/crates/app/src/ui/preview.rs +++ b/crates/app/src/ui/preview.rs @@ -1,7 +1,6 @@ //! The picture: what is drawn over it and what is read off it. use crate::*; -use crate::ui::widgets::*; impl Player { /// The cues the *subtitle lanes* put on screen at `at`, over the picture and diff --git a/crates/app/src/ui/timeline.rs b/crates/app/src/ui/timeline.rs index 1c60ee3..2fad105 100644 --- a/crates/app/src/ui/timeline.rs +++ b/crates/app/src/ui/timeline.rs @@ -12,7 +12,6 @@ impl Player { pub(crate) fn timeline( &self, position: f64, - duration: f64, state: Transport, viewport_h: f32, cx: &mut Context, @@ -23,10 +22,6 @@ impl Player { // the bed for long. let bed_w = f32::from(self.ruler.get().size.width); let filled = self.scale.px_at(position).clamp(0., bed_w); - // An export owns the hint slot and the ruler while it runs: the - // percentage and the accent bar are the same number, so the playhead - // fill doubles as the progress bar for free. - let exporting = self.exporting().is_some(); let key = |action| self.keymap.display(action); // The lanes the project has, or the pair a fresh one starts with so the // panel reads the same before a file is open as after.