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
I have an error enum that I want to convert from snafu to thiserror with the following case:
#[error("Error serializing type {source}: {msg}")]SerializeErr{/// the source type that was attemptedsource:String,msg:String,#[cfg(feature = "backtraces")]backtrace:Backtrace,},
It looks the field source gets some unintended special treatment such that my code does not compile. Renaming the field solves the problem. But can this be sone without changing the field name?
Is it possible to do something like #[snafu(source(false))]? I tried using #[source(false)] but this causes my error to not derive Display anymore. Is the use of #[source(false)] correct? I did not see it in documentation.
The text was updated successfully, but these errors were encountered:
I have an error enum that I want to convert from snafu to thiserror with the following case:
It looks the field
source
gets some unintended special treatment such that my code does not compile. Renaming the field solves the problem. But can this be sone without changing the field name?Is it possible to do something like
#[snafu(source(false))]
? I tried using#[source(false)]
but this causes my error to not deriveDisplay
anymore. Is the use of#[source(false)]
correct? I did not see it in documentation.The text was updated successfully, but these errors were encountered: