From 7e65467aa45af8b44de75f4c3a364b9ac22e3eb8 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 20 Sep 2023 08:18:02 +0900 Subject: [PATCH] fix: replace std::task::ready with futures_util::ready --- .github/workflows/CI.yml | 2 +- Cargo.toml | 2 +- src/server/conn/auto.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 56917ea..4ea5535 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -87,7 +87,7 @@ jobs: cargo update cargo update -p log --precise 0.4.18 - - run: cargo check + - run: cargo check --features full miri: name: Test with Miri diff --git a/Cargo.toml b/Cargo.toml index ad1b618..9668057 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ pnet_datalink = "0.27.2" default = [] # Shorthand to enable everything -full = ["client", "server", "http1", "http2", "tcp", "runtime"] +full = ["client", "server", "http1", "http2", "tcp", "auto", "runtime"] client = ["hyper/client"] server = ["hyper/server"] diff --git a/src/server/conn/auto.rs b/src/server/conn/auto.rs index 042284a..11ac954 100644 --- a/src/server/conn/auto.rs +++ b/src/server/conn/auto.rs @@ -1,10 +1,11 @@ //! Http1 or Http2 connection. +use futures_util::ready; use std::future::Future; use std::io::{Error as IoError, ErrorKind, Result as IoResult}; use std::marker::PhantomPinned; use std::pin::Pin; -use std::task::{ready, Context, Poll}; +use std::task::{Context, Poll}; use std::{error::Error as StdError, marker::Unpin, time::Duration}; use bytes::Bytes;