From 2a65fb760df2279ee61465117c19b750f078132c Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 25 Jul 2026 05:37:11 +0900 Subject: [PATCH] =?UTF-8?q?driver-manager:=20fix=20E0382=20=E2=80=94=20clo?= =?UTF-8?q?ne=20Arc=20for=20the=20second=20listener=20closure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spawn_unified_listener takes two move closures that both capture scheme_for_events (bound_device_pairs provider + the Aer event handler calling dispatch_recovery). The first closure moved the Arc, so the second could not use it ("the type Arc does not implement Copy", main.rs:390). Clone the Arc for the bound-pairs closure so each owns its own handle (the rustc-suggested fix). Sole remaining compile blocker for the redbear-full ISO. --- local/recipes/system/driver-manager/source/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/local/recipes/system/driver-manager/source/src/main.rs b/local/recipes/system/driver-manager/source/src/main.rs index c4e82d9daf..10e525bd5c 100644 --- a/local/recipes/system/driver-manager/source/src/main.rs +++ b/local/recipes/system/driver-manager/source/src/main.rs @@ -383,10 +383,14 @@ fn main() { )); let scheme_for_events = Arc::clone(&scheme); + // Both listener callbacks capture the scheme Arc by move: the bound-pairs + // provider closure and the event handler (which calls dispatch_recovery). + // Clone one so each closure owns its own Arc (Arc is not Copy). + let scheme_for_pairs = Arc::clone(&scheme_for_events); let _events_thread = unified_events::spawn_unified_listener( std::path::PathBuf::from("/scheme/pci/aer"), std::path::PathBuf::from("/scheme/pci/pciehp"), - move || scheme_for_events.bound_device_pairs(), + move || scheme_for_pairs.bound_device_pairs(), move |event| match event { unified_events::UnifiedEvent::Aer { event, action } => { if matches!(