@@ -7,11 +7,11 @@ use derive_more::Display;
7
7
///
8
8
/// [`FileSystem`]: super::FileSystem
9
9
#[ derive( Debug , Clone , Display , PartialEq , Eq ) ]
10
- pub enum FileSystemError {
10
+ pub enum Error {
11
11
/// Logical errors. See [`LogicError`].
12
12
Logic ( LogicError ) ,
13
- /// IO (low-level UEFI-errors) errors. See [`FileSystemIOError `].
14
- IO ( FileSystemIOError ) ,
13
+ /// IO (low-level UEFI-errors) errors. See [`IOError `].
14
+ IO ( IOError ) ,
15
15
/// Path-related errors. See [`PathError`].
16
16
Path ( PathError ) ,
17
17
/// Can't parse file content as UTF-8. See [`FromUtf8Error`].
@@ -21,7 +21,7 @@ pub enum FileSystemError {
21
21
/// UEFI-error with context when working with the underlying UEFI file protocol.
22
22
#[ derive( Debug , Clone , Display , PartialEq , Eq ) ]
23
23
#[ display( fmt = "FileSystemIOError({},{})" , context, path) ]
24
- pub struct FileSystemIOError {
24
+ pub struct IOError {
25
25
/// The path that led to the error.
26
26
pub path : PathBuf ,
27
27
/// The context in which the path was used.
@@ -41,7 +41,7 @@ pub enum LogicError {
41
41
NotAFile ( PathBuf ) ,
42
42
}
43
43
44
- /// Enum that further specifies the context in that a [`FileSystemError `]
44
+ /// Enum that further specifies the context in that a [`Error `]
45
45
/// occurred.
46
46
#[ derive( Debug , Clone , Display , PartialEq , Eq ) ]
47
47
pub enum FileSystemIOErrorContext {
@@ -64,26 +64,26 @@ pub enum FileSystemIOErrorContext {
64
64
WriteFailure ,
65
65
}
66
66
67
- impl From < PathError > for FileSystemError {
67
+ impl From < PathError > for Error {
68
68
fn from ( value : PathError ) -> Self {
69
69
Self :: Path ( value)
70
70
}
71
71
}
72
72
73
73
#[ cfg( feature = "unstable" ) ]
74
- impl core:: error:: Error for FileSystemError {
74
+ impl core:: error:: Error for Error {
75
75
fn source ( & self ) -> Option < & ( dyn core:: error:: Error + ' static ) > {
76
76
match self {
77
- FileSystemError :: IO ( err) => Some ( err) ,
78
- FileSystemError :: Path ( err) => Some ( err) ,
79
- FileSystemError :: Utf8Encoding ( err) => Some ( err) ,
80
- FileSystemError :: Logic ( err) => Some ( err) ,
77
+ Error :: IO ( err) => Some ( err) ,
78
+ Error :: Path ( err) => Some ( err) ,
79
+ Error :: Utf8Encoding ( err) => Some ( err) ,
80
+ Error :: Logic ( err) => Some ( err) ,
81
81
}
82
82
}
83
83
}
84
84
85
85
#[ cfg( feature = "unstable" ) ]
86
- impl core:: error:: Error for FileSystemIOError {
86
+ impl core:: error:: Error for IOError {
87
87
fn source ( & self ) -> Option < & ( dyn core:: error:: Error + ' static ) > {
88
88
Some ( & self . uefi_error )
89
89
}
0 commit comments