Skip to content

Commit 3c80984

Browse files
authored
chore: fix warnings on nightly (#558)
Signed-off-by: David Barsky <[email protected]>
1 parent c889311 commit 3c80984

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

tracing-attributes/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
unused_parens,
5959
while_true
6060
)]
61+
// TODO: once `tracing` bumps its MSRV to 1.42, remove this allow.
62+
#![allow(unused)]
6163
extern crate proc_macro;
6264

6365
use std::collections::HashSet;

tracing-subscriber/src/filter/env/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,6 @@ impl fmt::Display for FromEnvError {
413413
}
414414

415415
impl Error for FromEnvError {
416-
fn description(&self) -> &str {
417-
match self.kind {
418-
ErrorKind::Parse(ref p) => p.description(),
419-
ErrorKind::Env(ref e) => e.description(),
420-
}
421-
}
422-
423416
fn source(&self) -> Option<&(dyn Error + 'static)> {
424417
match self.kind {
425418
ErrorKind::Parse(ref p) => Some(p),

tracing-subscriber/src/reload.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,12 @@ impl Error {
228228

229229
impl fmt::Display for Error {
230230
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
231-
error::Error::description(self).fmt(f)
232-
}
233-
}
234-
235-
impl error::Error for Error {
236-
fn description(&self) -> &str {
237-
match self.kind {
231+
let msg = match self.kind {
238232
ErrorKind::SubscriberGone => "subscriber no longer exists",
239233
ErrorKind::Poisoned => "lock poisoned",
240-
}
234+
};
235+
f.pad(msg)
241236
}
242237
}
238+
239+
impl error::Error for Error {}

0 commit comments

Comments
 (0)