We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24d446e commit e0e6584Copy full SHA for e0e6584
src/address_allocator.rs
@@ -68,15 +68,15 @@ impl AddressAllocator {
68
let constraint = Constraint::new(size, alignment, policy)?;
69
let allocated = self.interval_tree.allocate(constraint);
70
self.available -= allocated.len() as usize;
71
- Ok(allocated)
+ allocated
72
}
73
74
/// Deletes the specified memory slot or returns `ResourceNotAvailable` if
75
/// the node was not allocated before.
76
pub fn free(&mut self, key: &RangeInclusive) -> Result<()> {
77
self.interval_tree.free(key);
78
self.available += key.len() as usize;
79
- Ok()
+ Ok(())
80
81
82
/// Returns the available memory size in this allocator.
0 commit comments