File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ impl<R: Read> ReadStats<R> {
3030
3131impl < 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> {
6868impl < 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 }
Original file line number Diff line number Diff line change @@ -398,7 +398,6 @@ impl Write for WriteFails {
398398}
399399
400400#[ test]
401- #[ ignore]
402401fn read_propagates_errors ( ) {
403402 use paasio:: ReadStats ;
404403
@@ -415,7 +414,6 @@ fn read_propagates_errors() {
415414}
416415
417416#[ test]
418- #[ ignore]
419417fn write_propagates_errors ( ) {
420418 use paasio:: WriteStats ;
421419
You can’t perform that action at this time.
0 commit comments