Skip to content

Commit c46567b

Browse files
authored
refactor: use derive(Default) for Handler struct (#12431)
1 parent 5b33f67 commit c46567b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

crates/cli/src/handler.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,15 @@ use itertools::Itertools;
33
use std::{error::Error, fmt};
44

55
/// A custom context type for Foundry specific error reporting via `eyre`.
6+
#[derive(Default)]
67
pub struct Handler {
78
debug_handler: Option<Box<dyn EyreHandler>>,
89
}
910

10-
impl Default for Handler {
11-
fn default() -> Self {
12-
Self::new()
13-
}
14-
}
15-
1611
impl Handler {
1712
/// Create a new instance of the `Handler`.
1813
pub fn new() -> Self {
19-
Self { debug_handler: None }
14+
Self::default()
2015
}
2116

2217
/// Override the debug handler with a custom one.

0 commit comments

Comments
 (0)