From 452d40b90ee11c2fcc256c204ba3385e47bece7e Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 28 Jul 2026 11:53:17 +0900 Subject: [PATCH] nvmed: wrap namespaces in Some() so select() match arms unify (fix E0308) The block feeding `let namespaces = match ... { Some(ns) => ns, None => exit }` must yield Option, but the Either::Left arm returned the BTreeMap directly while Either::Right returned None. Wrap Left in Some(namespaces). Co-Authored-By: Claude Opus 4.8 (1M context) --- drivers/storage/nvmed/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/storage/nvmed/src/main.rs b/drivers/storage/nvmed/src/main.rs index c3c0df618b..67151a5b73 100644 --- a/drivers/storage/nvmed/src/main.rs +++ b/drivers/storage/nvmed/src/main.rs @@ -101,7 +101,7 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! { futures::pin_mut!(namespaces_future); futures::pin_mut!(time_future); match futures::future::select(namespaces_future, time_future).await { - futures::future::Either::Left((namespaces, _)) => namespaces, + futures::future::Either::Left((namespaces, _)) => Some(namespaces), futures::future::Either::Right(_) => None, } }) {