@@ -852,26 +852,24 @@ mod test {
852852 fn test_decode_empty ( ) {
853853 let mut de = Decoder :: new ( 0 ) ;
854854 let mut buf = BytesMut :: new ( ) ;
855- let empty = de. decode ( & mut Cursor :: new ( & mut buf) , |_| { } ) . unwrap ( ) ;
856- assert_eq ! ( empty, ( ) ) ;
855+ let _: ( ) = de. decode ( & mut Cursor :: new ( & mut buf) , |_| { } ) . unwrap ( ) ;
857856 }
858857
859858 #[ test]
860859 fn test_decode_indexed_larger_than_table ( ) {
861860 let mut de = Decoder :: new ( 0 ) ;
862861
863862 let mut buf = BytesMut :: new ( ) ;
864- buf. extend ( & [ 0b01000000 , 0x80 | 2 ] ) ;
863+ buf. extend ( [ 0b01000000 , 0x80 | 2 ] ) ;
865864 buf. extend ( huff_encode ( b"foo" ) ) ;
866- buf. extend ( & [ 0x80 | 3 ] ) ;
865+ buf. extend ( [ 0x80 | 3 ] ) ;
867866 buf. extend ( huff_encode ( b"bar" ) ) ;
868867
869868 let mut res = vec ! [ ] ;
870- let _ = de
871- . decode ( & mut Cursor :: new ( & mut buf) , |h| {
872- res. push ( h) ;
873- } )
874- . unwrap ( ) ;
869+ de. decode ( & mut Cursor :: new ( & mut buf) , |h| {
870+ res. push ( h) ;
871+ } )
872+ . unwrap ( ) ;
875873
876874 assert_eq ! ( res. len( ) , 1 ) ;
877875 assert_eq ! ( de. table. size( ) , 0 ) ;
@@ -900,10 +898,10 @@ mod test {
900898 let value = huff_encode ( b"bar" ) ;
901899 let mut buf = BytesMut :: new ( ) ;
902900 // header name is non_huff encoded
903- buf. extend ( & [ 0b01000000 , 0x00 | 3 ] ) ;
901+ buf. extend ( [ 0b01000000 , 3 ] ) ;
904902 buf. extend ( b"foo" ) ;
905903 // header value is partial
906- buf. extend ( & [ 0x80 | 3 ] ) ;
904+ buf. extend ( [ 0x80 | 3 ] ) ;
907905 buf. extend ( & value[ 0 ..1 ] ) ;
908906
909907 let mut res = vec ! [ ] ;
@@ -917,11 +915,10 @@ mod test {
917915
918916 // extend buf with the remaining header value
919917 buf. extend ( & value[ 1 ..] ) ;
920- let _ = de
921- . decode ( & mut Cursor :: new ( & mut buf) , |h| {
922- res. push ( h) ;
923- } )
924- . unwrap ( ) ;
918+ de. decode ( & mut Cursor :: new ( & mut buf) , |h| {
919+ res. push ( h) ;
920+ } )
921+ . unwrap ( ) ;
925922
926923 assert_eq ! ( res. len( ) , 1 ) ;
927924 assert_eq ! ( de. table. size( ) , 0 ) ;
0 commit comments