Skip to content

Commit

Permalink
asyncio: return error super set in pread/pwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
steeve committed Aug 6, 2024
1 parent e2416ff commit d8a4773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/asyncio.zig
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ pub const File = struct {
}

const PReadResult = xev.ReadError!usize;
pub fn pread(self: Self, buf: xev.ReadBuffer, offset: u64) PReadResult {
pub fn pread(self: Self, buf: xev.ReadBuffer, offset: u64) !usize {
const ResultT = PReadResult;
const Data = struct {
result: ResultT = undefined,
Expand Down Expand Up @@ -391,7 +391,7 @@ pub const File = struct {
}

const PWriteResult = xev.WriteError!usize;
pub fn pwrite(self: Self, buf: xev.WriteBuffer, offset: u64) PWriteResult {
pub fn pwrite(self: Self, buf: xev.WriteBuffer, offset: u64) !usize {
const ResultT = PWriteResult;
const Data = struct {
result: ResultT = undefined,
Expand Down

0 comments on commit d8a4773

Please sign in to comment.