Closed
Description
When working with enums for error reporting it would be super useful if the default implementation of Show
for enums could be customized so that you can skip the contained data. For instance if you have a MyError(SomeOtherError)
it is interesting to just get MyError
instead of MyError(SomeOtherError { foo: 42 })
or whatever is contained in there.
Activity
steveklabnik commentedon Jan 27, 2015
I believe the
Display
/Debug
split takes care of this now, asDisplay
no longer has a default implementation for exactly this reason.Merge pull request rust-lang#18669 from Veykril/push-qqkuxtvsmsut