11use brotli;
2+ use nom:: Parser as _;
23use std:: {
34 io:: { Cursor , Write } ,
45 time:: Instant ,
@@ -455,10 +456,9 @@ impl GzipBufWriter {
455456 fn parse_start ( data : & [ u8 ] ) -> nom:: IResult < & [ u8 ] , u8 > {
456457 use nom:: bytes:: streaming:: tag;
457458 use nom:: number:: streaming:: { le_i32, le_u8} ;
458- use nom:: sequence:: tuple;
459459
460460 let ( rest, ( _, flags, _mtime, _xfl, _operating_system) ) =
461- tuple ( ( tag ( b"\x1f \x8b \x08 " ) , le_u8, le_i32, le_u8, le_u8) ) ( data) ?;
461+ ( tag ( & b"\x1f \x8b \x08 " [ .. ] ) , le_u8, le_i32, le_u8, le_u8) . parse ( data) ?;
462462 Ok ( ( rest, flags) )
463463 }
464464}
@@ -467,7 +467,6 @@ impl Write for GzipBufWriter {
467467 fn write ( & mut self , data : & [ u8 ] ) -> std:: io:: Result < usize > {
468468 use nom:: bytes:: streaming:: { tag, take_until} ;
469469 use nom:: number:: streaming:: le_u16;
470- use nom:: sequence:: tuple;
471470
472471 const FHCRC : u8 = 1 << 1 ;
473472 const FEXTRA : u8 = 1 << 2 ;
@@ -534,10 +533,11 @@ impl Write for GzipBufWriter {
534533 }
535534 GzState :: Filename => {
536535 if self . flags & FNAME != 0 {
537- match tuple ( (
536+ match (
538537 take_until :: < & [ u8 ] , & [ u8 ] , nom:: error:: Error < & [ u8 ] > > ( b"\0 " as & [ u8 ] ) ,
539- tag ( b"\0 " ) ,
540- ) ) ( parse)
538+ tag ( & b"\0 " [ ..] ) ,
539+ )
540+ . parse ( parse)
541541 {
542542 Ok ( ( rest, _) ) => {
543543 parse = rest;
@@ -557,10 +557,11 @@ impl Write for GzipBufWriter {
557557 }
558558 GzState :: Comment => {
559559 if self . flags & FCOMMENT != 0 {
560- match tuple ( (
560+ match (
561561 take_until :: < & [ u8 ] , & [ u8 ] , nom:: error:: Error < & [ u8 ] > > ( b"\0 " as & [ u8 ] ) ,
562- tag ( b"\0 " ) ,
563- ) ) ( parse)
562+ tag ( & b"\0 " [ ..] ) ,
563+ )
564+ . parse ( parse)
564565 {
565566 Ok ( ( rest, _) ) => {
566567 parse = rest;
0 commit comments