diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index dfeea93..9425106 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,9 +98,8 @@ fn p_arrangement<'a>(data: &'a [u8]) -> IResult<&'a [u8], PArrangement> { Ok((data, v)) } -fn fourcc<'a>(data: &'a [u8]) -> IResult<&'a [u8], &'a str> { - let (rest, tag) = take(4usize)(data)?; - Ok((rest, std::str::from_utf8(tag).unwrap())) +fn fourcc<'a>(input: &'a [u8]) -> IResult<&'a [u8], &'a str> { + map(take(4usize), |tag| std::str::from_utf8(tag).unwrap())(input) } /** |