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 think I haven't had yet the occasion to thank you for thiserror (as well as a lot of other crates actually), so here it is: thank you! And sorry for not having had issues with your crates earlier, which would have allowed me to thank you without just spamming 😛
I recently hit a limitation of thiserror: sometimes, I just want to hide an error type from a sub-library, and re-export it under another name, so that the implementation details don't leak.
Hello,
I think I haven't had yet the occasion to thank you for
thiserror
(as well as a lot of other crates actually), so here it is: thank you! And sorry for not having had issues with your crates earlier, which would have allowed me to thank you without just spamming 😛I recently hit a limitation of
thiserror
: sometimes, I just want to hide an error type from a sub-library, and re-export it under another name, so that the implementation details don't leak.So I originally tried this:
However, it looks like this doesn't implement
Display
forE
.On the other hand, this works perfectly:
But then, it leaks the implementation detail of the inner error type.
Do you think it'd make sense to have
#[error(transparent)]
work on structs? Or maybe it'd be a bad idea anyway for reasons I can't think of right now?The text was updated successfully, but these errors were encountered: