File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ pub struct Library {
104
104
}
105
105
106
106
/// Represents all reasons `pkg-config` might not succeed or be run at all.
107
- #[ derive( Debug ) ]
108
107
pub enum Error {
109
108
/// Aborted because of `*_NO_PKG_CONFIG` environment variable.
110
109
///
@@ -135,6 +134,13 @@ pub enum Error {
135
134
136
135
impl error:: Error for Error { }
137
136
137
+ impl fmt:: Debug for Error {
138
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
139
+ // Failed `unwrap()` prints Debug representation, but the default debug format lacks helpful instructions for the end users
140
+ <Error as fmt:: Display >:: fmt ( self , f)
141
+ }
142
+ }
143
+
138
144
impl fmt:: Display for Error {
139
145
fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
140
146
match * self {
You can’t perform that action at this time.
0 commit comments