Skip to content

Commit

Permalink
solve passio
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Feb 3, 2025
1 parent 02eea25 commit 1641448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rust/paasio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl<R: Read> ReadStats<R> {

impl<R: Read> Read for ReadStats<R> {
fn read(&mut self, buf: &mut [u8]) -> Result<usize> {
let bytes_read = self.wrapped.read(buf).unwrap();
let bytes_read = self.wrapped.read(buf)?;
self.bytes_through += bytes_read;
self.reads += 1;
Ok(bytes_read)
Expand Down Expand Up @@ -68,7 +68,7 @@ impl<W: Write> WriteStats<W> {
impl<W: Write> Write for WriteStats<W> {
fn write(&mut self, buf: &[u8]) -> Result<usize> {
self.writes += 1;
let bytes_written = self.wrapped.write(buf).unwrap();
let bytes_written = self.wrapped.write(buf)?;
self.bytes_through += bytes_written;
Ok(bytes_written)
}
Expand Down
2 changes: 0 additions & 2 deletions rust/paasio/tests/paasio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ impl Write for WriteFails {
}

#[test]
#[ignore]
fn read_propagates_errors() {
use paasio::ReadStats;

Expand All @@ -415,7 +414,6 @@ fn read_propagates_errors() {
}

#[test]
#[ignore]
fn write_propagates_errors() {
use paasio::WriteStats;

Expand Down

0 comments on commit 1641448

Please sign in to comment.