diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 212f97a..fe5b14e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,6 +10,13 @@ env: CARGO_TERM_COLOR: always jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Cargo Fmt + run: cargo fmt --all -- --check + build: strategy: matrix: diff --git a/src/transfer/queue.rs b/src/transfer/queue.rs index 6e6f177..1a03a27 100644 --- a/src/transfer/queue.rs +++ b/src/transfer/queue.rs @@ -2,7 +2,8 @@ use std::{ collections::VecDeque, future::{poll_fn, Future}, marker::PhantomData, - sync::Arc, task::{Context, Poll}, + sync::Arc, + task::{Context, Poll}, }; use crate::platform; @@ -164,7 +165,9 @@ where /// side effects, enabling its use in `select!{}` or similar. /// /// Panics if there are no transfers pending. - pub fn next_complete<'a>(&'a mut self) -> impl Future> + Unpin + Send + Sync + 'a { + pub fn next_complete<'a>( + &'a mut self, + ) -> impl Future> + Unpin + Send + Sync + 'a { poll_fn(|cx| self.poll_next(cx)) }