File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ impl<R: ?Sized + Read> Read for BufReader<R> {
349
349
let prev = cursor. written ( ) ;
350
350
351
351
let mut rem = self . fill_buf ( ) ?;
352
- rem. read_buf ( cursor. reborrow ( ) ) ?;
352
+ rem. read_buf ( cursor. reborrow ( ) ) ?; // actually never fails
353
353
354
354
self . consume ( cursor. written ( ) - prev) ; //slice impl of read_buf known to never unfill buf
355
355
Original file line number Diff line number Diff line change @@ -133,11 +133,13 @@ impl Buffer {
133
133
buf. set_init ( self . initialized ) ;
134
134
}
135
135
136
- reader. read_buf ( buf. unfilled ( ) ) ? ;
136
+ let result = reader. read_buf ( buf. unfilled ( ) ) ;
137
137
138
138
self . pos = 0 ;
139
139
self . filled = buf. len ( ) ;
140
140
self . initialized = buf. init_len ( ) ;
141
+
142
+ result?;
141
143
}
142
144
Ok ( self . buffer ( ) )
143
145
}
You can’t perform that action at this time.
0 commit comments