faster path for borrow-checking GuestPtr::{read, write}

This commit is contained in:
Pat Hickey
2020-05-18 19:12:55 -07:00
parent be1df80c1b
commit d221a3a346
2 changed files with 14 additions and 8 deletions

View File

@@ -22,6 +22,9 @@ impl BorrowChecker {
pub fn unborrow(&self, h: BorrowHandle) {
self.bc.borrow_mut().unborrow(h)
}
pub fn is_borrowed(&self, r: Region) -> bool {
self.bc.borrow().is_borrowed(r)
}
}
#[derive(Debug)]