Skip to content

Commit 53f10de

Browse files
committed
style: apply cargo fmt to fix CI format check
1 parent bfd33d5 commit 53f10de

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/beat/backend.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ pub trait DistributedScheduler: Send {
7979
scheduled_tasks: &'a mut BinaryHeap<ScheduledTask>,
8080
) -> Pin<Box<dyn Future<Output = Result<(), BeatError>> + Send + 'a>>;
8181

82-
fn shutdown<'a>(&'a mut self) -> Pin<Box<dyn Future<Output = Result<(), BeatError>> + Send + 'a>> {
82+
fn shutdown<'a>(
83+
&'a mut self,
84+
) -> Pin<Box<dyn Future<Output = Result<(), BeatError>> + Send + 'a>> {
8385
Box::pin(async { Ok(()) })
8486
}
8587
}

src/beat/backend/redis.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,9 @@ impl DistributedScheduler for RedisSchedulerBackend {
516516
})
517517
}
518518

519-
fn shutdown<'a>(&'a mut self) -> Pin<Box<dyn Future<Output = Result<(), BeatError>> + Send + 'a>> {
519+
fn shutdown<'a>(
520+
&'a mut self,
521+
) -> Pin<Box<dyn Future<Output = Result<(), BeatError>> + Send + 'a>> {
520522
Box::pin(async move {
521523
if self.state.is_leader {
522524
if let Err(err) = self.release_lock().await {

src/beat/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ async fn test_beat_max_sleep_duration() {
235235
&mut self,
236236
_scheduled_tasks: &mut std::collections::BinaryHeap<ScheduledTask>,
237237
) -> Result<(), BeatError> {
238-
self.num_sync_calls.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
238+
self.num_sync_calls
239+
.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
239240
Ok(())
240241
}
241242
}

0 commit comments

Comments
 (0)