Spelling fixes in comments (#508)
This commit is contained in:
@@ -55,7 +55,7 @@ enum Next<B> {
|
|||||||
Continuation(frame::Continuation),
|
Continuation(frame::Continuation),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialze the connection with this amount of write buffer.
|
/// Initialize the connection with this amount of write buffer.
|
||||||
///
|
///
|
||||||
/// The minimum MAX_FRAME_SIZE is 16kb, so always be able to send a HEADERS
|
/// The minimum MAX_FRAME_SIZE is 16kb, so always be able to send a HEADERS
|
||||||
/// frame that big.
|
/// frame that big.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ impl<T> Data<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the stream identifer that this frame is associated with.
|
/// Returns the stream identifier that this frame is associated with.
|
||||||
///
|
///
|
||||||
/// This cannot be a zero stream identifier.
|
/// This cannot be a zero stream identifier.
|
||||||
pub fn stream_id(&self) -> StreamId {
|
pub fn stream_id(&self) -> StreamId {
|
||||||
@@ -63,7 +63,7 @@ impl<T> Data<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns whther the `PADDED` flag is set on this frame.
|
/// Returns whether the `PADDED` flag is set on this frame.
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "unstable")]
|
||||||
pub fn is_padded(&self) -> bool {
|
pub fn is_padded(&self) -> bool {
|
||||||
self.flags.is_padded()
|
self.flags.is_padded()
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ fn encode_str(val: &[u8], dst: &mut DstBuf<'_>) -> Result<(), EncoderError> {
|
|||||||
// Write the string head
|
// Write the string head
|
||||||
dst.get_mut()[idx] = 0x80 | huff_len as u8;
|
dst.get_mut()[idx] = 0x80 | huff_len as u8;
|
||||||
} else {
|
} else {
|
||||||
// Write the head to a placeholer
|
// Write the head to a placeholder
|
||||||
const PLACEHOLDER_LEN: usize = 8;
|
const PLACEHOLDER_LEN: usize = 8;
|
||||||
let mut buf = [0u8; PLACEHOLDER_LEN];
|
let mut buf = [0u8; PLACEHOLDER_LEN];
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ pub use codec::{Codec, RecvError, SendError, UserError};
|
|||||||
use std::task::Poll;
|
use std::task::Poll;
|
||||||
|
|
||||||
// TODO: Get rid of this trait once https://github.com/rust-lang/rust/pull/63512
|
// TODO: Get rid of this trait once https://github.com/rust-lang/rust/pull/63512
|
||||||
// is stablized.
|
// is stabilized.
|
||||||
trait PollExt<T, E> {
|
trait PollExt<T, E> {
|
||||||
/// Changes the success value of this `Poll` with the closure provided.
|
/// Changes the success value of this `Poll` with the closure provided.
|
||||||
fn map_ok_<U, F>(self, f: F) -> Poll<Option<Result<U, E>>>
|
fn map_ok_<U, F>(self, f: F) -> Poll<Option<Result<U, E>>>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use std::{cmp, fmt, mem};
|
|||||||
/// This is because "idle" stream IDs – those which have been initiated but
|
/// This is because "idle" stream IDs – those which have been initiated but
|
||||||
/// have yet to receive frames – will be implicitly closed on receipt of a
|
/// have yet to receive frames – will be implicitly closed on receipt of a
|
||||||
/// frame on a higher stream ID. If these queues was not ordered by stream
|
/// frame on a higher stream ID. If these queues was not ordered by stream
|
||||||
/// IDs, some mechanism would be necessary to ensure that the lowest-numberedh]
|
/// IDs, some mechanism would be necessary to ensure that the lowest-numbered]
|
||||||
/// idle stream is opened first.
|
/// idle stream is opened first.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(super) struct Prioritize {
|
pub(super) struct Prioritize {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ pub(super) struct Recv {
|
|||||||
/// Refused StreamId, this represents a frame that must be sent out.
|
/// Refused StreamId, this represents a frame that must be sent out.
|
||||||
refused: Option<StreamId>,
|
refused: Option<StreamId>,
|
||||||
|
|
||||||
/// If push promises are allowed to be recevied.
|
/// If push promises are allowed to be received.
|
||||||
is_push_enabled: bool,
|
is_push_enabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1059,7 +1059,7 @@ impl<B: Buf> SendResponse<B> {
|
|||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// If the lock on the strean store has been poisoned.
|
/// If the lock on the stream store has been poisoned.
|
||||||
pub fn stream_id(&self) -> crate::StreamId {
|
pub fn stream_id(&self) -> crate::StreamId {
|
||||||
crate::StreamId::from_internal(self.inner.stream_id())
|
crate::StreamId::from_internal(self.inner.stream_id())
|
||||||
}
|
}
|
||||||
@@ -1131,7 +1131,7 @@ impl<B: Buf> SendPushedResponse<B> {
|
|||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// If the lock on the strean store has been poisoned.
|
/// If the lock on the stream store has been poisoned.
|
||||||
pub fn stream_id(&self) -> crate::StreamId {
|
pub fn stream_id(&self) -> crate::StreamId {
|
||||||
self.inner.stream_id()
|
self.inner.stream_id()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ async fn recv_too_big_headers() {
|
|||||||
.await;
|
.await;
|
||||||
srv.send_frame(frames::headers(1).response(200).eos()).await;
|
srv.send_frame(frames::headers(1).response(200).eos()).await;
|
||||||
srv.send_frame(frames::headers(3).response(200)).await;
|
srv.send_frame(frames::headers(3).response(200)).await;
|
||||||
// no reset for 1, since it's closed anyways
|
// no reset for 1, since it's closed anyway
|
||||||
// but reset for 3, since server hasn't closed stream
|
// but reset for 3, since server hasn't closed stream
|
||||||
srv.recv_frame(frames::reset(3).refused()).await;
|
srv.recv_frame(frames::reset(3).refused()).await;
|
||||||
idle_ms(10).await;
|
idle_ms(10).await;
|
||||||
|
|||||||
@@ -460,7 +460,7 @@ async fn send_rst_stream_allows_recv_data() {
|
|||||||
srv.send_frame(frames::headers(1).response(200)).await;
|
srv.send_frame(frames::headers(1).response(200)).await;
|
||||||
srv.recv_frame(frames::reset(1).cancel()).await;
|
srv.recv_frame(frames::reset(1).cancel()).await;
|
||||||
// sending frames after canceled!
|
// sending frames after canceled!
|
||||||
// note: sending 2 to cosume 50% of connection window
|
// note: sending 2 to consume 50% of connection window
|
||||||
srv.send_frame(frames::data(1, vec![0; 16_384])).await;
|
srv.send_frame(frames::data(1, vec![0; 16_384])).await;
|
||||||
srv.send_frame(frames::data(1, vec![0; 16_384]).eos()).await;
|
srv.send_frame(frames::data(1, vec![0; 16_384]).eos()).await;
|
||||||
// make sure we automatically free the connection window
|
// make sure we automatically free the connection window
|
||||||
@@ -736,7 +736,7 @@ async fn rst_while_closing() {
|
|||||||
h2_support::trace_init!();
|
h2_support::trace_init!();
|
||||||
let (io, mut srv) = mock::new();
|
let (io, mut srv) = mock::new();
|
||||||
|
|
||||||
// Rendevous when we've queued a trailers frame
|
// Rendezvous when we've queued a trailers frame
|
||||||
let (tx, rx) = oneshot::channel();
|
let (tx, rx) = oneshot::channel();
|
||||||
|
|
||||||
let srv = async move {
|
let srv = async move {
|
||||||
|
|||||||
Reference in New Issue
Block a user