@@ -565,13 +565,13 @@ impl<'a> From<&'a [u8]> for Body {
565
565
}
566
566
567
567
impl AsyncRead for Body {
568
- #[ allow( missing_doc_code_examples) ]
568
+ #[ allow( rustdoc :: missing_doc_code_examples) ]
569
569
fn poll_read (
570
570
mut self : Pin < & mut Self > ,
571
571
cx : & mut Context < ' _ > ,
572
572
buf : & mut [ u8 ] ,
573
573
) -> Poll < io:: Result < usize > > {
574
- let mut buf = match self . length {
574
+ let buf = match self . length {
575
575
None => buf,
576
576
Some ( length) if length == self . bytes_read => return Poll :: Ready ( Ok ( 0 ) ) ,
577
577
Some ( length) => {
@@ -582,14 +582,14 @@ impl AsyncRead for Body {
582
582
}
583
583
} ;
584
584
585
- let bytes = ready ! ( Pin :: new( & mut self . reader) . poll_read( cx, & mut buf) ) ?;
585
+ let bytes = ready ! ( Pin :: new( & mut self . reader) . poll_read( cx, buf) ) ?;
586
586
self . bytes_read += bytes as u64 ;
587
587
Poll :: Ready ( Ok ( bytes) )
588
588
}
589
589
}
590
590
591
591
impl AsyncBufRead for Body {
592
- #[ allow( missing_doc_code_examples) ]
592
+ #[ allow( rustdoc :: missing_doc_code_examples) ]
593
593
fn poll_fill_buf ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < & ' _ [ u8 ] > > {
594
594
self . project ( ) . reader . poll_fill_buf ( cx)
595
595
}
@@ -632,6 +632,7 @@ mod test {
632
632
#[ derive( Debug , Deserialize ) ]
633
633
#[ serde( crate = "serde_crate" ) ]
634
634
struct Foo {
635
+ #[ allow( dead_code) ]
635
636
inner : String ,
636
637
}
637
638
let body = Body :: empty ( ) ;
@@ -644,6 +645,7 @@ mod test {
644
645
#[ derive( Debug , Deserialize ) ]
645
646
#[ serde( crate = "serde_crate" ) ]
646
647
struct Foo {
648
+ #[ allow( dead_code) ]
647
649
inner : String ,
648
650
}
649
651
let body = Body :: empty ( ) ;
0 commit comments