Merge pull request #1118 from animalsiknow/error-display-reason

Display for Error incorrectly showing func instead of reason.
This commit is contained in:
Steven Fackler 2019-05-30 13:06:23 -07:00 committed by GitHub
commit 0202c20ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,