This commit is contained in:
nora 2023-03-07 15:19:06 +01:00
parent 0b89e245d9
commit e1ebd97c91
73 changed files with 3822 additions and 3822 deletions

View file

@ -64,11 +64,11 @@ where
pub(crate) fn into_inner(self) -> (I, Bytes, D) {
loop {}
}
/// Run this dispatcher until HTTP says this connection is done,
/// but don't call `AsyncWrite::shutdown` on the underlying IO.
///
/// This is useful for old-style HTTP upgrades, but ignores
/// newer-style upgrade API.
pub(crate) fn poll_without_shutdown(
&mut self,
cx: &mut task::Context<'_>,
@ -133,8 +133,8 @@ where
loop {}
}
}
/// A drop guard to allow a mutable borrow of an Option while being able to
/// set whether the `Option` should be cleared on drop.
struct OptGuard<'a, T>(Pin<&'a mut Option<T>>, bool);
impl<'a, T> OptGuard<'a, T> {
fn new(pin: Pin<&'a mut Option<T>>) -> Self {