diff options
| author | Steven Fackler <[email protected]> | 2018-02-27 17:30:48 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-02-27 17:30:48 -0800 |
| commit | 65e124055ca035bd388f338f353cdf33a6932cd4 (patch) | |
| tree | b30b076dc89a7e6b67e9f763c9d376a0b18da75c /openssl/src/error.rs | |
| parent | Merge pull request #853 from sfackler/min-max-version (diff) | |
| parent | Always include something in ErrorStack's Display (diff) | |
| download | rust-openssl-65e124055ca035bd388f338f353cdf33a6932cd4.tar.xz rust-openssl-65e124055ca035bd388f338f353cdf33a6932cd4.zip | |
Merge pull request #854 from sfackler/error-description
Always include something in ErrorStack's Display
Diffstat (limited to 'openssl/src/error.rs')
| -rw-r--r-- | openssl/src/error.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openssl/src/error.rs b/openssl/src/error.rs index 7f3d472e..1ddd0f50 100644 --- a/openssl/src/error.rs +++ b/openssl/src/error.rs @@ -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 { |