Getter for Grant region, remove set_mapped, and make region_mut private
This commit is contained in:
@@ -298,9 +298,13 @@ impl Grant {
|
||||
self.owned
|
||||
}
|
||||
|
||||
pub fn region(&self) -> &Region {
|
||||
&self.region
|
||||
}
|
||||
|
||||
/// Get a mutable reference to the region. This is unsafe, because a bad
|
||||
/// region could lead to the wrong addresses being unmapped.
|
||||
pub unsafe fn region_mut(&mut self) -> &mut Region {
|
||||
unsafe fn region_mut(&mut self) -> &mut Region {
|
||||
&mut self.region
|
||||
}
|
||||
|
||||
@@ -482,10 +486,6 @@ impl Grant {
|
||||
self.flags
|
||||
}
|
||||
|
||||
pub unsafe fn set_mapped(&mut self, mapped: bool) {
|
||||
self.mapped = mapped;
|
||||
}
|
||||
|
||||
pub fn unmap(mut self) {
|
||||
assert!(self.mapped);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user