mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-04 15:18:17 +00:00
fix(error): fix unnecessary qualification (again)
This time with a "use alloc::boxed::Box" Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
f4476ec69a
commit
3aaef7e484
1 changed files with 4 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
#[cfg(feature = "alloc")]
|
||||
extern crate alloc;
|
||||
#[cfg(feature = "alloc")]
|
||||
use alloc::boxed::Box;
|
||||
|
||||
use core::fmt;
|
||||
|
||||
|
@ -24,7 +26,7 @@ pub struct Error<Kind> {
|
|||
#[cfg(feature = "std")]
|
||||
source: Option<Box<dyn std::error::Error + Sync + Send>>,
|
||||
#[cfg(all(not(feature = "std"), feature = "alloc"))]
|
||||
source: Option<alloc::boxed::Box<dyn Source>>,
|
||||
source: Option<Box<dyn Source>>,
|
||||
}
|
||||
|
||||
impl<Kind> Error<Kind> {
|
||||
|
@ -48,7 +50,7 @@ impl<Kind> Error<Kind> {
|
|||
#[cfg(feature = "alloc")]
|
||||
{
|
||||
let mut this = self;
|
||||
this.source = Some(alloc::boxed::Box::new(source));
|
||||
this.source = Some(Box::new(source));
|
||||
this
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue