diff options
Diffstat (limited to 'rust/kernel/error.rs')
| -rw-r--r-- | rust/kernel/error.rs | 14 | 
1 files changed, 2 insertions, 12 deletions
diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs index 4786d3ee1e92..55280ae9fe40 100644 --- a/rust/kernel/error.rs +++ b/rust/kernel/error.rs @@ -4,14 +4,10 @@  //!  //! C header: [`include/uapi/asm-generic/errno-base.h`](srctree/include/uapi/asm-generic/errno-base.h) -use crate::str::CStr; +use crate::{alloc::AllocError, str::CStr}; -use alloc::{ -    alloc::{AllocError, LayoutError}, -    collections::TryReserveError, -}; +use alloc::alloc::LayoutError; -use core::convert::From;  use core::fmt;  use core::num::TryFromIntError;  use core::str::Utf8Error; @@ -192,12 +188,6 @@ impl From<Utf8Error> for Error {      }  } -impl From<TryReserveError> for Error { -    fn from(_: TryReserveError) -> Error { -        code::ENOMEM -    } -} -  impl From<LayoutError> for Error {      fn from(_: LayoutError) -> Error {          code::ENOMEM  |