File tree 2 files changed +5
-9
lines changed
gix-packetline/src/read/sidebands
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -354,11 +354,9 @@ where
354
354
F : FnMut ( bool , & [ u8 ] ) -> ProgressAction + Unpin ,
355
355
{
356
356
fn poll_read ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > , buf : & mut [ u8 ] ) -> Poll < std:: io:: Result < usize > > {
357
- let nread = {
358
- use std:: io:: Read ;
359
- let mut rem = ready ! ( self . as_mut( ) . poll_fill_buf( cx) ) ?;
360
- rem. read ( buf) ?
361
- } ;
357
+ use std:: io:: Read ;
358
+ let mut rem = ready ! ( self . as_mut( ) . poll_fill_buf( cx) ) ?;
359
+ let nread = rem. read ( buf) ?;
362
360
self . consume ( nread) ;
363
361
Poll :: Ready ( Ok ( nread) )
364
362
}
Original file line number Diff line number Diff line change @@ -208,10 +208,8 @@ where
208
208
F : FnMut ( bool , & [ u8 ] ) -> ProgressAction ,
209
209
{
210
210
fn read ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < usize > {
211
- let nread = {
212
- let mut rem = self . fill_buf ( ) ?;
213
- rem. read ( buf) ?
214
- } ;
211
+ let mut rem = self . fill_buf ( ) ?;
212
+ let nread = rem. read ( buf) ?;
215
213
self . consume ( nread) ;
216
214
Ok ( nread)
217
215
}
You can’t perform that action at this time.
0 commit comments