Skip to content

Commit

Permalink
docs(proto): fix typos (#2876)
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng committed May 30, 2022
1 parent f8e2a83 commit 4545c3e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/io/rewind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
// TODO: There should be a way to do following two lines cleaner...
buf.put_slice(&prefix[..copy_len]);
prefix.advance(copy_len);
// Put back whats left
// Put back what's left
if !prefix.is_empty() {
self.pre = Some(prefix);
}
Expand Down
2 changes: 1 addition & 1 deletion src/proto/h1/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ where
}
}

// Fix keep-alives when Connection: keep-alive header is not present
// Fix keep-alive when Connection: keep-alive header is not present
fn fix_keep_alive(&mut self, head: &mut MessageHead<T::Outgoing>) {
let outgoing_is_keep_alive = head
.headers
Expand Down
2 changes: 1 addition & 1 deletion src/proto/h1/role.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ impl Http1Transaction for Client {
#[cfg(feature = "ffi")]
let reason = {
let reason = res.reason.unwrap();
// Only save the reason phrase if it isnt the canonical reason
// Only save the reason phrase if it isn't the canonical reason
if Some(reason) != status.canonical_reason() {
Some(Bytes::copy_from_slice(reason.as_bytes()))
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/proto/h2/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ where
#[cfg(feature = "runtime")]
keep_alive_timeout: config.keep_alive_timeout,
// If keep-alive is enabled for servers, always enabled while
// idle, so it can more aggresively close dead connections.
// idle, so it can more aggressively close dead connections.
#[cfg(feature = "runtime")]
keep_alive_while_idle: true,
};
Expand Down Expand Up @@ -264,7 +264,7 @@ where
let reason = err.h2_reason();
if reason == Reason::NO_ERROR {
// NO_ERROR is only used for graceful shutdowns...
trace!("interpretting NO_ERROR user error as graceful_shutdown");
trace!("interpreting NO_ERROR user error as graceful_shutdown");
self.conn.graceful_shutdown();
} else {
trace!("abruptly shutting down with {:?}", reason);
Expand Down

0 comments on commit 4545c3e

Please sign in to comment.