Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ironpeak committed Nov 3, 2024
1 parent 452aac5 commit 04816cb
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,14 @@ fn parse_time(expr: &Expr) -> Result<Duration> {
literal.base10_parse::<u64>()? * 60 * 60 * 24,
)),
"" => Ok(Duration::from_millis(literal.base10_parse::<u64>()?)),
suffix => {
return Err(syn::Error::new(
expr.span(),
format!("Unexpected a numeric literal suffix {}", suffix),
))
}
suffix => Err(syn::Error::new(
expr.span(),
format!("Unexpected a numeric literal suffix {}", suffix),
)),
},
_ => {
return Err(syn::Error::new(expr.span(), "Expected a numeric literal"));
}
_ => Err(syn::Error::new(expr.span(), "Expected a numeric literal")),
},
_ => {
return Err(syn::Error::new(expr.span(), "Expected a numeric literal"));
}
_ => Err(syn::Error::new(expr.span(), "Expected a numeric literal")),
}
}

Expand Down Expand Up @@ -99,7 +93,7 @@ fn slow_function_warning_common(time: Duration, stmt: Stmt, function: ItemFn) ->
vis: function.vis.clone(),
sig: function.sig.clone(),
block: Box::new(Block {
brace_token: function.block.brace_token.clone(),
brace_token: function.block.brace_token,
stmts: vec![],
}),
};
Expand Down

0 comments on commit 04816cb

Please sign in to comment.