From aadb6fc22d1e2d2088a110b3fe9f8458438f5057 Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 19 Sep 2024 17:14:18 +0800 Subject: [PATCH] satman mgmt: get logger unconditionally --- src/satman/src/mgmt.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/satman/src/mgmt.rs b/src/satman/src/mgmt.rs index 2e7a568..179d701 100644 --- a/src/satman/src/mgmt.rs +++ b/src/satman/src/mgmt.rs @@ -27,7 +27,7 @@ pub fn byte_to_level_filter(level_byte: u8) -> Result { }) } -fn get_logger_buffer_pred() -> LogBufferRef<'static> { +fn get_logger_buffer() -> LogBufferRef<'static> { let logger = unsafe { BufferLogger::get_logger().as_mut().unwrap() }; loop { if let Some(buffer_ref) = logger.buffer() { @@ -36,10 +36,6 @@ fn get_logger_buffer_pred() -> LogBufferRef<'static> { } } -fn get_logger_buffer() -> LogBufferRef<'static> { - get_logger_buffer_pred() -} - pub fn clear_log() { let mut buffer = get_logger_buffer(); buffer.clear();