Created
April 3, 2022 10:38
-
-
Save jchia/c2b7e583f964e43b162d801cf0abefe3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
fn magic_parser(i: &[u8]) -> IResult<&[u8], ()> { | |
ctor::value((), streaming::tag((0x7b5aff5f_u32).to_be_bytes()))(i) | |
} | |
fn get_magic(i: &[u8]) -> Result<(), Box<dyn std::error::Error>> { | |
// `i` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirementrustcE0759 | |
let x = magic_parser(i)?; | |
Ok(()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment