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
2 changes: 2 additions & 0 deletions tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
unused_parens,
while_true
)]
// TODO: once `tracing` bumps its MSRV to 1.42, remove this allow.
#![allow(unused)]
extern crate proc_macro;

use std::collections::HashSet;
Expand Down
7 changes: 0 additions & 7 deletions tracing-subscriber/src/filter/env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,6 @@ impl fmt::Display for FromEnvError {
}

impl Error for FromEnvError {
fn description(&self) -> &str {
match self.kind {
ErrorKind::Parse(ref p) => p.description(),
ErrorKind::Env(ref e) => e.description(),
}
}

fn source(&self) -> Option<&(dyn Error + 'static)> {
match self.kind {
ErrorKind::Parse(ref p) => Some(p),
Expand Down
13 changes: 5 additions & 8 deletions tracing-subscriber/src/reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,12 @@ impl Error {

impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
error::Error::description(self).fmt(f)
}
}

impl error::Error for Error {
fn description(&self) -> &str {
match self.kind {
let msg = match self.kind {
ErrorKind::SubscriberGone => "subscriber no longer exists",
ErrorKind::Poisoned => "lock poisoned",
}
};
f.pad(msg)
}
}

impl error::Error for Error {}