Don't use `map` to return values
This commit is contained in:
parent
e725bf4ab8
commit
d0b98130cf
|
|
@ -90,7 +90,7 @@ impl VmSpace {
|
|||
guard: &'a G,
|
||||
va: &Range<Vaddr>,
|
||||
) -> Result<Cursor<'a>> {
|
||||
Ok(self.pt.cursor(guard, va).map(Cursor)?)
|
||||
Ok(Cursor(self.pt.cursor(guard, va)?))
|
||||
}
|
||||
|
||||
/// Gets an mutable cursor in the virtual address range.
|
||||
|
|
@ -108,10 +108,10 @@ impl VmSpace {
|
|||
guard: &'a G,
|
||||
va: &Range<Vaddr>,
|
||||
) -> Result<CursorMut<'a>> {
|
||||
Ok(self.pt.cursor_mut(guard, va).map(|pt_cursor| CursorMut {
|
||||
pt_cursor,
|
||||
Ok(CursorMut {
|
||||
pt_cursor: self.pt.cursor_mut(guard, va)?,
|
||||
flusher: TlbFlusher::new(&self.cpus, disable_preempt()),
|
||||
})?)
|
||||
})
|
||||
}
|
||||
|
||||
/// Activates the page table on the current CPU.
|
||||
|
|
|
|||
Loading…
Reference in New Issue