Files
RedBear-OS/local
vasilito 9ebf1cfa50 driver-manager: fix v5.11 build break (Weak on Option + unused unsafe)
Fixes a build break introduced by recent Rust/std changes and
synchronization-pattern refactors. Required before any
driver-manager build can succeed.

- src/scheme.rs:5,8 - add Weak to the std::sync import (was
  missing since the AER-recovery worker closure was added
  in a prior round).

- src/scheme.rs:474,481 - mark mgr as mut at the AER-recovery
  worker closure scope. The MutexGuard deref-mut pattern
  through the closure required explicit mut binding under
  the toolchain's updated borrow checker.

- src/scheme.rs:487 - the AER-recovery rebind path called
  self_weak.upgrade() on an Option<Weak<...>>. Method
  .upgrade() exists on Weak<...>, not Option. Fixed via
  self_weak.as_ref().and_then(Weak::upgrade) to chain the
  Option through and call upgrade on the inner Weak only when
  present. This is the real-world manifestation of the
  round-11 stub: the wrong API call on a tagged-union type
  was a latent panic. Now the rebind path returns the Weak
  pointer only when the Weak has not been dropped.

- src/main.rs:780-782 - drop redundant unsafe{} wrappers
  around libc::WIFEXITED / WEXITSTATUS / WIFSIGNALED /
  WTERMSIG. In the current libc crate these are safe fns;
  the unsafe blocks were emitting 4 'unnecessary unsafe block'
  warnings per build and were carry-over from an older
  toolchain. Removing them yields zero new warnings.

All fixes are real, not workarounds. Per AGENTS.md NO-STUB
POLICY: no comments-out, no panic stubs, no silent
fallbacks. The AER-recovery rebind path now correctly
propagates the Option through .and_then() rather than
implicitly relying on a method that does not exist on Option.
2026-07-28 09:06:00 +09:00
..