fix cargo clippy for hypervisor

This commit is contained in:
Runji Wang 2020-08-14 14:05:17 +08:00
parent d95545cd8b
commit f753d655cb
3 changed files with 3 additions and 2 deletions

View File

@ -114,7 +114,7 @@ impl GuestPhysMemorySetTrait for GuestPhysMemorySet {
.handle_page_fault(gpaddr, mapping.get_flags())
.map_err(From::from)
} else {
return Err(RvmError::NotFound);
Err(RvmError::NotFound)
}
}

View File

@ -48,6 +48,7 @@ pub struct VmmPageTable(ArchRvmPageTable);
struct VmmPageTableFlags(MMUFlags);
impl VmmPageTable {
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
Self(ArchRvmPageTable::new())
}

View File

@ -98,7 +98,7 @@ impl Syscall<'_> {
}
let proc = self.thread.proc();
let guest = proc.get_object_with_rights::<Guest>(guest_handle, Rights::MANAGE_PROCESS)?;
let vcpu = Vcpu::new(guest, entry, self.thread.clone())?;
let vcpu = Vcpu::new(guest, entry, (*self.thread).clone())?;
let handle_value = proc.add_handle(Handle::new(vcpu, Rights::DEFAULT_VCPU));
out.write(handle_value)?;
Ok(())