fix typos

This commit is contained in:
Alvaro Parker 2024-09-16 17:07:32 -03:00
commit 2ff89a9e42
16 changed files with 39 additions and 38 deletions

View file

@ -2,7 +2,7 @@
Thank you (again) for your interest in the project! Thank you (again) for your interest in the project!
## Talk to us before commiting to a change ## Talk to us before committing to a change
We recommend you come and talk to us in the channel and/or open an issue We recommend you come and talk to us in the channel and/or open an issue
before you start working on a feature, to **see if it aligns with our goals**. before you start working on a feature, to **see if it aligns with our goals**.

View file

@ -24,6 +24,7 @@ XXXX-YY-ZZ RELEASER <admin@example.com>
nothing so far uses it for anything but this message. We can always nothing so far uses it for anything but this message. We can always
change it again once any other specification allows e.g. presences or change it again once any other specification allows e.g. presences or
iqs. iqs.
- Module `jingle_thumnails` renamed to `jingle_thumbnails`.
* New parsers/serialisers: * New parsers/serialisers:
- Stream Features (RFC 6120) (!400) - Stream Features (RFC 6120) (!400)
- Extensible SASL Profile (XEP-0388) - Extensible SASL Profile (XEP-0388)

View file

@ -33,7 +33,7 @@ pub struct Thumbnail {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::jingle_thumnails::Thumbnail; use crate::jingle_thumbnails::Thumbnail;
use minidom::Element; use minidom::Element;
#[test] #[test]

View file

@ -196,7 +196,7 @@ pub mod jingle_s5b;
pub mod jingle_ibb; pub mod jingle_ibb;
/// XEP-0264: Jingle Content Thumbnails /// XEP-0264: Jingle Content Thumbnails
pub mod jingle_thumnails; pub mod jingle_thumbnails;
/// XEP-0280: Message Carbons /// XEP-0280: Message Carbons
pub mod carbons; pub mod carbons;

View file

@ -61,7 +61,7 @@ impl<S: ScramProvider> Scram<S> {
} }
/// Sets extension data to be inserted into the client's first message. /// Sets extension data to be inserted into the client's first message.
/// Extension data must be in the format of a comma seperated list of SCRAM extensions to be used e.g. `foo=true,bar=baz` /// Extension data must be in the format of a comma separated list of SCRAM extensions to be used e.g. `foo=true,bar=baz`
/// If not called, no extensions will be used for the clients first message. /// If not called, no extensions will be used for the clients first message.
pub fn with_first_extensions(mut self, extensions: String) -> Self { pub fn with_first_extensions(mut self, extensions: String) -> Self {
self.client_first_extensions = extensions; self.client_first_extensions = extensions;
@ -69,7 +69,7 @@ impl<S: ScramProvider> Scram<S> {
} }
/// Sets extension data to be inserted into the client's final message. /// Sets extension data to be inserted into the client's final message.
/// Extension data must be in the format of a comma seperated list of SCRAM extensions to be used e.g. `foo=true,bar=baz` /// Extension data must be in the format of a comma separated list of SCRAM extensions to be used e.g. `foo=true,bar=baz`
/// If not called, no extensions will be used for the clients final message. /// If not called, no extensions will be used for the clients final message.
pub fn with_final_extensions(mut self, extensions: String) -> Self { pub fn with_final_extensions(mut self, extensions: String) -> Self {
self.client_final_extensions = extensions; self.client_final_extensions = extensions;

View file

@ -32,7 +32,7 @@ use xmpp_parsers::ns::STREAM as XML_STREAM_NS;
/// Configuration for timeouts on an XML stream. /// Configuration for timeouts on an XML stream.
/// ///
/// The defaults are tuned toward common desktop/laptop use and may not hold /// The defaults are tuned toward common desktop/laptop use and may not hold
/// up to extreme conditions (arctic sattelite link, mobile internet on a /// up to extreme conditions (arctic satellite link, mobile internet on a
/// train in Brandenburg, Germany, and similar) and may be inefficient in /// train in Brandenburg, Germany, and similar) and may be inefficient in
/// other conditions (stable server link, localhost communication). /// other conditions (stable server link, localhost communication).
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]

View file

@ -338,7 +338,7 @@ impl ExtractDef {
// thing no matter whether the extracted field is of type // thing no matter whether the extracted field is of type
// `Option<T>` or `T`. // `Option<T>` or `T`.
// //
// And then, type inferrence does the rest: There is ambiguity // And then, type inference does the rest: There is ambiguity
// there, of course, if we call `.into()` on a value of type // there, of course, if we call `.into()` on a value of type
// `Option<T>`: Should Rust wrap it into another layer of // `Option<T>`: Should Rust wrap it into another layer of
// `Option`, or should it just move the value? The answer lies in // `Option`, or should it just move the value? The answer lies in

View file

@ -235,7 +235,7 @@ fn default_name(span: Span, name: Option<NameRef>, field_ident: Option<&Ident>)
/// `field_ident` is, for some field types, used to infer an XML name if /// `field_ident` is, for some field types, used to infer an XML name if
/// it is not specified explicitly. /// it is not specified explicitly.
/// ///
/// `field_ty` is needed for type inferrence on extracted fields. /// `field_ty` is needed for type inference on extracted fields.
/// ///
/// `container_namespace` is used in some cases to insert a default /// `container_namespace` is used in some cases to insert a default
/// namespace. /// namespace.

View file

@ -475,7 +475,7 @@ impl XmlCompoundMeta {
/// in case parsing the type path does then fail. /// in case parsing the type path does then fail.
fn maybe_type_path(p: parse::ParseStream<'_>) -> (bool, Option<Span>) { fn maybe_type_path(p: parse::ParseStream<'_>) -> (bool, Option<Span>) {
// ParseStream cursors do not advance the stream, but they are also rather // ParseStream cursors do not advance the stream, but they are also rather
// unwieldly to use. Prepare for a lot of `let .. = ..`. // unwieldy to use. Prepare for a lot of `let .. = ..`.
let cursor = if p.peek(token::PathSep) { let cursor = if p.peek(token::PathSep) {
// If we have a path separator, we need to skip that initially. We // If we have a path separator, we need to skip that initially. We

View file

@ -299,7 +299,7 @@ pub(crate) fn as_xml_text_fn(ty: Type) -> Expr {
} }
/// Construct a [`syn::Path`] referring to `::xso::TextCodec::<#for_ty>`, /// Construct a [`syn::Path`] referring to `::xso::TextCodec::<#for_ty>`,
/// returing the span of `for_ty` alongside it. /// returning the span of `for_ty` alongside it.
fn text_codec_of(for_ty: Type) -> (Span, Path) { fn text_codec_of(for_ty: Type) -> (Span, Path) {
let span = for_ty.span(); let span = for_ty.span();
( (

View file

@ -183,7 +183,7 @@ pub enum FromElementError {
/// Contains the original `Element` unmodified. /// Contains the original `Element` unmodified.
Mismatch(minidom::Element), Mismatch(minidom::Element),
/// During processing of the element, an (unrecoverable) error occured. /// During processing of the element, an (unrecoverable) error occurred.
Invalid(Error), Invalid(Error),
} }

View file

@ -199,7 +199,7 @@ Dynamic enum variants are completely independent of one another and thus use
the same meta structure as structs. See [Struct meta](#struct-meta) for the same meta structure as structs. See [Struct meta](#struct-meta) for
details. details.
The `builder`, `iterator` and `debug` keys cannot be used on dynmaic enum The `builder`, `iterator` and `debug` keys cannot be used on dynamic enum
variants. variants.
#### Example #### Example
@ -527,7 +527,7 @@ in regard of the specific serialisation of a field: it is possible to exchange
a nested child element for an attribute without changing the Rust interface a nested child element for an attribute without changing the Rust interface
of the struct. of the struct.
On the other hand, `extract` meta declarations can quickly become unwieldly On the other hand, `extract` meta declarations can quickly become unwieldy
and they may not support all configuration options which may in the future be and they may not support all configuration options which may in the future be
added on structs (such as configuring handling of undeclared attributes) and added on structs (such as configuring handling of undeclared attributes) and
they cannot be used for enumerations. they cannot be used for enumerations.

View file

@ -309,7 +309,7 @@ mod tests {
} }
#[test] #[test]
fn fallible_builder_missmatch_passthrough() { fn fallible_builder_mismatch_passthrough() {
match Result::<AlwaysMismatch, Error>::from_events(qname(), attrs()) { match Result::<AlwaysMismatch, Error>::from_events(qname(), attrs()) {
Err(FromEventsError::Mismatch { .. }) => (), Err(FromEventsError::Mismatch { .. }) => (),
other => panic!("unexpected result: {:?}", other), other => panic!("unexpected result: {:?}", other),

View file

@ -43,7 +43,7 @@ enum IntoEventsInner {
/// End of iteration: this state generates an end-of-iterator state. /// End of iteration: this state generates an end-of-iterator state.
/// ///
/// Note that the [`rxml::Event::EndElement`] event for the element itself /// Note that the [`rxml::Event::EndElement`] event for the element itself
/// is generated by the iterator alraedy in the `Nodes` state, when /// is generated by the iterator already in the `Nodes` state, when
/// `nested` is None and `remaining` returns `None` from its `next()` /// `nested` is None and `remaining` returns `None` from its `next()`
/// implementation. /// implementation.
Fin, Fin,

View file

@ -306,7 +306,7 @@ mod tests_minidom {
assert_eq!(items.len(), 1); assert_eq!(items.len(), 1);
match items[0] { match items[0] {
Item::XmlDeclaration(XmlVersion::V1_0) => (), Item::XmlDeclaration(XmlVersion::V1_0) => (),
ref other => panic!("unexected item in position 0: {:?}", other), ref other => panic!("unexpected item in position 0: {:?}", other),
}; };
} }
@ -327,15 +327,15 @@ mod tests_minidom {
assert_eq!(&**ns, Namespace::none()); assert_eq!(&**ns, Namespace::none());
assert_eq!(&**name, "elem"); assert_eq!(&**name, "elem");
} }
ref other => panic!("unexected item in position 0: {:?}", other), ref other => panic!("unexpected item in position 0: {:?}", other),
}; };
match items[1] { match items[1] {
Item::ElementHeadEnd => (), Item::ElementHeadEnd => (),
ref other => panic!("unexected item in position 1: {:?}", other), ref other => panic!("unexpected item in position 1: {:?}", other),
}; };
match items[2] { match items[2] {
Item::ElementFoot => (), Item::ElementFoot => (),
ref other => panic!("unexected item in position 2: {:?}", other), ref other => panic!("unexpected item in position 2: {:?}", other),
}; };
} }
@ -362,7 +362,7 @@ mod tests_minidom {
assert_eq!(&**ns, Namespace::none()); assert_eq!(&**ns, Namespace::none());
assert_eq!(&**name, "elem"); assert_eq!(&**name, "elem");
} }
ref other => panic!("unexected item in position 0: {:?}", other), ref other => panic!("unexpected item in position 0: {:?}", other),
}; };
match items[1] { match items[1] {
Item::Attribute(ref ns, ref name, ref value) => { Item::Attribute(ref ns, ref name, ref value) => {
@ -370,15 +370,15 @@ mod tests_minidom {
assert_eq!(&**name, "attr"); assert_eq!(&**name, "attr");
assert_eq!(&**value, "value"); assert_eq!(&**value, "value");
} }
ref other => panic!("unexected item in position 1: {:?}", other), ref other => panic!("unexpected item in position 1: {:?}", other),
}; };
match items[2] { match items[2] {
Item::ElementHeadEnd => (), Item::ElementHeadEnd => (),
ref other => panic!("unexected item in position 2: {:?}", other), ref other => panic!("unexpected item in position 2: {:?}", other),
}; };
match items[3] { match items[3] {
Item::ElementFoot => (), Item::ElementFoot => (),
ref other => panic!("unexected item in position 3: {:?}", other), ref other => panic!("unexpected item in position 3: {:?}", other),
}; };
} }
@ -400,21 +400,21 @@ mod tests_minidom {
assert_eq!(&**ns, Namespace::none()); assert_eq!(&**ns, Namespace::none());
assert_eq!(&**name, "elem"); assert_eq!(&**name, "elem");
} }
ref other => panic!("unexected item in position 0: {:?}", other), ref other => panic!("unexpected item in position 0: {:?}", other),
}; };
match items[1] { match items[1] {
Item::ElementHeadEnd => (), Item::ElementHeadEnd => (),
ref other => panic!("unexected item in position 1: {:?}", other), ref other => panic!("unexpected item in position 1: {:?}", other),
}; };
match items[2] { match items[2] {
Item::Text(ref value) => { Item::Text(ref value) => {
assert_eq!(value, "Hello World!"); assert_eq!(value, "Hello World!");
} }
ref other => panic!("unexected item in position 2: {:?}", other), ref other => panic!("unexpected item in position 2: {:?}", other),
}; };
match items[3] { match items[3] {
Item::ElementFoot => (), Item::ElementFoot => (),
ref other => panic!("unexected item in position 3: {:?}", other), ref other => panic!("unexpected item in position 3: {:?}", other),
}; };
} }
} }
@ -446,7 +446,7 @@ mod tests {
assert_eq!(events.len(), 1); assert_eq!(events.len(), 1);
match events[0] { match events[0] {
Event::XmlDeclaration(_, XmlVersion::V1_0) => (), Event::XmlDeclaration(_, XmlVersion::V1_0) => (),
ref other => panic!("unexected event in position 0: {:?}", other), ref other => panic!("unexpected event in position 0: {:?}", other),
}; };
} }
@ -465,11 +465,11 @@ mod tests {
assert_eq!(ns, Namespace::none()); assert_eq!(ns, Namespace::none());
assert_eq!(name, "elem"); assert_eq!(name, "elem");
} }
ref other => panic!("unexected event in position 0: {:?}", other), ref other => panic!("unexpected event in position 0: {:?}", other),
}; };
match events[1] { match events[1] {
Event::EndElement(_) => (), Event::EndElement(_) => (),
ref other => panic!("unexected event in position 1: {:?}", other), ref other => panic!("unexpected event in position 1: {:?}", other),
}; };
} }
@ -487,11 +487,11 @@ mod tests {
assert_eq!(ns, Namespace::none()); assert_eq!(ns, Namespace::none());
assert_eq!(name, "elem"); assert_eq!(name, "elem");
} }
ref other => panic!("unexected event in position 0: {:?}", other), ref other => panic!("unexpected event in position 0: {:?}", other),
}; };
match events[1] { match events[1] {
Event::EndElement(_) => (), Event::EndElement(_) => (),
ref other => panic!("unexected event in position 1: {:?}", other), ref other => panic!("unexpected event in position 1: {:?}", other),
}; };
} }
@ -511,17 +511,17 @@ mod tests {
assert_eq!(ns, Namespace::none()); assert_eq!(ns, Namespace::none());
assert_eq!(name, "elem"); assert_eq!(name, "elem");
} }
ref other => panic!("unexected event in position 0: {:?}", other), ref other => panic!("unexpected event in position 0: {:?}", other),
}; };
match events[1] { match events[1] {
Event::Text(_, ref value) => { Event::Text(_, ref value) => {
assert_eq!(value, "Hello World!"); assert_eq!(value, "Hello World!");
} }
ref other => panic!("unexected event in position 1: {:?}", other), ref other => panic!("unexpected event in position 1: {:?}", other),
}; };
match events[2] { match events[2] {
Event::EndElement(_) => (), Event::EndElement(_) => (),
ref other => panic!("unexected event in position 2: {:?}", other), ref other => panic!("unexpected event in position 2: {:?}", other),
}; };
} }
@ -549,11 +549,11 @@ mod tests {
Some("value") Some("value")
); );
} }
ref other => panic!("unexected event in position 0: {:?}", other), ref other => panic!("unexpected event in position 0: {:?}", other),
}; };
match events[1] { match events[1] {
Event::EndElement(_) => (), Event::EndElement(_) => (),
ref other => panic!("unexected event in position 2: {:?}", other), ref other => panic!("unexpected event in position 2: {:?}", other),
}; };
} }
} }

View file

@ -149,7 +149,7 @@ pub trait TextCodec<T> {
/// content by stripping it. /// content by stripping it.
// NOTE: The bound on T is needed because any given type A may implement // NOTE: The bound on T is needed because any given type A may implement
// TextCodec for any number of types. If we pass T down to the `Filtered` // TextCodec for any number of types. If we pass T down to the `Filtered`
// struct, rustc can do type inferrence on which `TextCodec` // struct, rustc can do type inference on which `TextCodec`
// implementation the `filtered` method is supposed to have been called // implementation the `filtered` method is supposed to have been called
// on. // on.
fn filtered<F: TextFilter>(self, filter: F) -> Filtered<F, Self, T> fn filtered<F: TextFilter>(self, filter: F) -> Filtered<F, Self, T>