We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 794aa15 commit d22fd10Copy full SHA for d22fd10
src/driver/kvm.rs
@@ -113,8 +113,10 @@ impl<T: KVMIntrospectable> Kvm<T> {
113
mut kvmi: T,
114
init_option: Option<DriverInitParam>,
115
) -> Result<Self, Box<dyn Error>> {
116
- let DriverInitParam::KVMiSocket(socket_path) =
117
- init_option.ok_or(KVMDriverError::MissingSocketParameter)?;
+ let socket_path = match init_option.ok_or(KVMDriverError::MissingSocketParameter)? {
+ DriverInitParam::KVMiSocket(s) => s,
118
+ _ => return Err(Box::new(KVMDriverError::MissingSocketParameter)),
119
+ };
120
debug!("init on {} (socket: {})", domain_name, socket_path);
121
let unix_socket = SocketType::UnixSocket(socket_path);
122
kvmi.init(unix_socket)?;
0 commit comments