hypervisor: Remove panic from Hypervisor::check_required_extensions()

Remove the panic by replacing the .expect() with a cleaner error
handling.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-05-19 13:25:28 +00:00
committed by Sebastien Boeuf
parent a335cbb8d5
commit 84454f142d
2 changed files with 10 additions and 4 deletions

View File

@@ -54,6 +54,11 @@ pub enum HypervisorError {
///
#[error("Incompatible API version")]
IncompatibleApiVersion,
///
/// Checking extensions failed
///
#[error("Checking extensions:{0}")]
CheckExtensions(#[source] anyhow::Error),
}
///