2

I am building a pretty simple parser over &[u8]. Unfortunately, when I try to convert the errors I get into anyhow errors, it informs me that the various nom Error types (nom::error::Error and nom::error::VerboseError) don't implement Display, and thus don't actually implement std::error:Error. Is there anything I can do to make these errors propagate?

kazagistar
  • 1,537
  • 8
  • 20
  • _"when I try to convert the errors"_ -- what exactly do you mean by that? Code would be helpful here. – Peter Hall Dec 06 '22 at 10:14
  • 1
    In case anyone else was slightly confused looking at the docs: `Error` [does implement `Display`](https://docs.rs/nom/latest/nom/error/struct.Error.html#impl-Display), but only where `I` also implements `Display` - the issue here is that `&[u8]` doesn't. – Joe Clay Dec 06 '22 at 11:23

0 Answers0