diff --git a/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs b/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs index 12bbe0848..46687d8b7 100644 --- a/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs +++ b/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs @@ -19,8 +19,7 @@ fn drop_no_leaks() { drop(list); let allocated_after = ALLOCATED.load(SeqCst); - let leaked_bytes = allocated_before - allocated_after; - assert!(leaked_bytes == 0); + assert_eq!(allocated_before, allocated_after); } // Defines a wrapper around the global allocator that counts allocations