Open
Description
It's very common to use io::Error::new(kind, "some message")
, including in many places in std
. However, that will create a io::Error
containing a Repr::Custom
containing a Box<Custom>
containing a Box<dyn Error + ..>
containing a StringError
containing a String
containing a copy of the message. 🙃
Three allocations to just return an error message which is in some cases not even more helpful than just the ErrorKind, is not great. We should find a way to improve this.