block: vhd: Remove catch all in physical_size boundary

FixedVhd::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 <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-04-16 10:07:36 +02:00
committed by Rob Bradford
parent 519acda794
commit a8d339c9e7
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ impl disk_file::PhysicalSize for FixedVhdDiskAsync {
crate::Error::GetFileMetadata(io) => {
BlockError::new(BlockErrorKind::Io, crate::Error::GetFileMetadata(io))
}
_ => BlockError::new(BlockErrorKind::Io, e),
_ => unreachable!("unexpected error from FixedVhd::physical_size(): {e}"),
})
}
}

View File

@@ -36,7 +36,7 @@ impl disk_file::PhysicalSize for FixedVhdDiskSync {
crate::Error::GetFileMetadata(io) => {
BlockError::new(BlockErrorKind::Io, crate::Error::GetFileMetadata(io))
}
_ => BlockError::new(BlockErrorKind::Io, e),
_ => unreachable!("unexpected error from FixedVhd::physical_size(): {e}"),
})
}
}