diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..484f2d5 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,14 @@ +kind: pipeline +name: default + +steps: +- name: build + image: rust + commands: + - cargo build --verbose --all + +- name: fmt-check + image: rust + commands: + - rustup component add rustfmt + - cargo fmt --all -- --check diff --git a/src/receiver.rs b/src/receiver.rs index c2a2adb..68d0cc7 100644 --- a/src/receiver.rs +++ b/src/receiver.rs @@ -247,7 +247,8 @@ where Event::Synchronized(_res) => self.context.synchronized.notify_waiters(), Event::Response(mid, resp) => { let prev_value = self.context.processing.fetch_sub(1, Ordering::SeqCst); - if prev_value == 1 { // last task completes + if prev_value == 1 { + // last task completes self.context.idle.notify_waiters(); } diff --git a/src/receivers/buffer_unordered_batched/mod.rs b/src/receivers/buffer_unordered_batched/mod.rs index a45f7cf..881c22c 100644 --- a/src/receivers/buffer_unordered_batched/mod.rs +++ b/src/receivers/buffer_unordered_batched/mod.rs @@ -75,14 +75,8 @@ macro_rules! buffer_unordered_batch_poller_macro { let buffer_clone = buffer.drain(..).collect(); #[allow(clippy::redundant_closure_call)] - let _ = ($st1)( - buffer_mid_clone, - buffer_clone, - bus, - ut, - task_permit, - stx, - ); + let _ = + ($st1)(buffer_mid_clone, buffer_clone, bus, ut, task_permit, stx); } } Request::Action(Action::Init(..)) => { @@ -100,14 +94,8 @@ macro_rules! buffer_unordered_batch_poller_macro { let task_permit = semaphore.clone().acquire_owned().await; #[allow(clippy::redundant_closure_call)] - let _ = ($st1)( - buffer_mid_clone, - buffer_clone, - bus, - ut, - task_permit, - stx, - ); + let _ = + ($st1)(buffer_mid_clone, buffer_clone, bus, ut, task_permit, stx); } let _ = semaphore.acquire_many(cfg.max_parallel as _).await;