From 5ee3138d3d53b0b002190ea4768be11876561823 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 1 Apr 2025 21:42:54 +0200 Subject: [PATCH] Fix cargo test Rustc complained about being unable to infer the type for [] --- src/allocator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allocator.rs b/src/allocator.rs index 71c2939491..f4e306bc88 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -329,7 +329,7 @@ fn allocator_test() { } else if level == 10 { assert_eq!(alloc.levels[level], [1024]); } else { - assert_eq!(alloc.levels[level], []); + assert_eq!(alloc.levels[level], [0u64; 0]); } } @@ -343,6 +343,6 @@ fn allocator_test() { assert_eq!(alloc.levels.len(), 11); for level in 0..alloc.levels.len() { - assert_eq!(alloc.levels[level], []); + assert_eq!(alloc.levels[level], [0u64; 0]); } }