From 4416a582c8cec5c8570309d63939bf6eabf1559a Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 17 Apr 2026 09:48:19 +0200 Subject: [PATCH] block: vhdx: Remove catch all in physical_size boundary Vhdx::physical_size() can only return Error::GetFileMetadata. Replace the catch-all arm with unreachable!() so future error variants are not silently mapped to a generic Io classification. Signed-off-by: Anatol Belski --- block/src/vhdx_sync.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/src/vhdx_sync.rs b/block/src/vhdx_sync.rs index 0405554c1..7d4f28e33 100644 --- a/block/src/vhdx_sync.rs +++ b/block/src/vhdx_sync.rs @@ -53,7 +53,7 @@ impl disk_file::PhysicalSize for VhdxDiskSync { Error::GetFileMetadata(io) => { BlockError::new(BlockErrorKind::Io, Error::GetFileMetadata(io)) } - _ => BlockError::new(BlockErrorKind::Io, e), + _ => unreachable!("unexpected error from Vhdx::physical_size(): {e}"), }) } }