[PATCH v4 1/3] rust: error: Change `LayoutError` to internal

Jimmy Ostler posted 3 patches 12 months ago
[PATCH v4 1/3] rust: error: Change `LayoutError` to internal
Posted by Jimmy Ostler 12 months ago
Change the imports in `rust/kernel/error.rs` to import the internal
version of `LayoutError` instead. This results in the existing
`From<LayoutError> for Error` implementation implmenting for the new
internal type instead of for `core::alloc::LayoutError`.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Jimmy Ostler <jtostler1@gmail.com>
---
 rust/kernel/error.rs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
index 914e8dec1abd..f6ecf09cb65f 100644
--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -4,9 +4,10 @@
 //!
 //! C header: [`include/uapi/asm-generic/errno-base.h`](srctree/include/uapi/asm-generic/errno-base.h)
 
-use crate::{alloc::AllocError, str::CStr};
-
-use core::alloc::LayoutError;
+use crate::{
+    alloc::{layout::LayoutError, AllocError},
+    str::CStr,
+};
 
 use core::fmt;
 use core::num::NonZeroI32;
-- 
2.47.1