Display for Error was incorrectly showing func instead of reason.

This commit is contained in:
Simon Génier 2019-05-30 15:06:14 -04:00
parent 3b064fdb02
commit e3ac3f40bf
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ impl fmt::Display for Error {
}
match self.reason() {
Some(r) => write!(fmt, ":{}", r)?,
None => write!(fmt, ":reason({})", ffi::ERR_GET_FUNC(self.code()))?,
None => write!(fmt, ":reason({})", ffi::ERR_GET_REASON(self.code()))?,
}
write!(
fmt,