Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos #1570

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions quinn-proto/src/connection/streams/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion quinn-udp/src/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion quinn-udp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions quinn-udp/src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion quinn-udp/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion quinn/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion quinn/src/recv_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions quinn/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down