Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/kv/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ mod std_support {
}
}

impl error::Error for Error {
fn description(&self) -> &str {
"key values error"
}
}
impl error::Error for Error {}

impl From<io::Error> for Error {
fn from(err: io::Error) -> Self {
Expand Down
14 changes: 3 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,11 +1330,7 @@ impl fmt::Display for SetLoggerError {

// The Error trait is not available in libcore
#[cfg(feature = "std")]
impl error::Error for SetLoggerError {
fn description(&self) -> &str {
SET_LOGGER_ERROR
}
}
impl error::Error for SetLoggerError {}

/// The type returned by [`from_str`] when the string doesn't match any of the log levels.
///
Expand All @@ -1351,11 +1347,7 @@ impl fmt::Display for ParseLevelError {

// The Error trait is not available in libcore
#[cfg(feature = "std")]
impl error::Error for ParseLevelError {
fn description(&self) -> &str {
LEVEL_PARSE_ERROR
}
}
impl error::Error for ParseLevelError {}

/// Returns a reference to the logger.
///
Expand Down Expand Up @@ -1579,7 +1571,7 @@ mod tests {
use std::error::Error;
let e = SetLoggerError(());
assert_eq!(
e.description(),
&e.to_string(),
"attempted to set a logger after the logging system \
was already initialized"
);
Expand Down