@@ -63,17 +63,17 @@ impl Header {
6363 }
6464}
6565
66- fn consume_input ( crc : Crc , n : usize , input : & mut PartialBuffer < & [ u8 ] > ) {
66+ fn consume_input ( crc : & mut Crc , n : usize , input : & mut PartialBuffer < & [ u8 ] > ) {
6767 crc. update ( & input. unwritten ( ) [ ..n] ) ;
6868 input. advance ( n) ;
6969}
7070
71- fn consume_cstr ( crc : Crc , input : & mut PartialBuffer < & [ u8 ] > ) -> Option < ( ) > {
71+ fn consume_cstr ( crc : & mut Crc , input : & mut PartialBuffer < & [ u8 ] > ) -> Option < ( ) > {
7272 if let Some ( len) = memchr:: memchr ( 0 , input. unwritten ( ) ) {
73- consume_input ( len + 1 , input) ;
73+ consume_input ( crc , len + 1 , input) ;
7474 Some ( ( ) )
7575 } else {
76- consume_input ( input. unwritten ( ) . len ( ) , input) ;
76+ consume_input ( crc , input. unwritten ( ) . len ( ) , input) ;
7777 None
7878 }
7979}
@@ -116,7 +116,7 @@ impl Parser {
116116 State :: Extra ( bytes_to_consume) => {
117117 let n = input. unwritten ( ) . len ( ) . min ( * bytes_to_consume) ;
118118 * bytes_to_consume -= n;
119- consume_input ( crc, n, input) ;
119+ consume_input ( & mut self . crc , n, input) ;
120120
121121 if * bytes_to_consume == 0 {
122122 self . state = State :: Filename ;
@@ -131,7 +131,7 @@ impl Parser {
131131 continue ;
132132 }
133133
134- if consume_cstr ( crc, input) . is_none ( ) {
134+ if consume_cstr ( & mut self . crc , input) . is_none ( ) {
135135 break Ok ( None ) ;
136136 }
137137
@@ -144,7 +144,7 @@ impl Parser {
144144 continue ;
145145 }
146146
147- if consume_cstr ( crc, input) . is_none ( ) {
147+ if consume_cstr ( & mut self . crc , input) . is_none ( ) {
148148 break Ok ( None ) ;
149149 }
150150
0 commit comments