From 3aaef7e484606875ef3fb6fc7d43b73c723a7670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 5 Aug 2024 17:29:30 +0400 Subject: [PATCH] fix(error): fix unnecessary qualification (again) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This time with a "use alloc::boxed::Box" Signed-off-by: Marc-André Lureau --- crates/ironrdp-error/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ironrdp-error/src/lib.rs b/crates/ironrdp-error/src/lib.rs index 5d05b422..5548b3ed 100644 --- a/crates/ironrdp-error/src/lib.rs +++ b/crates/ironrdp-error/src/lib.rs @@ -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 { #[cfg(feature = "std")] source: Option>, #[cfg(all(not(feature = "std"), feature = "alloc"))] - source: Option>, + source: Option>, } impl Error { @@ -48,7 +50,7 @@ impl Error { #[cfg(feature = "alloc")] { let mut this = self; - this.source = Some(alloc::boxed::Box::new(source)); + this.source = Some(Box::new(source)); this }