Skip to content

Commit 983c853

Browse files
authored
Fixed some typos (#246)
1 parent ff0d9ca commit 983c853

File tree

14 files changed

+28
-28
lines changed

14 files changed

+28
-28
lines changed

docs/PROPOSAL.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This describes an effort to provide HTTP/3 support for the [hyper.rs](http://hyp
55

66
## 1. Goals
77

8-
What would be the goals of this effort, and what wouldnt be.
8+
What would be the goals of this effort, and what wouldn't be.
99

1010
- Provide a standalone HTTP/3 crate.
1111
- This is similar to what we did with `h2`. This allows folks that want more control over HTTP/3 specifically to be able to do so. Or people may wish to reduce their dependencies to the bare minimum, and thus don’t want to include crates supporting HTTP/1 and 2 (like `hyper` does).

examples/webtransport_server.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
139139
// WebTransportSession::accept(h3_conn).await.unwrap();
140140
// tracing::info!("Finished establishing webtransport session");
141141
// // 4. Get datagrams, bidirectional streams, and unidirectional streams and wait for client requests here.
142-
// // h3_conn needs to handover the datagrams, bidirectional streams, and unidirectional streams to the webtransport session.
142+
// // h3_conn needs to hand over the datagrams, bidirectional streams, and unidirectional streams to the webtransport session.
143143
// let result = handle.await;
144144
}
145145
Err(err) => {
@@ -175,7 +175,7 @@ async fn handle_connection(mut conn: Connection<h3_quinn::Connection, Bytes>) ->
175175
let session = WebTransportSession::accept(req, stream, conn).await?;
176176
tracing::info!("Established webtransport session");
177177
// 4. Get datagrams, bidirectional streams, and unidirectional streams and wait for client requests here.
178-
// h3_conn needs to handover the datagrams, bidirectional streams, and unidirectional streams to the webtransport session.
178+
// h3_conn needs to hand over the datagrams, bidirectional streams, and unidirectional streams to the webtransport session.
179179
handle_session_and_echo_all_inbound_messages(session).await?;
180180

181181
return Ok(());

h3/src/client/connection.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use super::stream::RequestStream;
3434
/// This struct is cloneable so multiple requests can be sent concurrently.
3535
///
3636
/// Existing instances are atomically counted internally, so whenever all of them have been
37-
/// dropped, the connection will be automatically closed whith HTTP/3 connection error code
37+
/// dropped, the connection will be automatically closed with HTTP/3 connection error code
3838
/// `HTTP_NO_ERROR = 0`.
3939
///
4040
/// # Examples
@@ -120,7 +120,7 @@ where
120120
T: quic::OpenStreams<B>,
121121
B: Buf,
122122
{
123-
/// Send a HTTP/3 request to the server
123+
/// Send an HTTP/3 request to the server
124124
pub async fn send_request(
125125
&mut self,
126126
req: http::Request<()>,
@@ -247,9 +247,9 @@ where
247247
/// Client connection driver
248248
///
249249
/// Maintains the internal state of an HTTP/3 connection, including control and QPACK.
250-
/// It needs to be polled continously via [`poll_close()`]. On connection closure, this
250+
/// It needs to be polled continuously via [`poll_close()`]. On connection closure, this
251251
/// will resolve to `Ok(())` if the peer sent `HTTP_NO_ERROR`, or `Err()` if a connection-level
252-
/// error occured.
252+
/// error occurred.
253253
///
254254
/// [`shutdown()`] initiates a graceful shutdown of this connection. After calling it, no request
255255
/// initiation will be further allowed. Then [`poll_close()`] will resolve when all ongoing requests
@@ -258,7 +258,7 @@ where
258258
///
259259
/// # Examples
260260
///
261-
/// ## Drive a connection concurrenty
261+
/// ## Drive a connection concurrently
262262
///
263263
/// ```rust
264264
/// # use bytes::Buf;
@@ -318,7 +318,7 @@ where
318318
/// Ok::<(), Box<dyn std::error::Error + Send + Sync>>(())
319319
/// });
320320
///
321-
/// // Do client things, wait for close contition...
321+
/// // Do client things, wait for close condition...
322322
///
323323
/// // Initiate shutdown
324324
/// shutdown_tx.send(2);

h3/src/connection.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ where
604604
Poll::Pending => return Poll::Pending,
605605
Poll::Ready(Err(_)) => {
606606
// could not create grease stream
607-
// dont try again
607+
// don't try again
608608
self.send_grease_stream_flag = false;
609609
warn!("grease stream creation failed with");
610610
return Poll::Ready(());
@@ -639,7 +639,7 @@ where
639639
Poll::Pending => return Poll::Pending,
640640
Poll::Ready(Err(_)) => {
641641
// could not write grease frame
642-
// dont try again
642+
// don't try again
643643
self.send_grease_stream_flag = false;
644644
warn!("write data on grease stream failed with");
645645
return Poll::Ready(());
@@ -666,7 +666,7 @@ where
666666
Poll::Pending => return Poll::Pending,
667667
Poll::Ready(Err(_)) => {
668668
// could not finish grease stream
669-
// dont try again
669+
// don't try again
670670
self.send_grease_stream_flag = false;
671671
warn!("finish grease stream failed with");
672672
return Poll::Ready(());
@@ -676,7 +676,7 @@ where
676676
};
677677

678678
// grease stream is closed
679-
// dont do another one
679+
// don't do another one
680680
self.send_grease_stream_flag = false;
681681
Poll::Ready(())
682682
}
@@ -897,7 +897,7 @@ where
897897
Ok(())
898898
}
899899

900-
/// Stops an stream with an error code
900+
/// Stops a stream with an error code
901901
pub fn stop_stream(&mut self, code: Code) {
902902
self.stream.reset(code.into());
903903
}

h3/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl Error {
233233
}
234234

235235
/// returns the [`ErrorLevel`] of an [`Error`]
236-
/// This indicates weather a accept loop should continue.
236+
/// This indicates weather an accept loop should continue.
237237
pub fn get_error_level(&self) -> ErrorLevel {
238238
match self.inner.kind {
239239
Kind::Application {

h3/src/proto/frame.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ impl fmt::Display for SettingsError {
559559
match self {
560560
SettingsError::Exceeded => write!(
561561
f,
562-
"max settings number exeeded, check for duplicate entries"
562+
"max settings number exceeded, check for duplicate entries"
563563
),
564564
SettingsError::Malformed => write!(f, "malformed settings frame"),
565565
SettingsError::Repeated(id) => write!(f, "got setting 0x{:x} twice", id.0),

h3/src/proto/headers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl Header {
9494

9595
Ok((
9696
self.pseudo.method.ok_or(HeaderError::MissingMethod)?,
97-
// When empty host field is built into a uri it fails
97+
// When empty host field is built into an uri it fails
9898
//= https://www.rfc-editor.org/rfc/rfc9114#section-4.3.1
9999
//# If these fields are present, they MUST NOT be
100100
//# empty.

h3/src/qpack/prefix_string/encode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl HuffmanEncoder {
4646
let forward =
4747
end_range.byte as usize - self.buffer.len() + if end_range.bit > 0 { 1 } else { 0 };
4848
for _ in 0..forward {
49-
// push filler value that will ends huffman decoding if not
49+
// push filler value that will end huffman decoding if not
5050
// modified
5151
self.buffer.push(255);
5252
}

h3/src/qpack/vas.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/*
88
* # Virtually infinite address space mapper.
99
*
10-
* It can be described as a infinitively growable list, with a visibility
10+
* It can be described as an infinitive growable list, with a visibility
1111
* window that can only move in the direction of insertion.
1212
*
1313
* Origin Visible window
@@ -34,7 +34,7 @@
3434
* pos: real index in memory container
3535
* pst: post-base relative index (only with base index)
3636
*
37-
* first oldest lastest
37+
* first oldest latest
3838
* element insertion insertion
3939
* (not available available
4040
* available) | |
@@ -52,7 +52,7 @@
5252
*
5353
* # Base index
5454
* A base index can arbitrary shift the relative index.
55-
* The base index itself is a absolute index.
55+
* The base index itself is an absolute index.
5656
*
5757
* base index: 17
5858
* |

h3/src/quic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub trait SendStream<B: Buf> {
134134

135135
/// Allows sending unframed pure bytes to a stream. Similar to [`AsyncWrite`](https://docs.rs/tokio/latest/tokio/io/trait.AsyncWrite.html)
136136
pub trait SendStreamUnframed<B: Buf>: SendStream<B> {
137-
/// Attempts write data into the stream.
137+
/// Attempts to write data into the stream.
138138
///
139139
/// Returns the number of bytes written.
140140
///
@@ -155,7 +155,7 @@ pub trait RecvStream {
155155

156156
/// Poll the stream for more data.
157157
///
158-
/// When the receive side will no longer receive more data (such as because
158+
/// When the receiving side will no longer receive more data (such as because
159159
/// the peer closed their sending side), this should return `None`.
160160
fn poll_data(
161161
&mut self,

h3/src/server/connection.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ where
148148
}
149149
}
150150

151-
/// Accepts an http request where the first frame has already been read and decoded.
151+
/// Accepts a http request where the first frame has already been read and decoded.
152152
///
153153
///
154154
/// This is needed as a bidirectional stream may be read as part of incoming webtransport

h3/src/server/request.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use super::stream::RequestStream;
99

1010
pub struct ResolveRequest<C: quic::Connection<B>, B: Buf> {
1111
request_stream: RequestStream<C::BidiStream, B>,
12-
// Ok or `REQUEST_HEADER_FIELDS_TO_LARGE` which neeeds to be sent
12+
// Ok or `REQUEST_HEADER_FIELDS_TO_LARGE` which needs to be sent
1313
decoded: Result<qpack::Decoded, u64>,
1414
max_field_section_size: u64,
1515
}

h3/src/tests/connection.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async fn server_drop_close() {
104104
}
105105

106106
// In this test the client calls send_data() without doing a finish(),
107-
// i.e client keeps the body stream open. And cient expects server to
107+
// i.e client keeps the body stream open. And client expects server to
108108
// read_data() and send a response
109109
#[tokio::test]
110110
async fn server_send_data_without_finish() {
@@ -385,7 +385,7 @@ async fn control_close_send_error() {
385385
//# error of type H3_CLOSED_CRITICAL_STREAM.
386386
control_stream.finish().unwrap(); // close the client control stream immediately
387387

388-
// create the Connection manually so it does not open a second Control stream
388+
// create the Connection manually, so it does not open a second Control stream
389389

390390
let connection_error = loop {
391391
let accepted = connection.accept_bi().await;

h3/src/tests/request.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ async fn get_timeout_client_recv_response() {
857857
let mut incoming_req = server::Connection::new(conn).await.unwrap();
858858

859859
// _req must not be dropped, else the connection will be closed and the timeout
860-
// wont be triggered
860+
// won't be triggered
861861
let _req = incoming_req.accept().await.expect("accept").unwrap();
862862
tokio::time::sleep(Duration::from_millis(500)).await;
863863
};

0 commit comments

Comments
 (0)