Created
February 3, 2016 14:37
-
-
Save Keruspe/06e5d737db0001f14508 to your computer and use it in GitHub Desktop.
stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/parser.rs b/src/parser.rs | |
index 3945963..a0b9b53 100644 | |
--- a/src/parser.rs | |
+++ b/src/parser.rs | |
@@ -334,13 +334,7 @@ fn parse_ustar00<'a, 'b>(i: &'a [u8], flag: &'b TypeFlag) -> IResult<&'a [u8], E | |
} | |
fn parse_ustar<'a, 'b>(i: &'a [u8], flag: &'b TypeFlag) -> IResult<&'a [u8], ExtraHeader<'a>> { | |
- chain!(i, | |
- tag!("ustar\0") ~ | |
- ustar: apply!(parse_ustar00, flag), | |
- ||{ | |
- ustar | |
- } | |
- ) | |
+ map!(i, pair!(tag!("ustar\0"), apply!(parse_ustar00, flag)), |(_, ustar)| ustar); | |
} | |
/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment