@@ -463,7 +463,7 @@ impl<'s> ProguardRecord<'s> {
463463/// Parses a single line from a Proguard File.
464464///
465465/// Returns `Err(ParseError)` if the line could not be parsed.
466- fn parse_proguard_record ( bytes : & [ u8 ] ) -> ( Result < ProguardRecord , ParseError > , & [ u8 ] ) {
466+ fn parse_proguard_record ( bytes : & [ u8 ] ) -> ( Result < ProguardRecord < ' _ > , ParseError < ' _ > > , & [ u8 ] ) {
467467 let bytes = consume_leading_newlines ( bytes) ;
468468
469469 let result = if let Some ( bytes) = bytes. trim_ascii_start ( ) . strip_prefix ( b"#" ) {
@@ -497,7 +497,7 @@ fn parse_proguard_record(bytes: &[u8]) -> (Result<ProguardRecord, ParseError>, &
497497}
498498
499499/// Parses a single Proguard Header from a Proguard File.
500- fn parse_proguard_header ( bytes : & [ u8 ] ) -> Result < ( ProguardRecord , & [ u8 ] ) , ParseError > {
500+ fn parse_proguard_header ( bytes : & [ u8 ] ) -> Result < ( ProguardRecord < ' _ > , & [ u8 ] ) , ParseError < ' _ > > {
501501 // Note: the leading `#` has already been parsed.
502502
503503 // Existing logic for `key: value` format
@@ -516,7 +516,7 @@ fn parse_proguard_header(bytes: &[u8]) -> Result<(ProguardRecord, &[u8]), ParseE
516516 Ok ( ( record, consume_leading_newlines ( bytes) ) )
517517}
518518
519- fn parse_r8_header ( bytes : & [ u8 ] ) -> Result < ( ProguardRecord , & [ u8 ] ) , ParseError > {
519+ fn parse_r8_header ( bytes : & [ u8 ] ) -> Result < ( ProguardRecord < ' _ > , & [ u8 ] ) , ParseError < ' _ > > {
520520 // Note: the leading `#` has already been parsed.
521521
522522 let ( header, rest) = parse_until ( bytes, is_newline) ?;
@@ -532,7 +532,9 @@ fn parse_r8_header(bytes: &[u8]) -> Result<(ProguardRecord, &[u8]), ParseError>
532532}
533533
534534/// Parses a single Proguard Field or Method from a Proguard File.
535- fn parse_proguard_field_or_method ( bytes : & [ u8 ] ) -> Result < ( ProguardRecord , & [ u8 ] ) , ParseError > {
535+ fn parse_proguard_field_or_method (
536+ bytes : & [ u8 ] ,
537+ ) -> Result < ( ProguardRecord < ' _ > , & [ u8 ] ) , ParseError < ' _ > > {
536538 // field line or method line:
537539 // `originalfieldtype originalfieldname -> obfuscatedfieldname`
538540 // `[startline:endline:]originalreturntype [originalclassname.]originalmethodname(originalargumenttype,...)[:originalstartline[:originalendline]] -> obfuscatedmethodname`
@@ -635,7 +637,7 @@ fn parse_proguard_field_or_method(bytes: &[u8]) -> Result<(ProguardRecord, &[u8]
635637}
636638
637639/// Parses a single Proguard Class from a Proguard File.
638- fn parse_proguard_class ( bytes : & [ u8 ] ) -> Result < ( ProguardRecord , & [ u8 ] ) , ParseError > {
640+ fn parse_proguard_class ( bytes : & [ u8 ] ) -> Result < ( ProguardRecord < ' _ > , & [ u8 ] ) , ParseError < ' _ > > {
639641 // class line:
640642 // `originalclassname -> obfuscatedclassname:`
641643 let ( original, bytes) = parse_until_no_newline ( bytes, |c| * c == b' ' ) ?;
@@ -654,7 +656,7 @@ fn parse_proguard_class(bytes: &[u8]) -> Result<(ProguardRecord, &[u8]), ParseEr
654656 Ok ( ( record, consume_leading_newlines ( bytes) ) )
655657}
656658
657- fn parse_usize ( bytes : & [ u8 ] ) -> Result < ( usize , & [ u8 ] ) , ParseError > {
659+ fn parse_usize ( bytes : & [ u8 ] ) -> Result < ( usize , & [ u8 ] ) , ParseError < ' _ > > {
658660 let ( slice, rest) = match bytes. iter ( ) . position ( |c| !( * c as char ) . is_numeric ( ) ) {
659661 Some ( pos) => bytes. split_at ( pos) ,
660662 None => ( bytes, & [ ] as & [ u8 ] ) ,
@@ -682,7 +684,7 @@ fn parse_prefix<'s>(bytes: &'s [u8], prefix: &'s [u8]) -> Result<&'s [u8], Parse
682684 } )
683685}
684686
685- fn parse_until < P > ( bytes : & [ u8 ] , predicate : P ) -> Result < ( & str , & [ u8 ] ) , ParseError >
687+ fn parse_until < P > ( bytes : & [ u8 ] , predicate : P ) -> Result < ( & str , & [ u8 ] ) , ParseError < ' _ > >
686688where
687689 P : Fn ( & u8 ) -> bool ,
688690{
@@ -700,7 +702,7 @@ where
700702 }
701703}
702704
703- fn parse_until_no_newline < P > ( bytes : & [ u8 ] , predicate : P ) -> Result < ( & str , & [ u8 ] ) , ParseError >
705+ fn parse_until_no_newline < P > ( bytes : & [ u8 ] , predicate : P ) -> Result < ( & str , & [ u8 ] ) , ParseError < ' _ > >
704706where
705707 P : Fn ( & u8 ) -> bool ,
706708{
0 commit comments