Skip to content

Commit 1641448

Browse files
committed
solve passio
1 parent 02eea25 commit 1641448

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

rust/paasio/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<R: Read> ReadStats<R> {
3030

3131
impl<R: Read> Read for ReadStats<R> {
3232
fn read(&mut self, buf: &mut [u8]) -> Result<usize> {
33-
let bytes_read = self.wrapped.read(buf).unwrap();
33+
let bytes_read = self.wrapped.read(buf)?;
3434
self.bytes_through += bytes_read;
3535
self.reads += 1;
3636
Ok(bytes_read)
@@ -68,7 +68,7 @@ impl<W: Write> WriteStats<W> {
6868
impl<W: Write> Write for WriteStats<W> {
6969
fn write(&mut self, buf: &[u8]) -> Result<usize> {
7070
self.writes += 1;
71-
let bytes_written = self.wrapped.write(buf).unwrap();
71+
let bytes_written = self.wrapped.write(buf)?;
7272
self.bytes_through += bytes_written;
7373
Ok(bytes_written)
7474
}

rust/paasio/tests/paasio.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ impl Write for WriteFails {
398398
}
399399

400400
#[test]
401-
#[ignore]
402401
fn read_propagates_errors() {
403402
use paasio::ReadStats;
404403

@@ -415,7 +414,6 @@ fn read_propagates_errors() {
415414
}
416415

417416
#[test]
418-
#[ignore]
419417
fn write_propagates_errors() {
420418
use paasio::WriteStats;
421419

0 commit comments

Comments
 (0)