File tree 2 files changed +5
-10
lines changed
2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,16 @@ pub enum Nope {
14
14
15
15
impl fmt:: Display for Nope {
16
16
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
17
- f. write_str ( self . description ( ) )
18
- }
19
- }
20
-
21
- impl Error for Nope {
22
- fn description ( & self ) -> & str {
23
- match * self {
17
+ f. write_str ( match * self {
24
18
Nope :: ResourceNotFound => "Requested resource not found" ,
25
19
Nope :: CrateNotFound => "Requested crate not found" ,
26
20
Nope :: NoResults => "Search yielded no results" ,
27
- }
21
+ } )
28
22
}
29
23
}
30
24
25
+ impl Error for Nope { }
26
+
31
27
impl Handler for Nope {
32
28
fn handle ( & self , req : & mut Request ) -> IronResult < Response > {
33
29
match * self {
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ mod routes;
48
48
pub ( crate ) mod metrics;
49
49
50
50
use std:: { env, fmt} ;
51
- use std:: error:: Error ;
52
51
use std:: time:: Duration ;
53
52
use std:: path:: PathBuf ;
54
53
use std:: net:: SocketAddr ;
@@ -98,7 +97,7 @@ impl CratesfyiHandler {
98
97
99
98
// load templates
100
99
if let Err ( e) = hbse. reload ( ) {
101
- panic ! ( "Failed to load handlebar templates: {}" , e. description ( ) ) ;
100
+ panic ! ( "Failed to load handlebar templates: {}" , e) ;
102
101
}
103
102
104
103
let mut chain = Chain :: new ( base) ;
You can’t perform that action at this time.
0 commit comments