@@ -9,7 +9,7 @@ use crate::sys::hermit::abi;
9
9
use crate :: sys:: hermit:: abi:: { O_APPEND , O_CREAT , O_EXCL , O_RDONLY , O_RDWR , O_TRUNC , O_WRONLY } ;
10
10
use crate :: sys:: hermit:: fd:: FileDesc ;
11
11
use crate :: sys:: time:: SystemTime ;
12
- use crate :: sys:: { unsupported, Void } ;
12
+ use crate :: sys:: unsupported;
13
13
use crate :: sys_common:: os_str_bytes:: OsStrExt ;
14
14
15
15
pub use crate :: sys_common:: fs:: copy;
@@ -22,11 +22,11 @@ fn cstr(path: &Path) -> io::Result<CString> {
22
22
#[ derive( Debug ) ]
23
23
pub struct File ( FileDesc ) ;
24
24
25
- pub struct FileAttr ( Void ) ;
25
+ pub struct FileAttr ( ! ) ;
26
26
27
- pub struct ReadDir ( Void ) ;
27
+ pub struct ReadDir ( ! ) ;
28
28
29
- pub struct DirEntry ( Void ) ;
29
+ pub struct DirEntry ( ! ) ;
30
30
31
31
#[ derive( Clone , Debug ) ]
32
32
pub struct OpenOptions {
@@ -41,146 +41,146 @@ pub struct OpenOptions {
41
41
mode : i32 ,
42
42
}
43
43
44
- pub struct FilePermissions ( Void ) ;
44
+ pub struct FilePermissions ( ! ) ;
45
45
46
- pub struct FileType ( Void ) ;
46
+ pub struct FileType ( ! ) ;
47
47
48
48
#[ derive( Debug ) ]
49
49
pub struct DirBuilder { }
50
50
51
51
impl FileAttr {
52
52
pub fn size ( & self ) -> u64 {
53
- match self . 0 { }
53
+ self . 0
54
54
}
55
55
56
56
pub fn perm ( & self ) -> FilePermissions {
57
- match self . 0 { }
57
+ self . 0
58
58
}
59
59
60
60
pub fn file_type ( & self ) -> FileType {
61
- match self . 0 { }
61
+ self . 0
62
62
}
63
63
64
64
pub fn modified ( & self ) -> io:: Result < SystemTime > {
65
- match self . 0 { }
65
+ self . 0
66
66
}
67
67
68
68
pub fn accessed ( & self ) -> io:: Result < SystemTime > {
69
- match self . 0 { }
69
+ self . 0
70
70
}
71
71
72
72
pub fn created ( & self ) -> io:: Result < SystemTime > {
73
- match self . 0 { }
73
+ self . 0
74
74
}
75
75
}
76
76
77
77
impl Clone for FileAttr {
78
78
fn clone ( & self ) -> FileAttr {
79
- match self . 0 { }
79
+ self . 0
80
80
}
81
81
}
82
82
83
83
impl FilePermissions {
84
84
pub fn readonly ( & self ) -> bool {
85
- match self . 0 { }
85
+ self . 0
86
86
}
87
87
88
88
pub fn set_readonly ( & mut self , _readonly : bool ) {
89
- match self . 0 { }
89
+ self . 0
90
90
}
91
91
}
92
92
93
93
impl Clone for FilePermissions {
94
94
fn clone ( & self ) -> FilePermissions {
95
- match self . 0 { }
95
+ self . 0
96
96
}
97
97
}
98
98
99
99
impl PartialEq for FilePermissions {
100
100
fn eq ( & self , _other : & FilePermissions ) -> bool {
101
- match self . 0 { }
101
+ self . 0
102
102
}
103
103
}
104
104
105
105
impl Eq for FilePermissions { }
106
106
107
107
impl fmt:: Debug for FilePermissions {
108
108
fn fmt ( & self , _f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
109
- match self . 0 { }
109
+ self . 0
110
110
}
111
111
}
112
112
113
113
impl FileType {
114
114
pub fn is_dir ( & self ) -> bool {
115
- match self . 0 { }
115
+ self . 0
116
116
}
117
117
118
118
pub fn is_file ( & self ) -> bool {
119
- match self . 0 { }
119
+ self . 0
120
120
}
121
121
122
122
pub fn is_symlink ( & self ) -> bool {
123
- match self . 0 { }
123
+ self . 0
124
124
}
125
125
}
126
126
127
127
impl Clone for FileType {
128
128
fn clone ( & self ) -> FileType {
129
- match self . 0 { }
129
+ self . 0
130
130
}
131
131
}
132
132
133
133
impl Copy for FileType { }
134
134
135
135
impl PartialEq for FileType {
136
136
fn eq ( & self , _other : & FileType ) -> bool {
137
- match self . 0 { }
137
+ self . 0
138
138
}
139
139
}
140
140
141
141
impl Eq for FileType { }
142
142
143
143
impl Hash for FileType {
144
144
fn hash < H : Hasher > ( & self , _h : & mut H ) {
145
- match self . 0 { }
145
+ self . 0
146
146
}
147
147
}
148
148
149
149
impl fmt:: Debug for FileType {
150
150
fn fmt ( & self , _f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
151
- match self . 0 { }
151
+ self . 0
152
152
}
153
153
}
154
154
155
155
impl fmt:: Debug for ReadDir {
156
156
fn fmt ( & self , _f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
157
- match self . 0 { }
157
+ self . 0
158
158
}
159
159
}
160
160
161
161
impl Iterator for ReadDir {
162
162
type Item = io:: Result < DirEntry > ;
163
163
164
164
fn next ( & mut self ) -> Option < io:: Result < DirEntry > > {
165
- match self . 0 { }
165
+ self . 0
166
166
}
167
167
}
168
168
169
169
impl DirEntry {
170
170
pub fn path ( & self ) -> PathBuf {
171
- match self . 0 { }
171
+ self . 0
172
172
}
173
173
174
174
pub fn file_name ( & self ) -> OsString {
175
- match self . 0 { }
175
+ self . 0
176
176
}
177
177
178
178
pub fn metadata ( & self ) -> io:: Result < FileAttr > {
179
- match self . 0 { }
179
+ self . 0
180
180
}
181
181
182
182
pub fn file_type ( & self ) -> io:: Result < FileType > {
183
- match self . 0 { }
183
+ self . 0
184
184
}
185
185
}
186
186
0 commit comments