Skip to content

Commit e0e6584

Browse files
committed
Update address_allocator.rs
Signed-off-by: ylzh10 <[email protected]>
1 parent 24d446e commit e0e6584

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/address_allocator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ impl AddressAllocator {
6868
let constraint = Constraint::new(size, alignment, policy)?;
6969
let allocated = self.interval_tree.allocate(constraint);
7070
self.available -= allocated.len() as usize;
71-
Ok(allocated)
71+
allocated
7272
}
7373

7474
/// Deletes the specified memory slot or returns `ResourceNotAvailable` if
7575
/// the node was not allocated before.
7676
pub fn free(&mut self, key: &RangeInclusive) -> Result<()> {
7777
self.interval_tree.free(key);
7878
self.available += key.len() as usize;
79-
Ok()
79+
Ok(())
8080
}
8181

8282
/// Returns the available memory size in this allocator.

0 commit comments

Comments
 (0)