From e027e2ee3e7d3f160da881e3d3308eff9128c026 Mon Sep 17 00:00:00 2001 From: Myrddin Dundragon Date: Sun, 2 Mar 2025 18:31:34 -0500 Subject: [PATCH] [#1] Fixed the use std feature build for Rust 2021. This will bring the library into compliance with the new Rust 2021 version. --- examples/logger.rs | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/logger.rs b/examples/logger.rs index 4501240..a0ce38f 100644 --- a/examples/logger.rs +++ b/examples/logger.rs @@ -47,7 +47,7 @@ impl TestLogger } #[cfg(feature="use_std")] - fn set_logger() -> Box + fn set_logger() -> Box { let logger: TestLogger; diff --git a/src/lib.rs b/src/lib.rs index 06fe605..c87e730 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -174,7 +174,7 @@ pub fn clear_logger() -> Result<*const dyn Logger, u8> #[cfg(feature="use_std")] pub fn set_logger(create_logger: F) -> Result<(), u8> - where F: FnOnce() -> Box + where F: FnOnce() -> Box { // I hate using closures, but it is the only way I // can think of to handle this right now. @@ -189,7 +189,7 @@ pub fn set_logger(create_logger: F) /// This will return a pointer to the Logger that /// was previously set. #[cfg(feature="use_std")] -pub fn clear_logger() -> Result, u8> +pub fn clear_logger() -> Result, u8> { match clear_logger_base() {