mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-01 20:07:39 +03:00
Deprecated std::task::ready re-export (#451)
This commit is contained in:
parent
8288fc0364
commit
a30147120d
6 changed files with 13 additions and 11 deletions
|
@ -18,7 +18,7 @@ path = "src/lib.rs"
|
|||
[dependencies]
|
||||
ntex-codec = "0.6"
|
||||
ntex-bytes = "0.1"
|
||||
ntex-util = "2.3"
|
||||
ntex-util = "2.5"
|
||||
ntex-service = "3"
|
||||
|
||||
bitflags = "2"
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
//! Framed transport dispatcher
|
||||
#![allow(clippy::let_underscore_future)]
|
||||
use std::{cell::Cell, future::Future, pin::Pin, rc::Rc, task::Context, task::Poll};
|
||||
use std::task::{ready, Context, Poll};
|
||||
use std::{cell::Cell, future::Future, pin::Pin, rc::Rc};
|
||||
|
||||
use ntex_codec::{Decoder, Encoder};
|
||||
use ntex_service::{IntoService, Pipeline, PipelineBinding, PipelineCall, Service};
|
||||
use ntex_util::{future::Either, ready, spawn, time::Seconds};
|
||||
use ntex_util::{future::Either, spawn, time::Seconds};
|
||||
|
||||
use crate::{Decoded, DispatchItem, IoBoxed, IoStatusUpdate, RecvError};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::task::{Context, Poll};
|
||||
use std::task::{ready, Context, Poll};
|
||||
use std::{any, cell::RefCell, cmp, future::poll_fn, io, mem, pin::Pin, rc::Rc, rc::Weak};
|
||||
|
||||
use ntex_bytes::{Buf, BufMut, BytesVec};
|
||||
|
@ -6,7 +6,7 @@ use ntex_io::{
|
|||
types, Filter, Handle, Io, IoBoxed, IoStream, ReadContext, WriteContext,
|
||||
WriteContextBuf,
|
||||
};
|
||||
use ntex_util::{ready, time::Millis};
|
||||
use ntex_util::time::Millis;
|
||||
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||
use tokio::net::TcpStream;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#![deny(rust_2018_idioms, unreachable_pub, missing_debug_implementations)]
|
||||
|
||||
#[doc(hidden)]
|
||||
#[deprecated]
|
||||
pub use std::task::ready;
|
||||
|
||||
pub mod channel;
|
||||
|
|
|
@ -102,10 +102,6 @@ impl CounterInner {
|
|||
|
||||
fn available(&self, cx: &mut task::Context<'_>) -> bool {
|
||||
self.task.register(cx.waker());
|
||||
if self.count.get() < self.capacity {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
self.count.get() < self.capacity
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,5 +118,9 @@ pub mod util {
|
|||
pub use ntex_bytes::{
|
||||
Buf, BufMut, ByteString, Bytes, BytesMut, BytesVec, Pool, PoolId, PoolRef,
|
||||
};
|
||||
pub use ntex_util::{future::*, ready, services::*, HashMap, HashSet};
|
||||
pub use ntex_util::{future::*, services::*, HashMap, HashSet};
|
||||
|
||||
#[doc(hidden)]
|
||||
#[deprecated]
|
||||
pub use std::task::ready;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue