From cd952be3487d6dbe97ad8af6d0386daaacf3fa80 Mon Sep 17 00:00:00 2001 From: buhe Date: Mon, 4 Oct 2021 12:14:32 +0800 Subject: [PATCH] fix warn --- os/src/heap/mod.rs | 2 ++ os/src/main.rs | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/os/src/heap/mod.rs b/os/src/heap/mod.rs index 5b8c416..f00cc21 100644 --- a/os/src/heap/mod.rs +++ b/os/src/heap/mod.rs @@ -18,6 +18,8 @@ pub fn init() { pub fn handle_alloc_error(layout: core::alloc::Layout) -> ! { panic!("Heap allocation error, layout = {:?}", layout); } + +#[test_case] pub fn heap_test() { use alloc::boxed::Box; use alloc::vec::Vec; diff --git a/os/src/main.rs b/os/src/main.rs index e65b81d..329d744 100644 --- a/os/src/main.rs +++ b/os/src/main.rs @@ -48,8 +48,3 @@ fn test_runner(tests: &[&dyn Fn()]) { test(); } } - -#[test_case] -fn trivial_assertion() { - heap::heap_test(); -}