1515 * 02110-1301, USA.
1616 */
1717
18- use nom7 :: bits:: streaming:: take as take_bits;
19- use nom7 :: branch:: alt;
20- use nom7 :: combinator:: { complete, map_opt} ;
21- use nom7 :: error:: { make_error, ErrorKind } ;
22- use nom7 :: { Err , IResult } ;
18+ use nom8 :: bits:: streaming:: take as take_bits;
19+ use nom8 :: branch:: alt;
20+ use nom8 :: combinator:: { complete, map_opt} ;
21+ use nom8 :: error:: { make_error, ErrorKind } ;
22+ use nom8 :: { Err , IResult , Parser } ;
2323
2424fn http2_huffman_table_len5 ( n : u32 ) -> Option < u8 > {
2525 match n {
@@ -38,7 +38,7 @@ fn http2_huffman_table_len5(n: u32) -> Option<u8> {
3838}
3939
4040fn http2_decode_huffman_len5 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
41- complete ( map_opt ( take_bits ( 5u32 ) , http2_huffman_table_len5) ) ( input)
41+ complete ( map_opt ( take_bits ( 5u32 ) , http2_huffman_table_len5) ) . parse ( input)
4242}
4343
4444fn http2_huffman_table_len6 ( n : u32 ) -> Option < u8 > {
@@ -74,7 +74,7 @@ fn http2_huffman_table_len6(n: u32) -> Option<u8> {
7474}
7575
7676fn http2_decode_huffman_len6 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
77- complete ( map_opt ( take_bits ( 6u32 ) , http2_huffman_table_len6) ) ( input)
77+ complete ( map_opt ( take_bits ( 6u32 ) , http2_huffman_table_len6) ) . parse ( input)
7878}
7979
8080fn http2_huffman_table_len7 ( n : u32 ) -> Option < u8 > {
@@ -116,7 +116,7 @@ fn http2_huffman_table_len7(n: u32) -> Option<u8> {
116116}
117117
118118fn http2_decode_huffman_len7 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
119- complete ( map_opt ( take_bits ( 7u32 ) , http2_huffman_table_len7) ) ( input)
119+ complete ( map_opt ( take_bits ( 7u32 ) , http2_huffman_table_len7) ) . parse ( input)
120120}
121121
122122fn http2_huffman_table_len8 ( n : u32 ) -> Option < u8 > {
@@ -132,7 +132,7 @@ fn http2_huffman_table_len8(n: u32) -> Option<u8> {
132132}
133133
134134fn http2_decode_huffman_len8 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
135- complete ( map_opt ( take_bits ( 8u32 ) , http2_huffman_table_len8) ) ( input)
135+ complete ( map_opt ( take_bits ( 8u32 ) , http2_huffman_table_len8) ) . parse ( input)
136136}
137137
138138fn http2_huffman_table_len10 ( n : u32 ) -> Option < u8 > {
@@ -147,7 +147,7 @@ fn http2_huffman_table_len10(n: u32) -> Option<u8> {
147147}
148148
149149fn http2_decode_huffman_len10 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
150- complete ( map_opt ( take_bits ( 10u32 ) , http2_huffman_table_len10) ) ( input)
150+ complete ( map_opt ( take_bits ( 10u32 ) , http2_huffman_table_len10) ) . parse ( input)
151151}
152152
153153fn http2_huffman_table_len11 ( n : u32 ) -> Option < u8 > {
@@ -160,7 +160,7 @@ fn http2_huffman_table_len11(n: u32) -> Option<u8> {
160160}
161161
162162fn http2_decode_huffman_len11 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
163- complete ( map_opt ( take_bits ( 11u32 ) , http2_huffman_table_len11) ) ( input)
163+ complete ( map_opt ( take_bits ( 11u32 ) , http2_huffman_table_len11) ) . parse ( input)
164164}
165165
166166fn http2_huffman_table_len12 ( n : u32 ) -> Option < u8 > {
@@ -172,7 +172,7 @@ fn http2_huffman_table_len12(n: u32) -> Option<u8> {
172172}
173173
174174fn http2_decode_huffman_len12 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
175- complete ( map_opt ( take_bits ( 12u32 ) , http2_huffman_table_len12) ) ( input)
175+ complete ( map_opt ( take_bits ( 12u32 ) , http2_huffman_table_len12) ) . parse ( input)
176176}
177177
178178fn http2_huffman_table_len13 ( n : u32 ) -> Option < u8 > {
@@ -188,7 +188,7 @@ fn http2_huffman_table_len13(n: u32) -> Option<u8> {
188188}
189189
190190fn http2_decode_huffman_len13 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
191- complete ( map_opt ( take_bits ( 13u32 ) , http2_huffman_table_len13) ) ( input)
191+ complete ( map_opt ( take_bits ( 13u32 ) , http2_huffman_table_len13) ) . parse ( input)
192192}
193193
194194fn http2_huffman_table_len14 ( n : u32 ) -> Option < u8 > {
@@ -200,7 +200,7 @@ fn http2_huffman_table_len14(n: u32) -> Option<u8> {
200200}
201201
202202fn http2_decode_huffman_len14 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
203- complete ( map_opt ( take_bits ( 14u32 ) , http2_huffman_table_len14) ) ( input)
203+ complete ( map_opt ( take_bits ( 14u32 ) , http2_huffman_table_len14) ) . parse ( input)
204204}
205205
206206fn http2_huffman_table_len15 ( n : u32 ) -> Option < u8 > {
@@ -213,7 +213,7 @@ fn http2_huffman_table_len15(n: u32) -> Option<u8> {
213213}
214214
215215fn http2_decode_huffman_len15 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
216- complete ( map_opt ( take_bits ( 15u32 ) , http2_huffman_table_len15) ) ( input)
216+ complete ( map_opt ( take_bits ( 15u32 ) , http2_huffman_table_len15) ) . parse ( input)
217217}
218218
219219fn http2_huffman_table_len19 ( n : u32 ) -> Option < u8 > {
@@ -226,7 +226,7 @@ fn http2_huffman_table_len19(n: u32) -> Option<u8> {
226226}
227227
228228fn http2_decode_huffman_len19 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
229- complete ( map_opt ( take_bits ( 19u32 ) , http2_huffman_table_len19) ) ( input)
229+ complete ( map_opt ( take_bits ( 19u32 ) , http2_huffman_table_len19) ) . parse ( input)
230230}
231231
232232fn http2_huffman_table_len20 ( n : u32 ) -> Option < u8 > {
@@ -244,7 +244,7 @@ fn http2_huffman_table_len20(n: u32) -> Option<u8> {
244244}
245245
246246fn http2_decode_huffman_len20 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
247- complete ( map_opt ( take_bits ( 20u32 ) , http2_huffman_table_len20) ) ( input)
247+ complete ( map_opt ( take_bits ( 20u32 ) , http2_huffman_table_len20) ) . parse ( input)
248248}
249249
250250fn http2_huffman_table_len21 ( n : u32 ) -> Option < u8 > {
@@ -267,7 +267,7 @@ fn http2_huffman_table_len21(n: u32) -> Option<u8> {
267267}
268268
269269fn http2_decode_huffman_len21 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
270- complete ( map_opt ( take_bits ( 21u32 ) , http2_huffman_table_len21) ) ( input)
270+ complete ( map_opt ( take_bits ( 21u32 ) , http2_huffman_table_len21) ) . parse ( input)
271271}
272272
273273fn http2_huffman_table_len22 ( n : u32 ) -> Option < u8 > {
@@ -303,7 +303,7 @@ fn http2_huffman_table_len22(n: u32) -> Option<u8> {
303303}
304304
305305fn http2_decode_huffman_len22 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
306- complete ( map_opt ( take_bits ( 22u32 ) , http2_huffman_table_len22) ) ( input)
306+ complete ( map_opt ( take_bits ( 22u32 ) , http2_huffman_table_len22) ) . parse ( input)
307307}
308308
309309fn http2_huffman_table_len23 ( n : u32 ) -> Option < u8 > {
@@ -342,7 +342,7 @@ fn http2_huffman_table_len23(n: u32) -> Option<u8> {
342342}
343343
344344fn http2_decode_huffman_len23 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
345- complete ( map_opt ( take_bits ( 23u32 ) , http2_huffman_table_len23) ) ( input)
345+ complete ( map_opt ( take_bits ( 23u32 ) , http2_huffman_table_len23) ) . parse ( input)
346346}
347347
348348fn http2_huffman_table_len24 ( n : u32 ) -> Option < u8 > {
@@ -364,7 +364,7 @@ fn http2_huffman_table_len24(n: u32) -> Option<u8> {
364364}
365365
366366fn http2_decode_huffman_len24 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
367- complete ( map_opt ( take_bits ( 24u32 ) , http2_huffman_table_len24) ) ( input)
367+ complete ( map_opt ( take_bits ( 24u32 ) , http2_huffman_table_len24) ) . parse ( input)
368368}
369369
370370fn http2_huffman_table_len25 ( n : u32 ) -> Option < u8 > {
@@ -378,7 +378,7 @@ fn http2_huffman_table_len25(n: u32) -> Option<u8> {
378378}
379379
380380fn http2_decode_huffman_len25 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
381- complete ( map_opt ( take_bits ( 25u32 ) , http2_huffman_table_len25) ) ( input)
381+ complete ( map_opt ( take_bits ( 25u32 ) , http2_huffman_table_len25) ) . parse ( input)
382382}
383383
384384fn http2_huffman_table_len26 ( n : u32 ) -> Option < u8 > {
@@ -403,7 +403,7 @@ fn http2_huffman_table_len26(n: u32) -> Option<u8> {
403403}
404404
405405fn http2_decode_huffman_len26 ( ( i, bit_offset) : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
406- complete ( map_opt ( take_bits ( 26u32 ) , http2_huffman_table_len26) ) ( ( i, bit_offset) )
406+ complete ( map_opt ( take_bits ( 26u32 ) , http2_huffman_table_len26) ) . parse ( ( i, bit_offset) )
407407}
408408
409409fn http2_huffman_table_len27 ( n : u32 ) -> Option < u8 > {
@@ -432,7 +432,7 @@ fn http2_huffman_table_len27(n: u32) -> Option<u8> {
432432}
433433
434434fn http2_decode_huffman_len27 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
435- complete ( map_opt ( take_bits ( 27u32 ) , http2_huffman_table_len27) ) ( input)
435+ complete ( map_opt ( take_bits ( 27u32 ) , http2_huffman_table_len27) ) . parse ( input)
436436}
437437
438438fn http2_huffman_table_len28 ( n : u32 ) -> Option < u8 > {
@@ -471,7 +471,7 @@ fn http2_huffman_table_len28(n: u32) -> Option<u8> {
471471}
472472
473473fn http2_decode_huffman_len28 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
474- complete ( map_opt ( take_bits ( 28u32 ) , http2_huffman_table_len28) ) ( input)
474+ complete ( map_opt ( take_bits ( 28u32 ) , http2_huffman_table_len28) ) . parse ( input)
475475}
476476
477477fn http2_huffman_table_len30 ( n : u32 ) -> Option < u8 > {
@@ -485,7 +485,7 @@ fn http2_huffman_table_len30(n: u32) -> Option<u8> {
485485}
486486
487487fn http2_decode_huffman_len30 ( input : ( & [ u8 ] , usize ) ) -> IResult < ( & [ u8 ] , usize ) , u8 > {
488- complete ( map_opt ( take_bits ( 30u32 ) , http2_huffman_table_len30) ) ( input)
488+ complete ( map_opt ( take_bits ( 30u32 ) , http2_huffman_table_len30) ) . parse ( input)
489489}
490490
491491//hack to end many0 even if some bits are remaining
@@ -523,5 +523,5 @@ pub fn http2_decode_huffman(input: (&[u8], usize)) -> IResult<(&[u8], usize), u8
523523 http2_decode_huffman_len30,
524524 http2_decode_huffman_end,
525525 ) ) ,
526- ) ) ( input)
526+ ) ) . parse ( input)
527527}
0 commit comments