Spelling fixes in comments (#508)

This commit is contained in:
Josh Soref
2021-02-25 11:59:18 -05:00
committed by GitHub
parent c1b411fc14
commit bcaaaf6dd9
9 changed files with 12 additions and 12 deletions

View File

@@ -55,7 +55,7 @@ enum Next<B> {
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
/// frame that big.

View File

@@ -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.
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")]
pub fn is_padded(&self) -> bool {
self.flags.is_padded()

View File

@@ -324,7 +324,7 @@ fn encode_str(val: &[u8], dst: &mut DstBuf<'_>) -> Result<(), EncoderError> {
// Write the string head
dst.get_mut()[idx] = 0x80 | huff_len as u8;
} else {
// Write the head to a placeholer
// Write the head to a placeholder
const PLACEHOLDER_LEN: usize = 8;
let mut buf = [0u8; PLACEHOLDER_LEN];

View File

@@ -126,7 +126,7 @@ pub use codec::{Codec, RecvError, SendError, UserError};
use std::task::Poll;
// TODO: Get rid of this trait once https://github.com/rust-lang/rust/pull/63512
// is stablized.
// is stabilized.
trait PollExt<T, E> {
/// Changes the success value of this `Poll` with the closure provided.
fn map_ok_<U, F>(self, f: F) -> Poll<Option<Result<U, E>>>

View File

@@ -18,7 +18,7 @@ use std::{cmp, fmt, mem};
/// 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
/// 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.
#[derive(Debug)]
pub(super) struct Prioritize {

View File

@@ -54,7 +54,7 @@ pub(super) struct Recv {
/// Refused StreamId, this represents a frame that must be sent out.
refused: Option<StreamId>,
/// If push promises are allowed to be recevied.
/// If push promises are allowed to be received.
is_push_enabled: bool,
}

View File

@@ -1059,7 +1059,7 @@ impl<B: Buf> SendResponse<B> {
///
/// # 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 {
crate::StreamId::from_internal(self.inner.stream_id())
}
@@ -1131,7 +1131,7 @@ impl<B: Buf> SendPushedResponse<B> {
///
/// # 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 {
self.inner.stream_id()
}

View File

@@ -708,7 +708,7 @@ async fn recv_too_big_headers() {
.await;
srv.send_frame(frames::headers(1).response(200).eos()).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
srv.recv_frame(frames::reset(3).refused()).await;
idle_ms(10).await;

View File

@@ -460,7 +460,7 @@ async fn send_rst_stream_allows_recv_data() {
srv.send_frame(frames::headers(1).response(200)).await;
srv.recv_frame(frames::reset(1).cancel()).await;
// 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]).eos()).await;
// make sure we automatically free the connection window
@@ -736,7 +736,7 @@ async fn rst_while_closing() {
h2_support::trace_init!();
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 srv = async move {