Skip to content

Commit 33f5078

Browse files
committed
add private unit to all pub fs types in vexos PAL
1 parent a4701ce commit 33f5078

File tree

1 file changed

+4
-5
lines changed
  • library/std/src/sys/pal/vexos

1 file changed

+4
-5
lines changed

library/std/src/sys/pal/vexos/fs.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct OpenOptions {
3939
}
4040

4141
#[derive(Copy, Clone, Debug, Default)]
42-
pub struct FileTimes {}
42+
pub struct FileTimes(());
4343

4444
#[derive(Clone, Debug, PartialEq, Eq)]
4545
pub struct FilePermissions;
@@ -50,7 +50,7 @@ pub struct FileType {
5050
}
5151

5252
#[derive(Debug)]
53-
pub struct DirBuilder {}
53+
pub struct DirBuilder(());
5454

5555
impl FileAttr {
5656
/// Creates a FileAttr by getting data from an opened file.
@@ -217,13 +217,12 @@ impl File {
217217
// Open in read only mode
218218
unsafe { vex_sdk::vexFileOpen(path.as_ptr(), c"".as_ptr()) }
219219
} else if opts.write && opts.append {
220-
// Open in read/write and append mode
220+
// Open in write and append mode
221221
unsafe { vex_sdk::vexFileOpenWrite(path.as_ptr()) }
222222
} else if opts.write && opts.truncate {
223-
// Open in read/write mode
223+
// Open in write mode
224224
unsafe { vex_sdk::vexFileOpenCreate(path.as_ptr()) }
225225
} else if opts.write {
226-
// Open in read/write and overwrite mode
227226
unsafe {
228227
// Open in read/write and append mode
229228
let fd = vex_sdk::vexFileOpenWrite(path.as_ptr());

0 commit comments

Comments
 (0)