Fix typos throughout codebase.

This commit is contained in:
Sergio Benitez 2021-06-07 15:59:40 -07:00
parent cad5494d42
commit 0aa9a11ca4
15 changed files with 27 additions and 27 deletions

View File

@ -150,7 +150,7 @@
## Core
* Replaced use of `FnBox` with `Box<dyn FnOnce>`.
* Removed the stablized feature gates `try_from` and `transpose_result`.
* Removed the stable feature gates `try_from` and `transpose_result`.
* Derive macros are reexported alongside their respective traits.
* Minimum required `rustc` is `1.35.0-nightly (2019-04-05)`.
@ -903,7 +903,7 @@ This release includes the following new features:
* `&Route` is now a request guard.
* The base mount path of a [`Route`] can be retrieved via `Route::base` or
`Route::base()`.
* [`Cookies`] supports _private_ (authenticated encryption) cookies, encryped
* [`Cookies`] supports _private_ (authenticated encryption) cookies, encrypted
with the `secret_key` config key.
* `Config::{development, staging, production}` constructors were added for
[`Config`].
@ -1062,7 +1062,7 @@ applications.
* **[`ContentType::from_extension()`] returns an `Option<ContentType>`.**
For the old behvavior, use `.unwrap_or(ContentType::Any)`.
For the old behavior, use `.unwrap_or(ContentType::Any)`.
* **The `IntoValue` config trait was removed in favor of `Into<Value>`.**
@ -1095,7 +1095,7 @@ applications.
In addition to new features, Rocket saw the following improvements:
* "Rocket" is now capatilized in the `Server` HTTP header.
* "Rocket" is now capitalized in the `Server` HTTP header.
* The generic parameter of `rocket_contrib::Json` defaults to `json::Value`.
* The trailing '...' in the launch message was removed.
* The launch message prints regardless of the config environment.
@ -1475,7 +1475,7 @@ now implements its own `Request` and `Response` types.
* `ContentType` uses associated constants instead of static methods.
* `StatusCode` removed in favor of new `Status` type.
* `Response` type alias superceded by `Response` type.
* `Response` type alias superseded by `Response` type.
* `Responder::respond` no longer takes in hyper type.
* `Responder::respond` returns `Response`, takes `self` by move.
* `Handler` returns `Outcome` instead of `Response` type alias.

View File

@ -49,7 +49,7 @@
//!
//! Templates that are _not_ discovered by Rocket, such as those registered
//! directly via [`Template::custom()`], are _not_ renamed. Use the name with
//! which the template was orginally registered.
//! which the template was originally registered.
//!
//! ## Content Type
//!

View File

@ -383,7 +383,7 @@ pub fn async_test(args: TokenStream, input: TokenStream) -> TokenStream {
/// Retrofits `async fn` support in `main` functions.
///
/// A `main` `async fn` function decorated with `#[rocket::main]` is transformed
/// into a regular `main` function that internally initalizes a Rocket-specific
/// into a regular `main` function that internally initializes a Rocket-specific
/// tokio runtime and runs the attributed `async fn` inside of it:
///
/// ```rust,no_run

View File

@ -776,7 +776,7 @@ fn test_defaults() {
let form2: Option<FormWithDefaults> = strict(&form_string).ok();
assert!(form2.is_none());
// Ensure actual form field values take precendence.
// Ensure actual form field values take precedence.
let form_string = &["field1=101", "field2=102", "field3=true", "field5=true"].join("&");
let form3: Option<FormWithDefaults> = lenient(&form_string).ok();
assert_eq!(form3, Some(FormWithDefaults {
@ -830,7 +830,7 @@ fn test_lazy_default() {
missing3: usize,
}
// Ensure actual form field values take precendence.
// Ensure actual form field values take precedence.
let form_string = &["a=100", "b=300"].join("&");
let form3: Option<MyForm> = lenient(&form_string).ok();
assert_eq!(form3, Some(MyForm {

View File

@ -13,7 +13,7 @@ pub type BoxFuture<'r, T = Result<'r>> = futures::future::BoxFuture<'r, T>;
///
/// This trait is exactly like a [`Route`](crate::Route)'s
/// [`Handler`](crate::route::Handler) except it handles errors instead of
/// requests. Thus, the documentaiton for
/// requests. Thus, the documentation for
/// [`route::Handler`](crate::route::Handler) applies to this trait as well. We
/// defer to it for full details.
///

View File

@ -213,7 +213,7 @@ impl Drop for Error {
panic!("aborting due to fairing failure(s)");
}
ErrorKind::Runtime(ref err) => {
error!("An error occured in the runtime:");
error!("An error occurred in the runtime:");
info_!("{}", err);
panic!("aborting due to runtime failure");
}

View File

@ -139,7 +139,7 @@ enum State {
Mercy(Pin<Box<Sleep>>),
/// We failed to shutdown and are force-closing the connection.
Terminated,
/// We successfuly shutdown the connection.
/// We successfully shutdown the connection.
Inactive,
}

View File

@ -114,7 +114,7 @@ impl<'v> Context<'v> {
/// `name`.
///
/// The type of `name` may be `&Name`, `&str`, or `&RawStr`. Lookup is
/// case-sensitive but key-seperator (`.` or `[]`) insensitive.
/// case-sensitive but key-separator (`.` or `[]`) insensitive.
///
/// # Example
///
@ -137,7 +137,7 @@ impl<'v> Context<'v> {
/// `name`.
///
/// The type of `name` may be `&Name`, `&str`, or `&RawStr`. Lookup is
/// case-sensitive but key-seperator (`.` or `[]`) insensitive.
/// case-sensitive but key-separator (`.` or `[]`) insensitive.
///
/// # Example
///
@ -202,7 +202,7 @@ impl<'v> Context<'v> {
/// their children: `a.b`'s errors apply to `a.b.c`, `a.b.d` and so on but
/// not `a.c`.
///
/// Lookup is case-sensitive but key-seperator (`.` or `[]`) insensitive.
/// Lookup is case-sensitive but key-separator (`.` or `[]`) insensitive.
///
/// # Example
///
@ -250,7 +250,7 @@ impl<'v> Context<'v> {
/// errors associated with its chilren. Use [`Context::field_errors()`] in
/// almost all cases.
///
/// Lookup is case-sensitive but key-seperator (`.` or `[]`) insensitive.
/// Lookup is case-sensitive but key-separator (`.` or `[]`) insensitive.
///
/// # Example
///

View File

@ -31,7 +31,7 @@ use crate::data::ByteUnit;
/// let errors_for_foo = errors.iter().filter(|e| e.is_for("foo.bar"));
/// ```
///
/// ## Contructing
/// ## Contracting
///
/// An `Errors` can be constructed from anything that an `Error` can be
/// constructed from. This includes [`Error`], [`ErrorKind`], and all of the
@ -72,7 +72,7 @@ pub struct Errors<'v>(Vec<Error<'v>>);
/// [`FromFormField`]: crate::form::FromFormField
/// [`validate`]: crate::form::validate
///
/// # Contructing
/// # Contracting
///
/// An `Error` can be constructed via [`Error::validation()`],
/// [`Error::custom()`], or anything that an [`ErrorKind`] can be constructed
@ -103,7 +103,7 @@ pub struct Errors<'v>(Vec<Error<'v>>);
/// automatically.
///
/// When constructed from an `ErrorKind`, the entity is set to
/// [`Entity::default_for()`] by default. Ocassionally, the error's `entity` may
/// [`Entity::default_for()`] by default. Occasionally, the error's `entity` may
/// need to be set manually. Return what would be useful to the end-consumer.
///
/// # Matching Errors to Fields
@ -136,13 +136,13 @@ pub struct Error<'v> {
pub name: Option<NameBuf<'v>>,
/// The field's value, if it is known.
pub value: Option<Cow<'v, str>>,
/// The kind of error that occured.
/// The kind of error that occurred.
pub kind: ErrorKind<'v>,
/// The entitiy that caused the error.
pub entity: Entity,
}
/// The kind of form error that occured.
/// The kind of form error that occurred.
///
/// ## Constructing
///

View File

@ -155,7 +155,7 @@ impl<'r, T: FromForm<'r>> Form<T> {
/// Leniently parses a `T` from a **percent-decoded**
/// `x-www-form-urlencoded` form string. Specifically, this method
/// implements [§5.1 of the WHATWG URL Living Standard] with the exception
/// of steps 3.4 and 3.5, which are assumed to already be relfected in
/// of steps 3.4 and 3.5, which are assumed to already be reflected in
/// `string`, and then parses the fields as `T`.
///
/// [§5.1 of the WHATWG URL Living Standard]: https://url.spec.whatwg.org/#application/x-www-form-urlencoded

View File

@ -75,7 +75,7 @@ use crate::http::uncased::AsUncased;
///
/// Most type inherit their strategy on [`FromForm::init()`], but some types
/// like `Option` override the requested strategy. The strategy can also be
/// overwritted manually, per-field or per-value, by using the [`Strict`] or
/// overwritten manually, per-field or per-value, by using the [`Strict`] or
/// [`Lenient`] form guard:
///
/// ```rust

View File

@ -26,7 +26,7 @@ use either::Either;
/// attempt is made not to delete temporary files in use, _detection_ of when a
/// temporary file is being used is unreliable. As a result, a time-of-check to
/// time-of-use race condition from the creation of a `TempFile` to the
/// persistance of the `TempFile` may occur. Specifically, the following
/// persistence of the `TempFile` may occur. Specifically, the following
/// sequence may occur:
///
/// 1. A `TempFile` is created at random path `foo`.

View File

@ -74,7 +74,7 @@ use crate::sentinel::Sentry;
///
/// Collisions are resolved through _ranking_. Routes with lower ranks have
/// higher precedence during routing than routes with higher ranks. Thus, routes
/// are attempted in ascending rank order. If a higher precendence route returns
/// are attempted in ascending rank order. If a higher precedence route returns
/// an `Outcome` of `Forward`, the next highest precedence route is attempted,
/// and so on, until a route returns `Success` or `Failure`, or there are no
/// more routes to try. When all routes have been attempted, Rocket issues a

View File

@ -796,7 +796,7 @@ pub enum Feature {
/// The "interest-cohort" feature.
InterestCohort,
// Expiremental.
// Experimental.
/// The "conversion-measurement" feature.
ConversionMeasurement,

View File

@ -999,7 +999,7 @@ struct Password<'r> {
In reality, the expression after `validate =` can be _any_ expression as long as
it evaluates to a value of type `Result<(), Errors<'_>>` (aliased by
[`form::Result`]), where an `Ok` value means that validation was successful while
an `Err` of [`Errors<'_>`] indicates the error(s) that occured. For instance, if
an `Err` of [`Errors<'_>`] indicates the error(s) that occurred. For instance, if
you wanted to implement an ad-hoc Luhn validator for credit-card-like numbers,
you might write: