Skip to content

Commit

Permalink
fix(io): step &[u8] correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed Dec 2, 2024
1 parent c1f8234 commit fafd0e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compio-io/src/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ impl AsyncRead for &[u8] {
}
}

BufResult(Ok(self.len() - this.len()), buf)
let len = self.len() - this.len();
*self = this;

BufResult(Ok(len), buf)
}
}

Expand Down

0 comments on commit fafd0e2

Please sign in to comment.