From 01e77e0ce65ff7ae5fde16f96734a065fe44a280 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Wed, 24 May 2023 00:54:56 +0200 Subject: [PATCH] Fix some typos --- quinn-proto/src/connection/mod.rs | 2 +- quinn-proto/src/connection/streams/state.rs | 4 ++-- quinn-udp/src/fallback.rs | 2 +- quinn-udp/src/lib.rs | 2 +- quinn-udp/src/unix.rs | 4 ++-- quinn-udp/src/windows.rs | 2 +- quinn/src/endpoint.rs | 2 +- quinn/src/recv_stream.rs | 2 +- quinn/src/tests.rs | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index b5e17063d..26df24fc4 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -2997,7 +2997,7 @@ impl Connection { let delay_micros = space.pending_acks.ack_delay().as_micros() as u64; - // TODO: This should come frome `TransportConfig` if that gets configurable + // TODO: This should come from `TransportConfig` if that gets configurable. let ack_delay_exp = TransportParameters::default().ack_delay_exponent; let delay = delay_micros >> ack_delay_exp.into_inner(); diff --git a/quinn-proto/src/connection/streams/state.rs b/quinn-proto/src/connection/streams/state.rs index 207778f00..07f6d199e 100644 --- a/quinn-proto/src/connection/streams/state.rs +++ b/quinn-proto/src/connection/streams/state.rs @@ -779,7 +779,7 @@ impl StreamsState { self.allocated_remote_count[dir as usize] } - /// Set the receive_window and returns wether the receive_window has been + /// Set the receive_window and returns whether the receive_window has been /// expanded or shrunk: true if expanded, false if shrunk. pub(crate) fn set_receive_window(&mut self, receive_window: VarInt) -> bool { let receive_window = receive_window.into(); @@ -842,7 +842,7 @@ impl StreamsState { // Only announce a window update if it's significant enough // to make it worthwhile sending a MAX_DATA frame. // We use a fraction of the configured connection receive window to make - // the decision, to accomodate for connection using bigger windows requring + // the decision, to accommodate for connection using bigger windows requiring // less updates. let diff = self.local_max_data - self.sent_max_data.into_inner(); ShouldTransmit(diff >= (self.receive_window / 8)) diff --git a/quinn-udp/src/fallback.rs b/quinn-udp/src/fallback.rs index 28e4cb3f4..f0303fe6b 100644 --- a/quinn-udp/src/fallback.rs +++ b/quinn-udp/src/fallback.rs @@ -53,7 +53,7 @@ impl UdpSocketState { return Err(e); } - // Other errors are ignored, since they will ususally be handled + // Other errors are ignored, since they will usually be handled // by higher level retransmits and timeouts. // - PermissionDenied errors have been observed due to iptable rules. // Those are not fatal errors, since the diff --git a/quinn-udp/src/lib.rs b/quinn-udp/src/lib.rs index a4bf3a79a..fcc4e6376 100644 --- a/quinn-udp/src/lib.rs +++ b/quinn-udp/src/lib.rs @@ -48,7 +48,7 @@ pub fn may_fragment() -> bool { /// Number of UDP packets to send/receive at a time pub const BATCH_SIZE: usize = imp::BATCH_SIZE; -/// The capabilities a UDP socket suppports on a certain platform +/// The capabilities a UDP socket supports on a certain platform #[derive(Debug)] pub struct UdpState { max_gso_segments: AtomicUsize, diff --git a/quinn-udp/src/unix.rs b/quinn-udp/src/unix.rs index b6f777f72..43d9f35d7 100644 --- a/quinn-udp/src/unix.rs +++ b/quinn-udp/src/unix.rs @@ -239,7 +239,7 @@ fn send( state.set_sendmsg_einval(); } - // Other errors are ignored, since they will ususally be handled + // Other errors are ignored, since they will usually be handled // by higher level retransmits and timeouts. // - PermissionDenied errors have been observed due to iptable rules. // Those are not fatal errors, since the @@ -293,7 +293,7 @@ fn send( io::ErrorKind::WouldBlock if sent != 0 => return Ok(sent), io::ErrorKind::WouldBlock => return Err(e), _ => { - // Other errors are ignored, since they will ususally be handled + // Other errors are ignored, since they will usually be handled // by higher level retransmits and timeouts. // - PermissionDenied errors have been observed due to iptable rules. // Those are not fatal errors, since the diff --git a/quinn-udp/src/windows.rs b/quinn-udp/src/windows.rs index 547a26b2c..939962ecc 100644 --- a/quinn-udp/src/windows.rs +++ b/quinn-udp/src/windows.rs @@ -104,7 +104,7 @@ impl UdpSocketState { return Err(e); } - // Other errors are ignored, since they will ususally be handled + // Other errors are ignored, since they will usually be handled // by higher level retransmits and timeouts. log_sendmsg_error(&self.last_send_error, e, transmit); sent += 1; diff --git a/quinn/src/endpoint.rs b/quinn/src/endpoint.rs index cba3a0181..9146bba0d 100644 --- a/quinn/src/endpoint.rs +++ b/quinn/src/endpoint.rs @@ -473,7 +473,7 @@ impl State { Poll::Ready(Ok(n)) => { self.outgoing.drain(..n); // We count transmits instead of `poll_send` calls since the cost - // of a `sendmmsg` still linearily increases with number of packets. + // of a `sendmmsg` still linearly increases with number of packets. self.send_limiter.record_work(n); } Poll::Pending => { diff --git a/quinn/src/recv_stream.rs b/quinn/src/recv_stream.rs index 3ef50162b..0738041c1 100644 --- a/quinn/src/recv_stream.rs +++ b/quinn/src/recv_stream.rs @@ -63,7 +63,7 @@ use crate::{ /// that indicates graceful receiver-initiated stream shutdown, rather than a true error condition. /// /// [`RecvStream::read_chunk`] could be used instead which does not take ownership and -/// allows using an explit call to [`RecvStream::stop`] with a custom error code. +/// allows using an explicit call to [`RecvStream::stop`] with a custom error code. /// /// [`ReadError`]: crate::ReadError /// [`stop()`]: RecvStream::stop diff --git a/quinn/src/tests.rs b/quinn/src/tests.rs index 7171c6783..e3041c668 100644 --- a/quinn/src/tests.rs +++ b/quinn/src/tests.rs @@ -390,8 +390,8 @@ fn stress_receive_window() { #[test] #[cfg(not(tarpaulin))] fn stress_stream_receive_window() { - // Note that there is no point in runnning this with too many streams, - // since the window is only active within a stream + // Note that there is no point in running this with too many streams, + // since the window is only active within a stream. run_echo(EchoArgs { client_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0), server_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 0),