vhost_user_fs: Remove an unneeded unwrap in handle_event

Remove an unneeded unwrap in handle_event.

Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
Sergio Lopez 2020-02-26 11:01:03 +01:00 committed by Samuel Ortiz
parent e52129efb4
commit 531f4ff6b0

View File

@ -203,7 +203,7 @@ impl<F: FileSystem + Send + Sync + 'static> VhostUserBackend for VhostUserFsBack
loop { loop {
vring vring
.mut_queue() .mut_queue()
.update_avail_event(self.mem.as_ref().unwrap()); .update_avail_event(self.mem.as_ref().ok_or(Error::NoMemoryConfigured)?);
if !self.process_queue(&mut vring)? { if !self.process_queue(&mut vring)? {
break; break;
} }