优化task代码细节
This commit is contained in:
parent
462f3c10f7
commit
29f9dea317
@ -44,7 +44,7 @@ impl Parse for TaskArgs {
|
||||
"interval" => {
|
||||
if let Expr::Lit(ExprLit{ lit, .. }) = meta.value {
|
||||
if let Lit::Int(value) = lit {
|
||||
task_args.interval = value.base10_parse().unwrap();
|
||||
task_args.interval = value.base10_parse()?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user