Fix typos across the codebase (thanks codespell!)

This commit is contained in:
Emmanuel Gil Peyrot 2024-05-13 22:54:26 +02:00 committed by Jonas Schäfer
commit 002c2803d4
9 changed files with 9 additions and 9 deletions

View file

@ -125,7 +125,7 @@ impl Field {
/// [XEP-0068](https://xmpp.org/extensions/xep-0068.html). /// [XEP-0068](https://xmpp.org/extensions/xep-0068.html).
/// ///
/// This function requires knowledge of the form's type attribute as the /// 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 { pub fn is_form_type(&self, ty: &DataFormType) -> bool {
// 1. A field must have the var FORM_TYPE // 1. A field must have the var FORM_TYPE
if self.var != "FORM_TYPE" { if self.var != "FORM_TYPE" {

View file

@ -192,7 +192,7 @@ pub mod carbons;
/// XEP-0293: Jingle RTP Feedback Negotiation /// XEP-0293: Jingle RTP Feedback Negotiation
pub mod jingle_rtcp_fb; pub mod jingle_rtcp_fb;
/// XEP-0294: Jingle RTP Header Extensions Negociation /// XEP-0294: Jingle RTP Header Extensions Negotiation
pub mod jingle_rtp_hdrext; pub mod jingle_rtp_hdrext;
/// XEP-0297: Stanza Forwarding /// XEP-0297: Stanza Forwarding

View file

@ -209,7 +209,7 @@ impl Message {
/// ///
/// Returns the first matching payload element as parsed struct or its /// Returns the first matching payload element as parsed struct or its
/// parse error. If no element matches, `Ok(None)` is returned. If an /// 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. /// the message.
/// ///
/// Elements which do not match the given type are not removed. /// Elements which do not match the given type are not removed.

View file

@ -183,7 +183,7 @@ pub const CARBONS: &str = "urn:xmpp:carbons:2";
/// XEP-0293: Jingle RTP Feedback Negotiation /// XEP-0293: Jingle RTP Feedback Negotiation
pub const JINGLE_RTCP_FB: &str = "urn:xmpp:jingle:apps:rtp:rtcp-fb:0"; 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"; pub const JINGLE_RTP_HDREXT: &str = "urn:xmpp:jingle:apps:rtp:rtp-hdrext:0";
/// XEP-0297: Stanza Forwarding /// XEP-0297: Stanza Forwarding

View file

@ -293,7 +293,7 @@ pub enum PubSub {
configure: Option<Configure>, configure: Option<Configure>,
}, },
/// A subcribe request. /// A subscribe request.
Subscribe { Subscribe {
/// The subscribe request. /// The subscribe request.
subscribe: Option<Subscribe>, subscribe: Option<Subscribe>,

View file

@ -57,7 +57,7 @@ impl Credentials {
self 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 { pub fn with_channel_binding(mut self, channel_binding: ChannelBinding) -> Credentials {
self.channel_binding = channel_binding; self.channel_binding = channel_binding;
self self

View file

@ -23,7 +23,7 @@ pub enum Error {
Auth(AuthError), Auth(AuthError),
/// Connection closed /// Connection closed
Disconnected, Disconnected,
/// Shoud never happen /// Should never happen
InvalidState, InvalidState,
/// Fmt error /// Fmt error
Fmt(fmt::Error), Fmt(fmt::Error),

View file

@ -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] #[test]
fn test_large_stanza() { fn test_large_stanza() {
use futures::{executor::block_on, sink::SinkExt}; use futures::{executor::block_on, sink::SinkExt};

View file

@ -28,7 +28,7 @@ pub async fn handle_message_chat<C: ServerConnector>(
let event = match from.clone().try_into_full() { let event = match from.clone().try_into_full() {
Err(bare) => { Err(bare) => {
// TODO: Can a service message be of type Chat/Normal and not Groupchat? // 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( Event::ServiceMessage(
message.id.clone(), message.id.clone(),
bare, bare,