diff --git a/Cargo.toml b/Cargo.toml index 28ee403cc5fecfe5aae5bd25f9fb2c69112bee20..664fa6f97eff4e4e0e8d850e8c35064d1d7f5a81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://lib.rs/crates/lcms2" documentation = "https://kornelski.github.io/rust-lcms2/lcms2/" repository = "https://github.com/kornelski/rust-lcms2.git" categories = ["multimedia::images", "api-bindings"] -version = "5.1.5" +version = "5.1.6" edition = "2018" [dependencies] diff --git a/src/error.rs b/src/error.rs index 86f93fd6aed427417b9f2ebb71edbe31ee361fc0..d20605f58b0e2e326743e5513ca9ff96a64ec5f7 100644 --- a/src/error.rs +++ b/src/error.rs @@ -24,16 +24,13 @@ pub type LCMSResult<T> = Result<T, Error>; impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.description()) - } -} - -impl StdError for Error { - fn description(&self) -> &str { - match *self { + f.write_str(match *self { Error::ObjectCreationError => "Could not create the object.\nThe reason is not known, but it's usually caused by wrong input parameters.", Error::InvalidString => "String is not valid. Contains unsupported characters or is too long.", Error::MissingData => "Requested data is empty or does not exist.", - } + }) } } + +impl StdError for Error { +}