Skip to content

Commit bc95246

Browse files
committed
update format
Signed-off-by: ylzh10 <[email protected]>
1 parent 82019d0 commit bc95246

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
### Added
66

7-
- Added `available()` API in `AddressAllocator` to allow getting the
8-
available memories after `allocate/free()`s
7+
- Added `available()` API in `AddressAllocator` to allow
8+
getting the available memories after `allocate/free()`s
99

1010
### Changed
1111
### Fixed

src/address_allocator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,17 @@ mod tests {
250250
fn test_tree_allocate_address_free_and_realloc() {
251251
let mut pool = AddressAllocator::new(0x1000, 0x1000).unwrap();
252252
assert_eq!(pool.available(), 0x1000);
253-
253+
// Allocate 0x800
254254
assert_eq!(
255255
pool.allocate(0x800, 0x100, AllocPolicy::FirstMatch)
256256
.unwrap(),
257257
RangeInclusive::new(0x1000, 0x17FF).unwrap()
258258
);
259259
assert_eq!(pool.available(), 0x1000 - 0x800);
260-
260+
// Free 0x800
261261
let _ = pool.free(&RangeInclusive::new(0x1000, 0x17FF).unwrap());
262262
assert_eq!(pool.available(), 0x1000);
263-
263+
// Allocate 0x800 again
264264
assert_eq!(
265265
pool.allocate(0x800, 0x100, AllocPolicy::FirstMatch)
266266
.unwrap(),

0 commit comments

Comments
 (0)