Skip to content

Commit

Permalink
docs: Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored and BiagioFesta committed Oct 5, 2023
1 parent 2fa73af commit c23bf31
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Replace `FINGERPRINT` with the value obtained in *step 1*.
For example, `OjyqTe//WoGnvBrgiO37tkOQJyuN1r7hhyBzwX0gotg=`.

### 4. Connect to the Server
Open the website https://webtransport.day/ on Google Chrome instace. Use the *URL*: `https://localhost:4433`, and click on *Connect*.
Open the website https://webtransport.day/ on Google Chrome instance. Use the *URL*: `https://localhost:4433`, and click on *Connect*.

Enjoy!

Expand Down
8 changes: 4 additions & 4 deletions wtransport-proto/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl BytesWriter for Vec<u8> {

BufferWriter::new(&mut self[offset..])
.put_varint(varint)
.expect("Enough capacity prellocated");
.expect("Enough capacity pre-allocated");

Ok(())
}
Expand Down Expand Up @@ -328,7 +328,7 @@ pub mod r#async {
/// Generally, an implementation will perform a **copy**.
///
/// On success, it returns `Ok(num_bytes_read)`, that is the
/// lenght of bytes written into `buf`.
/// length of bytes written into `buf`.
///
/// It returns `0` if and only if:
/// * `buf` is empty; or
Expand Down Expand Up @@ -378,7 +378,7 @@ pub mod r#async {
/// * [`std::io::ErrorKind::ConnectionReset`] if the write operation was explicitly stopped
/// by the destination.
/// * [`std::io::ErrorKind::NotConnected`] if the write operation aborted at any point because
/// lack of communication with the destionation.
/// lack of communication with the destination.
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
Expand All @@ -403,7 +403,7 @@ pub mod r#async {
/// Reads an unsigned variable-length integer in network byte-order from a source.
fn get_varint(&mut self) -> GetVarint<Self>;

/// Reads the source until `buffer` is completly filled.
/// Reads the source until `buffer` is completely filled.
fn get_buffer<'a>(&'a mut self, buffer: &'a mut [u8]) -> GetBuffer<Self>;
}

Expand Down
2 changes: 1 addition & 1 deletion wtransport-proto/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ impl<'a> Frame<'a> {
///
/// It returns [`Err`] if the `bytes_writer` does not have enough capacity
/// to write the entire frame.
/// See [`Self::write_size`] to retrieve the extact amount of required capacity.
/// See [`Self::write_size`] to retrieve the exact amount of required capacity.
///
/// In case [`Err`], `bytes_writer` might be partially written.
///
Expand Down
2 changes: 1 addition & 1 deletion wtransport-proto/src/ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl QStreamId {
pub const fn into_session_id(self) -> SessionId {
let stream_id = self.into_stream_id();

// SAFETY: corresponding stream for qstream is bidirection and client-initiated
// SAFETY: corresponding stream for qstream is bidirectional and client-initiated
unsafe {
debug_assert!(stream_id.is_bidirectional() && stream_id.is_client_initiated());
SessionId::from_session_stream_unchecked(stream_id)
Expand Down
2 changes: 1 addition & 1 deletion wtransport-proto/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl Settings {
///
/// This function does *not* allocates memory. It uses `buffer` for frame-payload
/// serialization.
/// See [`Self::generate_frame`] for a versione with inner memory allocation.
/// See [`Self::generate_frame`] for a version with inner memory allocation.
pub fn generate_frame_ref<'a>(&self, buffer: &'a mut [u8]) -> Result<Frame<'a>, EndOfBuffer> {
let mut bytes_writer = BufferWriter::new(buffer);

Expand Down
2 changes: 1 addition & 1 deletion wtransport-proto/src/stream_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl StreamHeader {
///
/// It returns [`Err`] if the `bytes_writer` does not have enough capacity
/// to write the entire header.
/// See [`Self::write_size`] to retrieve the extact amount of required capacity.
/// See [`Self::write_size`] to retrieve the exact amount of required capacity.
///
/// In case [`Err`], `bytes_writer` might be partially written.
pub fn write<W>(&self, bytes_writer: &mut W) -> Result<(), EndOfBuffer>
Expand Down
4 changes: 2 additions & 2 deletions wtransport/src/driver/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ where

/// Sets the shared result in thread safe manner.
///
/// The first call will be able to actuall set the inner value,
/// successive calles end up into being no-op.
/// The first call will be able to actually set the inner value,
/// successive calls end up into being no-op.
///
/// Returns `true` if the inner result is actually set.
pub fn set(&self, result: T) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion wtransport/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use wtransport_proto::headers::Headers;
use wtransport_proto::session::SessionRequest as SessionRequestProto;
use wtransport_proto::session::SessionResponse as SessionResponseProto;

/// Helper structure for Endpoind types.
/// Helper structure for Endpoint types.
pub mod endpoint_side {
/// Type of endpoint accepting multiple WebTransport connections.
pub struct Server;
Expand Down

0 comments on commit c23bf31

Please sign in to comment.