Merge pull request #31 from kevinmehall/fmt

ci: Check cargo fmt
This commit is contained in:
Kevin Mehall 2024-01-15 11:32:07 -07:00 committed by GitHub
commit ffdc32f631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -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:

View file

@ -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<Output = Completion<R::Response>> + Unpin + Send + Sync + 'a {
pub fn next_complete<'a>(
&'a mut self,
) -> impl Future<Output = Completion<R::Response>> + Unpin + Send + Sync + 'a {
poll_fn(|cx| self.poll_next(cx))
}