diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..939a942 --- /dev/null +++ b/.typos.toml @@ -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] diff --git a/check.sh b/check.sh index b399356..4b10628 100755 --- a/check.sh +++ b/check.sh @@ -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 diff --git a/ewebsock/src/lib.rs b/ewebsock/src/lib.rs index 5917b8a..ae588eb 100644 --- a/ewebsock/src/lib.rs +++ b/ewebsock/src/lib.rs @@ -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. diff --git a/ewebsock/src/native_tungstenite.rs b/ewebsock/src/native_tungstenite.rs index 66821f2..e2e38cb 100644 --- a/ewebsock/src/native_tungstenite.rs +++ b/ewebsock/src/native_tungstenite.rs @@ -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<()> { @@ -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`. diff --git a/ewebsock/src/native_tungstenite_tokio.rs b/ewebsock/src/native_tungstenite_tokio.rs index 88386e0..63906f7 100644 --- a/ewebsock/src/native_tungstenite_tokio.rs +++ b/ewebsock/src/native_tungstenite_tokio.rs @@ -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<()> { diff --git a/ewebsock/src/web.rs b/ewebsock/src/web.rs index f9dacfb..ae9a81b 100644 --- a/ewebsock/src/web.rs +++ b/ewebsock/src/web.rs @@ -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<()> {