Skip to content

Commit e951853

Browse files
LordGoatiusjannau
authored andcommitted
rust: error: import kernel's LayoutError instead of core's
Import the internal (`kernel::alloc`) version of `LayoutError` instead of the `core::alloc` one. In particular, this results in switching the type in the existing `From<LayoutError> for Error` implementation. Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Jimmy Ostler <[email protected]> Link: https://lore.kernel.org/r/fe58a02189e8804a9eabdd01cb1927d4c491d79c.1734674670.git.jtostler1@gmail.com [ Reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 9ff586f commit e951853

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rust/kernel/error.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
//!
55
//! C header: [`include/uapi/asm-generic/errno-base.h`](srctree/include/uapi/asm-generic/errno-base.h)
66
7-
use crate::{alloc::AllocError, str::CStr};
8-
9-
use core::alloc::LayoutError;
7+
use crate::{
8+
alloc::{layout::LayoutError, AllocError},
9+
str::CStr,
10+
};
1011

1112
use core::fmt;
1213
use core::num::NonZeroI32;

0 commit comments

Comments
 (0)