style: 💄 linting
This commit is contained in:
parent
89ad7be68b
commit
aed69c2a47
@ -21,9 +21,15 @@ async fn main() -> Result<()> {
|
||||
|
||||
let now = chrono::Local::now();
|
||||
|
||||
let handler = sched.schedule_fut("test-task", async move {
|
||||
println!("I'm running at {}", &now.format("%Y-%m-%d %H:%M:%S"));
|
||||
}, recur(ruleset().at_second(0))).await;
|
||||
let handler = sched
|
||||
.schedule_fut(
|
||||
"test-task",
|
||||
async move {
|
||||
println!("I'm running at {}", &now.format("%Y-%m-%d %H:%M:%S"));
|
||||
},
|
||||
recur(ruleset().at_second(0)),
|
||||
)
|
||||
.await;
|
||||
|
||||
sleep(std::time::Duration::from_secs(1)).await;
|
||||
|
||||
|
||||
@ -43,12 +43,9 @@ where
|
||||
value >= *start || value <= *end
|
||||
}
|
||||
} else if *start < *end {
|
||||
value >= *start
|
||||
&& value <= *end
|
||||
&& (value - *start) % *step == T::zero()
|
||||
value >= *start && value <= *end && (value - *start) % *step == T::zero()
|
||||
} else {
|
||||
(value >= *start || value <= *end)
|
||||
&& (*start - value) % *step == T::zero()
|
||||
(value >= *start || value <= *end) && (*start - value) % *step == T::zero()
|
||||
}
|
||||
}
|
||||
Rule::Many(matcher) => matcher.iter().any(|v| Self::_matches(&Rule::Val(*v), value)),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user