Skip to content

Commit ef356f3

Browse files
authored
Merge pull request #101 from AnderEnder/remove-deprecated-error-description-cause
Remove deprecated Error::description and Error::cause
2 parents 96e55cf + 0a171ed commit ef356f3

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/lib.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -126,27 +126,7 @@ pub enum Error {
126126
__Nonexhaustive,
127127
}
128128

129-
impl error::Error for Error {
130-
fn description(&self) -> &str {
131-
match *self {
132-
Error::EnvNoPkgConfig(_) => "pkg-config requested to be aborted",
133-
Error::CrossCompilation => {
134-
"pkg-config doesn't handle cross compilation. \
135-
Use PKG_CONFIG_ALLOW_CROSS=1 to override"
136-
}
137-
Error::Command { .. } => "failed to run pkg-config",
138-
Error::Failure { .. } => "pkg-config did not exit sucessfully",
139-
Error::__Nonexhaustive => panic!(),
140-
}
141-
}
142-
143-
fn cause(&self) -> Option<&dyn error::Error> {
144-
match *self {
145-
Error::Command { ref cause, .. } => Some(cause),
146-
_ => None,
147-
}
148-
}
149-
}
129+
impl error::Error for Error {}
150130

151131
impl fmt::Display for Error {
152132
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {

0 commit comments

Comments
 (0)