Fix a bunch of typos.

This commit is contained in:
Sergio Benitez 2023-03-23 14:40:42 -07:00
parent 66e2f9486b
commit 219a8a5468
23 changed files with 33 additions and 33 deletions

View File

@ -310,7 +310,7 @@
//! The list below includes all presently supported database adapters and their
//! corresponding [`Poolable`] type.
//!
// Note: Keep this table in sync with site/guite/6-state.md
// Note: Keep this table in sync with site/guide/6-state.md
//! | Kind | Driver | Version | `Poolable` Type | Feature |
//! |----------|-----------------------|-----------|--------------------------------|------------------------|
//! | Sqlite | [Diesel] | `2` | [`diesel::SqliteConnection`] | `diesel_sqlite_pool` |

View File

@ -259,7 +259,7 @@ fn sentinels_expr(route: &Route) -> TokenStream {
.map(|p| &p.ident)
.collect();
// Note: for a given route, we need to emit a valid graph of eligble
// Note: for a given route, we need to emit a valid graph of eligible
// sentinels. This means that we don't have broken links, where a child
// points to a parent that doesn't exist. The concern is that the
// `is_concrete()` filter will cause a break in the graph.
@ -268,7 +268,7 @@ fn sentinels_expr(route: &Route) -> TokenStream {
// 1. if `is_concrete()` returns `false` for a (valid) type, it returns
// false for all of its parents. we consider this an axiom; this is
// the point of `is_concrete()`. the type is filtered out, so the
// theorem vacously holds
// theorem vacuously holds
// 2. if `is_concrete()` returns `true`, for a type `T`, it either:
// * returns `false` for the parent. by 1) it will return false for
// _all_ parents of the type, so no node in the graph can consider,

View File

@ -1005,7 +1005,7 @@ pub fn derive_responder(input: TokenStream) -> TokenStream {
/// used. In the example above, the field `MyStruct::kind` is rendered with a
/// name of `type`.
///
/// The attribute can slso be applied to variants of C-like enums; it may only
/// The attribute can also be applied to variants of C-like enums; it may only
/// contain `value` and looks as follows:
///
/// ```rust

View File

@ -420,7 +420,7 @@ fn form_validate_error_return_correct_field_name() {
name: String,
check: bool,
// in the error context this is returned as "name" but should be "other"
// the problem is dependednt on an argument exsiting for evaluate_other
// the problem is dependent on an argument existing for evaluate_other
#[field(validate = evaluate_other(&self.check))]
other: String,
}

View File

@ -12,7 +12,7 @@ use crate::uncased::UncasedStr;
/// A reference to a string inside of a raw HTTP message.
///
/// A `RawStr` is an unsanitzed, unvalidated, and undecoded raw string from an
/// A `RawStr` is an unsanitized, unvalidated, and undecoded raw string from an
/// HTTP message. It exists to separate validated string inputs, represented by
/// the `String`, `&str`, and `Cow<str>` types, from unvalidated inputs,
/// represented by `&RawStr`.

View File

@ -34,7 +34,7 @@ use crate::uri::fmt::{UriDisplay, Part, Path, Query, Kind};
///
/// * When **nested named values** are written, typically by passing a value
/// to [`write_named_value()`] whose implementation of `UriDisplay` also
/// calls `write_named_vlaue()`, the nested names are joined by a `.`,
/// calls `write_named_value()`, the nested names are joined by a `.`,
/// written out followed by a `=`, followed by the value.
///
/// # Usage
@ -433,7 +433,7 @@ impl<'a> ValidRoutePrefix for Origin<'a> {
type Output = Self;
fn append(self, path: Cow<'static, str>, query: Option<Cow<'static, str>>) -> Self::Output {
// No-op if `self` is already normalzied.
// No-op if `self` is already normalized.
let mut prefix = self.into_normalized();
prefix.clear_query();
@ -454,7 +454,7 @@ impl<'a> ValidRoutePrefix for Absolute<'a> {
type Output = Self;
fn append(self, path: Cow<'static, str>, query: Option<Cow<'static, str>>) -> Self::Output {
// No-op if `self` is already normalzied.
// No-op if `self` is already normalized.
let mut prefix = self.into_normalized();
prefix.clear_query();

View File

@ -11,7 +11,7 @@ use crate::uri::error::{Error, TryFromUriError};
///
/// In Rocket, this type will rarely be used directly. Instead, you will
/// typically encounter URIs via the [`Origin`] type. This is because all
/// incoming requests accepred by Rocket contain URIs in origin-form.
/// incoming requests accepted by Rocket contain URIs in origin-form.
///
/// ## Parsing
///
@ -55,7 +55,7 @@ impl<'a> Uri<'a> {
/// [`Absolute`], or [`Reference`]. Parsing never allocates. Returns an
/// `Error` if `string` is not a valid URI of kind `T`.
///
/// To perform an ambgiuous parse into _any_ valid URI type, use
/// To perform an ambiguous parse into _any_ valid URI type, use
/// [`Uri::parse_any()`].
///
/// # Example
@ -89,7 +89,7 @@ impl<'a> Uri<'a> {
///
/// Always prefer to use `uri!()` for statically known inputs.
///
/// Because URI parsing is ambgious (that is, there isn't a one-to-one
/// Because URI parsing is ambiguous (that is, there isn't a one-to-one
/// mapping between strings and a URI type), the internal type returned by
/// this method _may_ not be the desired type. This method chooses the "best
/// fit" type for a given string by preferring to parse in the following

View File

@ -46,7 +46,7 @@ use crate::config::SecretKey;
/// * **Metadata**
///
/// This provider is named `Rocket Config`. It does not specify a
/// [`Source`](figment::Source) and uses default interpolatation.
/// [`Source`](figment::Source) and uses default interpolation.
///
/// * **Data**
///

View File

@ -100,7 +100,7 @@ impl<'r> DataStream<'r> {
/// A helper method to write the body of the request to any `AsyncWrite`
/// type. Returns an [`N`] which indicates how many bytes were written and
/// whether the entire stream was read. An additional read from `self` may
/// be required to check if all of the sream has been read. If that
/// be required to check if all of the stream has been read. If that
/// information is not needed, use [`DataStream::stream_precise_to()`].
///
/// This method is identical to `tokio::io::copy(&mut self, &mut writer)`

View File

@ -167,7 +167,7 @@ pub enum ErrorKind<'v> {
InvalidLength {
/// The minimum length required, inclusive.
min: Option<u64>,
/// The maximum length required, inclusize.
/// The maximum length required, inclusive.
max: Option<u64>,
},
/// The value wasn't one of the valid `choices`.
@ -210,7 +210,7 @@ pub enum ErrorKind<'v> {
Io(io::Error),
}
/// The erranous form entity or form component.
/// The erroneous form entity or form component.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Entity {
/// The form itself.

View File

@ -84,7 +84,7 @@ use crate::form::prelude::*;
/// The `data-form` limit specifies the data limit for an entire multipart form
/// data stream. It defaults to 2MiB. Multipart data is streamed, and form
/// fields are processed into [`DataField`]s or [`ValueField`]s as they arrive.
/// If the commulative data received while streaming exceeds the limit, parsing
/// If the commutative data received while streaming exceeds the limit, parsing
/// is aborted, an error is created and pushed via [`FromForm::push_error()`],
/// and the form is finalized.
///

View File

@ -485,7 +485,7 @@ use crate::http::uncased::AsUncased;
/// // Finally, we finalize `A` and `B`. If both returned `Ok` and we
/// // encountered no errors during the push phase, we return our pair. If
/// // there were errors, we return them. If `A` and/or `B` failed, we
/// // return the commulative errors.
/// // return the commutative errors.
/// fn finalize(mut ctxt: Self::Context) -> form::Result<'v, Self> {
/// match (A::finalize(ctxt.left), B::finalize(ctxt.right)) {
/// (Ok(l), Ok(r)) if ctxt.errors.is_empty() => Ok(Pair(l, r)),

View File

@ -41,7 +41,7 @@ use tokio::io::{AsyncRead, AsyncReadExt, AsyncSeek, AsyncSeekExt, ReadBuf};
///
/// ## Unsized
///
/// An unsized body's data is streamed as it arrives. In otherwords, as soon as
/// An unsized body's data is streamed as it arrives. In other words, as soon as
/// the body's [`AsyncRead`] implementation returns bytes, the bytes are written
/// to the network. Individual unsized bodies may use an internal buffer to
/// curtail writes to the network.

View File

@ -135,7 +135,7 @@ use crate::request::Request;
/// [`Response::build_from()`] and/or use the [`merge()`](Response::merge())
/// or [`join()`](Response::join()) methods on the `Response` or
/// `ResponseBuilder` struct. Ensure that you document merging or joining
/// behavior appropriatse.
/// behavior appropriately.
///
/// 3. Inspecting Requests
///

View File

@ -812,7 +812,7 @@ impl<'r> Response<'r> {
/// The default max chunk size is [`Body::DEFAULT_MAX_CHUNK`]. The max chunk
/// size is a property of the body and is thus reset whenever a body is set
/// via [`Response::set_streamed_body()`], [`Response::set_sized_body()`],
/// or the corresponding builer methods.
/// or the corresponding builder methods.
///
/// This setting does not typically need to be changed. Configuring a high
/// value can result in high memory usage. Similarly, configuring a low

View File

@ -224,7 +224,7 @@ crate::export! {
/// executes the block with the binding. `stream` must implement
/// `Stream<Item = T>`; the type of `x` is `T`.
///
/// * `?` short-cicuits stream termination on `Err`
/// * `?` short-circuits stream termination on `Err`
///
/// # Examples
///
@ -253,7 +253,7 @@ crate::export! {
/// # });
/// ```
///
/// Using `?` on an `Err` short-cicuits stream termination:
/// Using `?` on an `Err` short-circuits stream termination:
///
/// ```rust
/// use std::io;

View File

@ -279,7 +279,7 @@ impl Event {
///
/// // The two below are equivalent.
/// let event = Event::comment("bye").with_data("goodbye");
/// let event = Event::data("goodbyte").with_comment("bye");
/// let event = Event::data("goodbye").with_comment("bye");
/// ```
pub fn with_data<T: Into<Cow<'static, str>>>(mut self, data: T) -> Self {
self.data = Some(data.into());
@ -298,7 +298,7 @@ impl Event {
///
/// // The two below are equivalent.
/// let event = Event::comment("bye").with_data("goodbye");
/// let event = Event::data("goodbyte").with_comment("bye");
/// let event = Event::data("goodbye").with_comment("bye");
/// ```
pub fn with_comment<T: Into<Cow<'static, str>>>(mut self, data: T) -> Self {
self.comment = Some(data.into());

View File

@ -435,7 +435,7 @@ impl Rocket<Build> {
let type_name = std::any::type_name::<T>();
if !self.state.set(state) {
error!("state for type '{}' is already being managed", type_name);
panic!("aborting due to duplicately managed state");
panic!("aborting due to duplicated managed state");
}
self

View File

@ -61,7 +61,7 @@ pub struct RouteUri<'a> {
pub base: Origin<'a>,
/// The URI _without_ the `base` mount point.
pub unmounted_origin: Origin<'a>,
/// The URI _with_ the base mount point. This is the canoncical route URI.
/// The URI _with_ the base mount point. This is the canonical route URI.
pub origin: Origin<'a>,
/// Cached metadata about this URI.
pub(crate) metadata: Metadata,

View File

@ -383,7 +383,7 @@ mod tests {
}
#[test]
fn test_content_type_colliions() {
fn test_content_type_collisions() {
assert!(mt_mt_collide("application/json", "application/json"));
assert!(mt_mt_collide("*/json", "application/json"));
assert!(mt_mt_collide("*/*", "application/json"));
@ -417,7 +417,7 @@ mod tests {
}
#[test]
fn test_route_content_type_colliions() {
fn test_route_content_type_collisions() {
// non-payload bearing routes always collide
assert!(r_mt_mt_collide(Get, "application/json", "application/json"));
assert!(r_mt_mt_collide(Get, "*/json", "application/json"));

View File

@ -82,7 +82,7 @@ use crate::{Rocket, Ignite};
///
/// # Embedded Sentinels
///
/// Embedded types -- type parameters of already eligble types -- are also
/// Embedded types -- type parameters of already eligible types -- are also
/// eligible to be sentinels. Consider the following route:
///
/// ```rust
@ -102,7 +102,7 @@ use crate::{Rocket, Ignite};
/// * `Option<&State<String>>`
/// * `Either<Foo, Inner<Bar>>`
///
/// In addition, all embedded types are _also_ eligble. These are:
/// In addition, all embedded types are _also_ eligible. These are:
///
/// * `&State<String>`
/// * `State<String>`

View File

@ -117,7 +117,7 @@ impl Shield {
/// Enables the policy header `policy`.
///
/// If the poliicy was previously enabled, the configuration is replaced
/// If the policy was previously enabled, the configuration is replaced
/// with that of `policy`.
///
/// # Example

View File

@ -1595,7 +1595,7 @@ MyForm {
### Arbitrary Collections
_Any_ collection can be expressed with any level of arbitrary nesting, maps, and
sequences. Consider the extravagently contrived type:
sequences. Consider the extravagantly contrived type:
```rust
use std::collections::{BTreeMap, HashMap};