You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
I am curious how I can debug nom errors. In nom, most helpful functions (like convert_error) operate under &str while the libsip library uses &[u8]. At some point in my code I have something like:
the e.to_string() does not give very helpful data, even if I do format!("{:?}", e), it's just prints plain binary (array of numbers). Nom provides some pretty good support for human-friendly errors and I would like to use it somehow. Ideas how to convert the libsip VerboseError<&[u8]> to VerboseError<&str> ?
Sorry, I am a bit new to Rust.
The text was updated successfully, but these errors were encountered:
In order to have VerboseError<&str> we should have functions that accept &str instead of &[u8]. @ByteBuddha Is there a reason they accept input as &[u8]? :-)
@KalitaAlexey I have started messing around with it, I tried first to wrap nom::error::covert_error to work with the VerboseError<&[u8]> but that causes error messages to be invalid. I won't have anytime to work on this for a couple weeks so feel free to and if not I'll pick it up as soon as I get some free time
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I am curious how I can debug nom errors. In nom, most helpful functions (like convert_error) operate under
&str
while the libsip library uses&[u8]
. At some point in my code I have something like:the
e.to_string()
does not give very helpful data, even if I doformat!("{:?}", e)
, it's just prints plain binary (array of numbers). Nom provides some pretty good support for human-friendly errors and I would like to use it somehow. Ideas how to convert the libsipVerboseError<&[u8]>
toVerboseError<&str>
?Sorry, I am a bit new to Rust.
The text was updated successfully, but these errors were encountered: