Remove dead code and #![allow(dead_code)] blanket suppressions
- Delete src/audio/queue.rs (321 lines, PlayQueue never used) - Remove #![allow(dead_code)] from audio, subsonic, and mpris module roots - Remove unused MpvEvent2 enum, playlist_clear, get_volume, get_path, is_eof, observe_property from mpv.rs - Remove unused DEFAULT_DEVICE_ID, is_available, get_effective_rate from pipewire.rs (and associated dead test) - Remove unused search(), get_cover_art_url() from subsonic client - Remove unused SearchResult3Data, SearchResult3 model structs - Move parse_song_id_from_url into #[cfg(test)] block (only used by tests) - Add targeted #[allow(dead_code)] on deserialization-only fields (MpvEvent, SubsonicResponseInner.version, ArtistIndex.name) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,16 +32,6 @@ impl Page {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_index(index: usize) -> Self {
|
||||
match index {
|
||||
0 => Page::Artists,
|
||||
1 => Page::Queue,
|
||||
2 => Page::Playlists,
|
||||
3 => Page::Server,
|
||||
4 => Page::Settings,
|
||||
_ => Page::Artists,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn label(&self) -> &'static str {
|
||||
match self {
|
||||
@@ -205,6 +195,8 @@ pub struct SettingsState {
|
||||
pub theme_index: usize,
|
||||
/// Cava visualizer enabled
|
||||
pub cava_enabled: bool,
|
||||
/// Cava visualizer height percentage (10-80, step 5)
|
||||
pub cava_size: u8,
|
||||
}
|
||||
|
||||
impl Default for SettingsState {
|
||||
@@ -214,6 +206,7 @@ impl Default for SettingsState {
|
||||
themes: vec![ThemeData::default_theme()],
|
||||
theme_index: 0,
|
||||
cava_enabled: false,
|
||||
cava_size: 40,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,10 +262,8 @@ pub struct Notification {
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct LayoutAreas {
|
||||
pub header: Rect,
|
||||
pub cava: Option<Rect>,
|
||||
pub content: Rect,
|
||||
pub now_playing: Rect,
|
||||
pub footer: Rect,
|
||||
/// Left pane for dual-pane pages (Artists tree, Playlists list)
|
||||
pub content_left: Option<Rect>,
|
||||
/// Right pane for dual-pane pages (Songs list)
|
||||
@@ -349,6 +340,7 @@ impl AppState {
|
||||
state.server_state.password = config.password.clone();
|
||||
// Initialize cava from config
|
||||
state.settings_state.cava_enabled = config.cava;
|
||||
state.settings_state.cava_size = config.cava_size.clamp(10, 80);
|
||||
state
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user