File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ impl fmt::Debug for Error {
134134 let mut dbg = f. debug_struct ( "Error" ) ;
135135 if let Some ( errno) = self . raw_os_error ( ) {
136136 dbg. field ( "os_error" , & errno) ;
137- #[ cfg( feature = "std" ) ]
137+ #[ cfg( all ( feature = "std" , not ( target_os = "uefi" ) ) ) ]
138138 dbg. field ( "description" , & std:: io:: Error :: from_raw_os_error ( errno) ) ;
139139 } else if let Some ( desc) = self . internal_desc ( ) {
140140 dbg. field ( "internal_code" , & self . 0 . get ( ) ) ;
@@ -150,7 +150,7 @@ impl fmt::Display for Error {
150150 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
151151 if let Some ( errno) = self . raw_os_error ( ) {
152152 cfg_if ! {
153- if #[ cfg( feature = "std" ) ] {
153+ if #[ cfg( all ( feature = "std" , not ( target_os = "uefi" ) ) ) ] {
154154 std:: io:: Error :: from_raw_os_error( errno) . fmt( f)
155155 } else {
156156 write!( f, "OS Error: {}" , errno)
Original file line number Diff line number Diff line change @@ -5,10 +5,15 @@ use std::io;
55
66impl From < Error > for io:: Error {
77 fn from ( err : Error ) -> Self {
8+ #[ cfg( not( target_os = "uefi" ) ) ]
89 match err. raw_os_error ( ) {
910 Some ( errno) => io:: Error :: from_raw_os_error ( errno) ,
1011 None => io:: Error :: new ( io:: ErrorKind :: Other , err) ,
1112 }
13+ #[ cfg( target_os = "uefi" ) ]
14+ {
15+ io:: Error :: new ( io:: ErrorKind :: Other , err)
16+ }
1217 }
1318}
1419
You can’t perform that action at this time.
0 commit comments