Skip to content

Commit

Permalink
chore: run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 22, 2023
1 parent 48f6a1d commit 9a7ee49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 3 additions & 5 deletions crates/drainer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ pub async fn start_drainer(
));
jobs_picked += 1;
}
(stream_index, jobs_picked) = utils::increment_stream_index(
(stream_index, jobs_picked),
number_of_streams,
)
.await;
(stream_index, jobs_picked) =
utils::increment_stream_index((stream_index, jobs_picked), number_of_streams)
.await;
loop_interval.tick().await;
}
Ok(()) | Err(mpsc::error::TryRecvError::Disconnected) => {
Expand Down
5 changes: 1 addition & 4 deletions crates/drainer/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ pub fn parse_stream_entries<'a>(

// Here the output is in the format (stream_index, jobs_picked),
// similar to the first argument of the function
pub async fn increment_stream_index(
(index, jobs_picked): (u8, u8),
total_streams: u8,
) -> (u8, u8) {
pub async fn increment_stream_index((index, jobs_picked): (u8, u8), total_streams: u8) -> (u8, u8) {
if index == total_streams - 1 {
match jobs_picked {
0 => metrics::CYCLES_COMPLETED_UNSUCCESSFULLY.add(&metrics::CONTEXT, 1, &[]),
Expand Down

0 comments on commit 9a7ee49

Please sign in to comment.