[#1] Fixed the use std feature build for Rust 2021.
This will bring the library into compliance with the new Rust 2021 version. This was a simple change of how trait objects are done.
This commit is contained in:
parent
45efdb8ccb
commit
b1211287e8
@ -47,7 +47,7 @@ impl TestLogger
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature="use_std")]
|
#[cfg(feature="use_std")]
|
||||||
fn set_logger() -> Box<Logger>
|
fn set_logger() -> Box<dyn Logger>
|
||||||
{
|
{
|
||||||
let logger: TestLogger;
|
let logger: TestLogger;
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ pub fn clear_logger() -> Result<*const dyn Logger, u8>
|
|||||||
#[cfg(feature="use_std")]
|
#[cfg(feature="use_std")]
|
||||||
pub fn set_logger<F>(create_logger: F)
|
pub fn set_logger<F>(create_logger: F)
|
||||||
-> Result<(), u8>
|
-> Result<(), u8>
|
||||||
where F: FnOnce() -> Box<Logger>
|
where F: FnOnce() -> Box<dyn Logger>
|
||||||
{
|
{
|
||||||
// I hate using closures, but it is the only way I
|
// I hate using closures, but it is the only way I
|
||||||
// can think of to handle this right now.
|
// can think of to handle this right now.
|
||||||
@ -189,7 +189,7 @@ pub fn set_logger<F>(create_logger: F)
|
|||||||
/// This will return a pointer to the Logger that
|
/// This will return a pointer to the Logger that
|
||||||
/// was previously set.
|
/// was previously set.
|
||||||
#[cfg(feature="use_std")]
|
#[cfg(feature="use_std")]
|
||||||
pub fn clear_logger() -> Result<Box<Logger>, u8>
|
pub fn clear_logger() -> Result<Box<dyn Logger>, u8>
|
||||||
{
|
{
|
||||||
match clear_logger_base()
|
match clear_logger_base()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user