Skip to content

Commit 4037177

Browse files
committed
add Send+Sync as Formatter supertrait
1 parent 9c304a0 commit 4037177

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/formatting/formatter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ enum EngFixArgs {
6161
Prefix,
6262
}
6363

64-
pub trait Formatter: Debug {
64+
pub trait Formatter: Debug + Send + Sync {
6565
fn format(&self, val: &Value) -> Result<String>;
6666

6767
fn interval(&self) -> Option<Duration> {
6868
None
6969
}
7070
}
7171

72-
pub fn new_formatter(name: &str, args: &[String]) -> Result<Box<dyn Formatter + Send + Sync>> {
72+
pub fn new_formatter(name: &str, args: &[String]) -> Result<Box<dyn Formatter>> {
7373
match name {
7474
"str" => {
7575
let min_width: usize = match args.get(StrArgs::MinWidth as usize) {

src/formatting/template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub enum Token {
2121
Recursive(FormatTemplate),
2222
Var {
2323
name: String,
24-
formatter: Option<Box<dyn Formatter + Send + Sync>>,
24+
formatter: Option<Box<dyn Formatter>>,
2525
},
2626
}
2727

0 commit comments

Comments
 (0)