Implement Error::source on IntoStringError
IntoStringError only implemented Error::cause, which is deprecated. This implemements Error::source instead. Error::cause will still work as before, thanks to the default implementation.
This commit is contained in:
parent
3da6836cc9
commit
cd0e4c3263
@ -919,7 +919,7 @@ impl Error for IntoStringError {
|
||||
"C string contained non-utf8 bytes"
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&dyn Error> {
|
||||
fn source(&self) -> Option<&(dyn Error + 'static)> {
|
||||
Some(&self.error)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user