1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-26 15:07:43 +02:00

Rustls v0.21 support (#480)

This commit is contained in:
Rob Ede
2023-08-26 14:59:51 +01:00
committed by GitHub
parent 6ce8307060
commit 0bc310a656
19 changed files with 504 additions and 75 deletions

View File

@ -29,7 +29,7 @@ impl Counter {
/// Returns true if counter is below capacity. Otherwise, register to wake task when it is.
#[inline]
pub fn available(&self, cx: &mut task::Context<'_>) -> bool {
pub fn available(&self, cx: &task::Context<'_>) -> bool {
self.0.available(cx)
}
@ -59,7 +59,7 @@ impl CounterInner {
}
}
fn available(&self, cx: &mut task::Context<'_>) -> bool {
fn available(&self, cx: &task::Context<'_>) -> bool {
if self.count.get() < self.capacity {
true
} else {

View File

@ -62,6 +62,7 @@ where
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
// SAFETY: we are not moving out of the pinned field
// see https://github.com/rust-lang/rust/pull/102737
#[allow(clippy::needless_borrow)]
(unsafe { &mut self.get_unchecked_mut().f })(cx)
}
}