From 4545c3ef191ce9b5f5d250ee27c4c96f9b71d2c6 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 30 May 2022 22:43:39 +0800 Subject: [PATCH] docs(proto): fix typos (#2876) --- src/common/io/rewind.rs | 2 +- src/proto/h1/conn.rs | 2 +- src/proto/h1/role.rs | 2 +- src/proto/h2/server.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/io/rewind.rs b/src/common/io/rewind.rs index 58f1de6c..0afef5f7 100644 --- a/src/common/io/rewind.rs +++ b/src/common/io/rewind.rs @@ -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); } diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs index 7d7c3fd2..37ab380f 100644 --- a/src/proto/h1/conn.rs +++ b/src/proto/h1/conn.rs @@ -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) { let outgoing_is_keep_alive = head .headers diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs index a5df16b0..76fc16d1 100644 --- a/src/proto/h1/role.rs +++ b/src/proto/h1/role.rs @@ -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 { diff --git a/src/proto/h2/server.rs b/src/proto/h2/server.rs index 88f4f884..d24e6bac 100644 --- a/src/proto/h2/server.rs +++ b/src/proto/h2/server.rs @@ -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, }; @@ -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);