Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated Error::description #1175

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Changed
### Fixed
### Removed
- Removed deprecated Error::description from error types
(#[1175](https://github.com/nix-rust/nix/pull/1175))

## [0.16.1] - 23 December 2019
### Added
Expand Down
6 changes: 1 addition & 5 deletions src/errno.rs
Expand Up @@ -111,11 +111,7 @@ impl ErrnoSentinel for libc::sighandler_t {
fn sentinel() -> Self { libc::SIG_ERR }
}

impl error::Error for Errno {
fn description(&self) -> &str {
self.desc()
}
}
impl error::Error for Errno {}

impl fmt::Display for Errno {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down
11 changes: 1 addition & 10 deletions src/lib.rs
Expand Up @@ -152,16 +152,7 @@ impl From<std::string::FromUtf8Error> for Error {
fn from(_: std::string::FromUtf8Error) -> Error { Error::InvalidUtf8 }
}

impl error::Error for Error {
fn description(&self) -> &str {
match *self {
Error::InvalidPath => "Invalid path",
Error::InvalidUtf8 => "Invalid UTF-8 string",
Error::UnsupportedOperation => "Unsupported Operation",
Error::Sys(ref errno) => errno.desc(),
}
}
}
impl error::Error for Error {}

impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down