File tree Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 58
58
unused_parens,
59
59
while_true
60
60
) ]
61
+ // TODO: once `tracing` bumps its MSRV to 1.42, remove this allow.
62
+ #![ allow( unused) ]
61
63
extern crate proc_macro;
62
64
63
65
use std:: collections:: HashSet ;
Original file line number Diff line number Diff line change @@ -413,13 +413,6 @@ impl fmt::Display for FromEnvError {
413
413
}
414
414
415
415
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
-
423
416
fn source ( & self ) -> Option < & ( dyn Error + ' static ) > {
424
417
match self . kind {
425
418
ErrorKind :: Parse ( ref p) => Some ( p) ,
Original file line number Diff line number Diff line change @@ -228,15 +228,12 @@ impl Error {
228
228
229
229
impl fmt:: Display for Error {
230
230
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 {
238
232
ErrorKind :: SubscriberGone => "subscriber no longer exists" ,
239
233
ErrorKind :: Poisoned => "lock poisoned" ,
240
- }
234
+ } ;
235
+ f. pad ( msg)
241
236
}
242
237
}
238
+
239
+ impl error:: Error for Error { }
You can’t perform that action at this time.
0 commit comments