GCWing / GCWing/OpenBitFun

[Bug]: stale allow(unused_mut) on the main window builder hides future regressions

オープン 初心者向け
#2,582 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
2.3k
フォーク
231
平均マージ
2時間 46分
マージ済み PR(30日)
577

説明

**Summary**

The main window creation path in the desktop crate carries an `#[allow(unused_mut)]` attribute that can never fire, and it silently suppresses the compiler check for that binding.

`src/apps/desktop/src/appearance.rs:578` marks the main window builder binding with `#[allow(unused_mut)]`. Removing the attribute changes nothing: the binding's mutability is genuinely consumed on every platform, so the suppression has no warning to silence — it is permanently inert.

The binding is unconditionally reassigned via `builder.disable_drag_drop_handler()` (appearance.rs:610) on all platforms, with further reassignments in the `#[cfg(target_os = "macos")]` and `#[cfg(target_os = "windows")]` blocks (:617-629). Because the `mut` requirement is satisfied unconditionally, the `allow` attribute can never trigger — but as long as it sits on the binding, any future regression that actually removes all mutating uses would be silently swallowed instead of reported.

**Area**

Desktop app

**Reproduction or evidence**

1. Delete the `#[allow(unused_mut)]` line at appearance.rs:578 on main.
2. Run `cargo check --release -p bitfun-desktop`.
3. Observe: no new warning appears for `appearance.rs` — confirming the allow was suppressing nothing.

A deletion-only fix (remove the attribute) is ready to submit; it restores the lint's coverage for this binding at zero behavior cost. PR to follow referencing this issue.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Open src/apps/desktop/src/appearance.rs at the main window builder around lines 578-629 and inspect the unconditional and platform-specific reassignments. Remove the stale allow attribute, then run cargo check --release -p bitfun-desktop. Done means the check passes without a new warning and the builder behavior remains unchanged.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
desktop
issue の種類
バグ
難易度
1/5
見積もり時間
1時間未満
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
92/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。