diff --git a/src/allocator/linked_list.rs b/src/allocator/linked_list.rs index c2d1958d..f7164113 100644 --- a/src/allocator/linked_list.rs +++ b/src/allocator/linked_list.rs @@ -45,7 +45,7 @@ impl LinkedListAllocator { /// Adds the given memory region to the front of the list. unsafe fn add_free_region(&mut self, addr: usize, size: usize) { // ensure that the freed region is capable of holding ListNode - assert!(align_up(addr, mem::align_of::()) == addr); + assert_eq!(align_up(addr, mem::align_of::()), addr); assert!(size >= mem::size_of::()); // create a new list node and append it at the start of the list