fix: also use safe_unexpectedErrno
This commit is contained in:
parent
a581bef152
commit
3d58186b1a
1 changed files with 5 additions and 1 deletions
|
|
@ -662,7 +662,7 @@ fn safe_file_read(self: std.fs.File, buffer: []u8) (error{FileHandleInvalidForRe
|
|||
|
||||
fn safe_posix_read(fd: std.posix.fd_t, buf: []u8) (error{FileHandleInvalidForReading} || std.fs.File.ReadError)!usize {
|
||||
const native_os = builtin.os.tag;
|
||||
const unexpectedErrno = std.posix.unexpectedErrno;
|
||||
const unexpectedErrno = safe_unexpectedErrno;
|
||||
const maxInt = std.math.maxInt;
|
||||
const system = std.posix.system;
|
||||
const errno = std.posix.errno;
|
||||
|
|
@ -727,6 +727,10 @@ fn safe_posix_read(fd: std.posix.fd_t, buf: []u8) (error{FileHandleInvalidForRea
|
|||
}
|
||||
}
|
||||
|
||||
fn safe_unexpectedErrno(_: std.posix.system.E) std.posix.UnexpectedError {
|
||||
return error.Unexpected;
|
||||
}
|
||||
|
||||
fn merge_pending_files(self: *Self) OutOfMemoryError!void {
|
||||
defer self.sort_files_by_mtime();
|
||||
const existing = try self.files.toOwnedSlice(self.allocator);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue