Skip to content

Commit

Permalink
Check and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Feb 26, 2024
1 parent 8a94828 commit 50e692a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://github.com/crate-ci/typos
# install: cargo install typos-cli
# run: typos

[files]
extend-exclude = [".typos.toml", "docs/example_app.js"]


[default.extend-words]
3 changes: 3 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# This scripts runs various CI-like checks in a convenient way.
set -eux

cargo install --quiet typos-cli

typos
cargo check --quiet --workspace --all-targets
cargo check --quiet --workspace --all-targets --all-features
cargo check --quiet -p example_app --all-features --lib --target wasm32-unknown-unknown
Expand Down
2 changes: 1 addition & 1 deletion ewebsock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub fn ws_connect(url: String, options: Options, on_event: EventHandler) -> Resu
/// This is like [`ws_connect`], but it doesn't return a [`WsSender`],
/// so it can only receive messages, not send them.
///
/// This can be slightly more efficent when you don't need to send messages.
/// This can be slightly more efficient when you don't need to send messages.
///
/// # Errors
/// * On native: failure to spawn receiver thread.
Expand Down
4 changes: 2 additions & 2 deletions ewebsock/src/native_tungstenite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl WsSender {
}
}

/// Close the conenction.
/// Close the connection.
///
/// This is called automatically when the sender is dropped.
pub fn close(&mut self) -> Result<()> {
Expand Down Expand Up @@ -142,7 +142,7 @@ pub(crate) fn ws_connect_impl(

/// Connect and call the given event handler on each received event.
///
/// This is a blocking variant of [`ws_connect`], only availble on native.
/// This is a blocking variant of [`ws_connect`], only available on native.
///
/// # Errors
/// All errors are returned to the caller, and NOT reported via `on_event`.
Expand Down
2 changes: 1 addition & 1 deletion ewebsock/src/native_tungstenite_tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl WsSender {
}
}

/// Close the conenction.
/// Close the connection.
///
/// This is called automatically when the sender is dropped.
pub fn close(&mut self) -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion ewebsock/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl WsSender {
}
}

/// Close the conenction.
/// Close the connection.
///
/// This is called automatically when the sender is dropped.
pub fn close(&mut self) -> Result<()> {
Expand Down

0 comments on commit 50e692a

Please sign in to comment.