From 2bacbf35dc36406c2c357a3693792479ed34447e Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Mon, 16 Aug 2021 21:04:37 +0100 Subject: [PATCH] Extern definition can be made smaller --- agb/src/agb_alloc/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agb/src/agb_alloc/mod.rs b/agb/src/agb_alloc/mod.rs index 6908892e..4cd317f2 100644 --- a/agb/src/agb_alloc/mod.rs +++ b/agb/src/agb_alloc/mod.rs @@ -2,11 +2,11 @@ use core::alloc::{GlobalAlloc, Layout}; use super::interrupt::Mutex; -extern "C" { - static __ewram_data_end: usize; -} - fn get_data_end() -> usize { + extern "C" { + static __ewram_data_end: usize; + } + // TODO: This seems completely wrong, but without the &, rust generates // a double dereference :/. Maybe a bug in nightly? (unsafe { &__ewram_data_end }) as *const _ as usize