#nom crate different input types
2 messages · Page 1 of 1 (latest)
normally you shouldn't mix parsing of &str and &[u8], you can usually do everything on &[u8]
converting IResult<&str, _> should be easy: res.map(|s| s.as_bytes());
the other way without checks isn't allowed, because &str has to be utf-8, you can use the std::str::from_utf8 function for the conversion
