From 002c2803d4c59522505a4a3c649a4c9ce63884ff Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 13 May 2024 22:54:26 +0200 Subject: [PATCH] Fix typos across the codebase (thanks codespell!) --- parsers/src/data_forms.rs | 2 +- parsers/src/lib.rs | 2 +- parsers/src/message.rs | 2 +- parsers/src/ns.rs | 2 +- parsers/src/pubsub/pubsub.rs | 2 +- sasl/src/common/mod.rs | 2 +- tokio-xmpp/src/error.rs | 2 +- tokio-xmpp/src/xmpp_codec.rs | 2 +- xmpp/src/message/receive/chat.rs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parsers/src/data_forms.rs b/parsers/src/data_forms.rs index 8fa597e..d729a6b 100644 --- a/parsers/src/data_forms.rs +++ b/parsers/src/data_forms.rs @@ -125,7 +125,7 @@ impl Field { /// [XEP-0068](https://xmpp.org/extensions/xep-0068.html). /// /// This function requires knowledge of the form's type attribute as the - /// criteria differ slighly among form types. + /// criteria differ slightly among form types. pub fn is_form_type(&self, ty: &DataFormType) -> bool { // 1. A field must have the var FORM_TYPE if self.var != "FORM_TYPE" { diff --git a/parsers/src/lib.rs b/parsers/src/lib.rs index 094c098..db2993a 100644 --- a/parsers/src/lib.rs +++ b/parsers/src/lib.rs @@ -192,7 +192,7 @@ pub mod carbons; /// XEP-0293: Jingle RTP Feedback Negotiation pub mod jingle_rtcp_fb; -/// XEP-0294: Jingle RTP Header Extensions Negociation +/// XEP-0294: Jingle RTP Header Extensions Negotiation pub mod jingle_rtp_hdrext; /// XEP-0297: Stanza Forwarding diff --git a/parsers/src/message.rs b/parsers/src/message.rs index 16dbddf..992936f 100644 --- a/parsers/src/message.rs +++ b/parsers/src/message.rs @@ -209,7 +209,7 @@ impl Message { /// /// Returns the first matching payload element as parsed struct or its /// parse error. If no element matches, `Ok(None)` is returned. If an - /// element matches, but fails to parse, it is nontheless removed from + /// element matches, but fails to parse, it is nonetheless removed from /// the message. /// /// Elements which do not match the given type are not removed. diff --git a/parsers/src/ns.rs b/parsers/src/ns.rs index 48d1e10..03ff089 100644 --- a/parsers/src/ns.rs +++ b/parsers/src/ns.rs @@ -183,7 +183,7 @@ pub const CARBONS: &str = "urn:xmpp:carbons:2"; /// XEP-0293: Jingle RTP Feedback Negotiation pub const JINGLE_RTCP_FB: &str = "urn:xmpp:jingle:apps:rtp:rtcp-fb:0"; -/// XEP-0294: Jingle RTP Header Extensions Negociation +/// XEP-0294: Jingle RTP Header Extensions Negotiation pub const JINGLE_RTP_HDREXT: &str = "urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"; /// XEP-0297: Stanza Forwarding diff --git a/parsers/src/pubsub/pubsub.rs b/parsers/src/pubsub/pubsub.rs index ec90279..e326030 100644 --- a/parsers/src/pubsub/pubsub.rs +++ b/parsers/src/pubsub/pubsub.rs @@ -293,7 +293,7 @@ pub enum PubSub { configure: Option, }, - /// A subcribe request. + /// A subscribe request. Subscribe { /// The subscribe request. subscribe: Option, diff --git a/sasl/src/common/mod.rs b/sasl/src/common/mod.rs index dd6d854..ba83617 100644 --- a/sasl/src/common/mod.rs +++ b/sasl/src/common/mod.rs @@ -57,7 +57,7 @@ impl Credentials { self } - /// Creates a new Credentials with the specified chanel binding. + /// Creates a new Credentials with the specified channel binding. pub fn with_channel_binding(mut self, channel_binding: ChannelBinding) -> Credentials { self.channel_binding = channel_binding; self diff --git a/tokio-xmpp/src/error.rs b/tokio-xmpp/src/error.rs index d1c5b19..7cf8879 100644 --- a/tokio-xmpp/src/error.rs +++ b/tokio-xmpp/src/error.rs @@ -23,7 +23,7 @@ pub enum Error { Auth(AuthError), /// Connection closed Disconnected, - /// Shoud never happen + /// Should never happen InvalidState, /// Fmt error Fmt(fmt::Error), diff --git a/tokio-xmpp/src/xmpp_codec.rs b/tokio-xmpp/src/xmpp_codec.rs index ffc8501..1ac7e50 100644 --- a/tokio-xmpp/src/xmpp_codec.rs +++ b/tokio-xmpp/src/xmpp_codec.rs @@ -357,7 +357,7 @@ mod tests { }); } - /// By default, encode() only get's a BytesMut that has 8kb space reserved. + /// By default, encode() only gets a BytesMut that has 8 KiB space reserved. #[test] fn test_large_stanza() { use futures::{executor::block_on, sink::SinkExt}; diff --git a/xmpp/src/message/receive/chat.rs b/xmpp/src/message/receive/chat.rs index 2c2ffdd..e81f9a1 100644 --- a/xmpp/src/message/receive/chat.rs +++ b/xmpp/src/message/receive/chat.rs @@ -28,7 +28,7 @@ pub async fn handle_message_chat( let event = match from.clone().try_into_full() { Err(bare) => { // TODO: Can a service message be of type Chat/Normal and not Groupchat? - warn!("Received misformed MessageType::Chat in muc#user namespace from a bare JID."); + warn!("Received malformed MessageType::Chat in muc#user namespace from a bare JID."); Event::ServiceMessage( message.id.clone(), bare,