From 5cff79807b943baed8837f31d0e758995397c37f Mon Sep 17 00:00:00 2001 From: Kevin Mehall Date: Mon, 15 Jan 2024 11:26:19 -0700 Subject: [PATCH 1/2] ci: Check cargo fmt --- .github/workflows/rust.yml | 7 +++++++ 1 file changed, 7 insertions(+) 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: From d4c3a926c7ed6cc941a0c1ca54f06a60525b824a Mon Sep 17 00:00:00 2001 From: Kevin Mehall Date: Mon, 15 Jan 2024 11:28:44 -0700 Subject: [PATCH 2/2] Fix format --- src/transfer/queue.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)) }