Skip to content

Commit 4385085

Browse files
committed
Use static types instead of trait objects in axdriver
1 parent bcbe0a2 commit 4385085

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ unsafe impl GlobalAlloc for GlobalAllocator {
107107
}
108108
}
109109

110-
#[cfg_attr(not(test), global_allocator)]
111-
static GLOBAL_ALLOCATOR: GlobalAllocator = GlobalAllocator::new();
110+
#[cfg_attr(all(target_os = "none", not(test)), global_allocator)]
111+
pub static GLOBAL_ALLOCATOR: GlobalAllocator = GlobalAllocator::new();
112112

113-
#[cfg(not(test))]
113+
#[cfg(all(target_os = "none", not(test)))]
114114
#[alloc_error_handler]
115115
fn handle_alloc_error(layout: Layout) -> ! {
116116
panic!(

0 commit comments

Comments
 (0)