Skip to content

Commit 83d7f05

Browse files
chore: gate legacy migration functions with #[cfg(windows)] (#31)
Replaced #[allow(dead_code)] with #[cfg(windows)] for `migrate_from_numeric_id` and `get_theme_from_numeric_id` in `src/icon_manager.rs`. These functions are only used for Windows-specific legacy settings migration, and gating them correctly resolves dead code warnings on other platforms. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: bearice <270121+bearice@users.noreply.github.com>
1 parent 47b21ce commit 83d7f05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/icon_manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl IconManager {
224224
}
225225

226226
// Migration support - convert old numeric IDs to string IDs
227-
#[allow(dead_code)]
227+
#[cfg(windows)]
228228
pub fn migrate_from_numeric_id(old_id: usize) -> String {
229229
let is_cat = (old_id & 2) == 0;
230230

@@ -235,7 +235,7 @@ impl IconManager {
235235
}
236236
}
237237

238-
#[allow(dead_code)]
238+
#[cfg(windows)]
239239
pub fn get_theme_from_numeric_id(old_id: usize) -> Theme {
240240
let is_dark = (old_id & 1) == 0;
241241
if is_dark {

0 commit comments

Comments
 (0)