Merge pull request #854 from sfackler/error-description

Always include something in ErrorStack's Display
This commit is contained in:
Steven Fackler 2018-02-27 17:30:48 -08:00 committed by GitHub
commit 65e124055c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,10 @@ impl ErrorStack {
impl fmt::Display for ErrorStack {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
if self.0.is_empty() {
return fmt.write_str("OpenSSL error");
}
let mut first = true;
for err in &self.0 {
if !first {