Fix various typos throughout the codebase.

This commit is contained in:
Necmettin Karakaya 2020-07-22 12:54:52 -07:00 committed by Sergio Benitez
parent ebdb4a2c3b
commit fde6eda915
17 changed files with 19 additions and 19 deletions

View File

@ -135,7 +135,7 @@ pub enum Referrer {
StrictOrigin, StrictOrigin,
/// Send full URL for same-origin requests. For cross-origin requests, only /// Send full URL for same-origin requests. For cross-origin requests, only
/// send origin part of URL if protocl security level remains the same e.g. /// send origin part of URL if protocol security level remains the same e.g.
/// HTTPS to HTTPS. /// HTTPS to HTTPS.
StrictOriginWhenCrossOrigin, StrictOriginWhenCrossOrigin,

View File

@ -4,7 +4,7 @@ use rocket::request::{self, FromRequest};
use crate::templates::ContextManager; use crate::templates::ContextManager;
/// Request guard for dynamiclly querying template metadata. /// Request guard for dynamically querying template metadata.
/// ///
/// # Usage /// # Usage
/// ///

View File

@ -199,7 +199,7 @@ fn explode_query<'a, I: Iterator<Item = (&'a Ident, &'a Type, &'a ArgExpr)>>(
Some(quote!(#uri_mod::UriArgumentsKind::Dynamic(&[#(#dyn_exprs),*]))) Some(quote!(#uri_mod::UriArgumentsKind::Dynamic(&[#(#dyn_exprs),*])))
} }
// Returns an Origin URI with the mount point and route path concatinated. The // Returns an Origin URI with the mount point and route path concatenated. The
// query string is mangled by replacing single dynamic parameters in query parts // query string is mangled by replacing single dynamic parameters in query parts
// (`<param>`) with `param=<param>`. // (`<param>`) with `param=<param>`.
fn build_origin(internal: &InternalUriParams) -> Origin<'static> { fn build_origin(internal: &InternalUriParams) -> Origin<'static> {

View File

@ -652,7 +652,7 @@ pub fn derive_from_form(input: TokenStream) -> TokenStream {
/// The attribute accepts two key/value pairs: `status` and `content_type`. The /// The attribute accepts two key/value pairs: `status` and `content_type`. The
/// value of `status` must be an unsigned integer representing a valid status /// value of `status` must be an unsigned integer representing a valid status
/// code. The [`Response`] produced from the generated implementation will have /// code. The [`Response`] produced from the generated implementation will have
/// its status overriden to this value. /// its status overridden to this value.
/// ///
/// The value of `content_type` must be a valid media-type in `top/sub` form or /// The value of `content_type` must be a valid media-type in `top/sub` form or
/// `shorthand` form. Examples include: /// `shorthand` form. Examples include:
@ -666,7 +666,7 @@ pub fn derive_from_form(input: TokenStream) -> TokenStream {
/// ///
/// See [`ContentType::parse_flexible()`] for a full list of available /// See [`ContentType::parse_flexible()`] for a full list of available
/// shorthands. The [`Response`] produced from the generated implementation will /// shorthands. The [`Response`] produced from the generated implementation will
/// have its content-type overriden to this value. /// have its content-type overridden to this value.
/// ///
/// [`Responder`]: ../rocket/response/trait.Responder.html /// [`Responder`]: ../rocket/response/trait.Responder.html
/// [`Response`]: ../rocket/struct.Response.html /// [`Response`]: ../rocket/struct.Response.html
@ -703,7 +703,7 @@ pub fn derive_responder(input: TokenStream) -> TokenStream {
/// ///
/// The derive generates an implementation of the [`UriDisplay<Query>`] trait. /// The derive generates an implementation of the [`UriDisplay<Query>`] trait.
/// The implementation calls [`Formatter::write_named_value()`] for every named /// The implementation calls [`Formatter::write_named_value()`] for every named
/// field, using the field's name (unless overriden, explained next) as the /// field, using the field's name (unless overridden, explained next) as the
/// `name` parameter, and [`Formatter::write_value()`] for every unnamed field /// `name` parameter, and [`Formatter::write_value()`] for every unnamed field
/// in the order the fields are declared. /// in the order the fields are declared.
/// ///

View File

@ -15,7 +15,7 @@ use rocket::request::Form;
use rocket::http::{Status, RawStr, ContentType}; use rocket::http::{Status, RawStr, ContentType};
use rocket::tokio::io::AsyncReadExt; use rocket::tokio::io::AsyncReadExt;
// Use all of the code generation avaiable at once. // Use all of the code generation available at once.
#[derive(FromForm, UriDisplayQuery)] #[derive(FromForm, UriDisplayQuery)]
struct Inner<'r> { struct Inner<'r> {

View File

@ -9,7 +9,7 @@ use crate::ext::IntoOwned;
/// Error emitted on URI parse failure. /// Error emitted on URI parse failure.
/// ///
/// Internally, the type includes information about where the parse error /// Internally, the type includes information about where the parse error
/// occured (the error's context) and information about what went wrong. /// occurred (the error's context) and information about what went wrong.
/// Externally, this information can be retrieved (in textual form) through its /// Externally, this information can be retrieved (in textual form) through its
/// `Display` implementation. In other words, by printing a value of this type. /// `Display` implementation. In other words, by printing a value of this type.
#[derive(Debug)] #[derive(Debug)]

View File

@ -26,7 +26,7 @@ use crate::uri::{UriPart, Path, Query, UriDisplay, Origin};
/// struct properly formats series of values for use in URIs. In particular, /// struct properly formats series of values for use in URIs. In particular,
/// this struct applies the following transformations: /// this struct applies the following transformations:
/// ///
/// * When **mutliple values** are written, they are separated by `/` for /// * When **multiple values** are written, they are separated by `/` for
/// `Path` types and `&` for `Query` types. /// `Path` types and `&` for `Query` types.
/// ///
/// Additionally, for `Formatter<Query>`: /// Additionally, for `Formatter<Query>`:

View File

@ -165,7 +165,7 @@ impl Error for ConfigError {
NotFound => "config file was not found", NotFound => "config file was not found",
IoError => "there was an I/O error while reading the config file", IoError => "there was an I/O error while reading the config file",
RandFailure => "randomness could not be retrieved from the OS", RandFailure => "randomness could not be retrieved from the OS",
Io(..) => "an I/O error occured while setting a configuration parameter", Io(..) => "an I/O error occurred while setting a configuration parameter",
BadFilePath(..) => "the config file path is invalid", BadFilePath(..) => "the config file path is invalid",
BadEntry(..) => "an environment specified as `[environment]` is invalid", BadEntry(..) => "an environment specified as `[environment]` is invalid",
BadEnv(..) => "the environment specified in `ROCKET_ENV` is invalid", BadEnv(..) => "the environment specified in `ROCKET_ENV` is invalid",

View File

@ -161,7 +161,7 @@
//! //!
//! The retrivial of configuration parameters usually occurs at launch time via //! The retrivial of configuration parameters usually occurs at launch time via
//! a [launch fairing](crate::fairing::Fairing). If information about the //! a [launch fairing](crate::fairing::Fairing). If information about the
//! configuraiton is needed later in the program, an attach fairing can be used //! configuration is needed later in the program, an attach fairing can be used
//! to store the information as managed state. As an example of the latter, //! to store the information as managed state. As an example of the latter,
//! consider the following short program which reads the `token` configuration //! consider the following short program which reads the `token` configuration
//! parameter and stores the value or a default in a `Token` managed state //! parameter and stores the value or a default in a `Token` managed state

View File

@ -12,7 +12,7 @@ use crate::error::LaunchError;
/// For the `blocking` version, see /// For the `blocking` version, see
/// [`blocking::Client`](crate::local::blocking::Client). /// [`blocking::Client`](crate::local::blocking::Client).
/// ///
/// ## Multithreaded Syncronization Pitfalls /// ## Multithreaded Synchronization Pitfalls
/// ///
/// Unlike its [`blocking`](crate::local::blocking) variant, this `async` `Client` /// Unlike its [`blocking`](crate::local::blocking) variant, this `async` `Client`
/// implements `Sync`. However, using it in a multithreaded environment while /// implements `Sync`. However, using it in a multithreaded environment while

View File

@ -75,7 +75,7 @@ impl<'c> LocalResponse<'c> {
// We have no methods that return an `&Request`. However, we must // We have no methods that return an `&Request`. However, we must
// also ensure that `Response` doesn't leak any such references. To // also ensure that `Response` doesn't leak any such references. To
// do so, we don't expose the `Response` directly in any way; // do so, we don't expose the `Response` directly in any way;
// otherwise, methods like `.headers()` could, in conjuction with // otherwise, methods like `.headers()` could, in conjunction with
// particular crafted `Responder`s, potentially be used to obtain a // particular crafted `Responder`s, potentially be used to obtain a
// reference to contents of `Request`. All methods, instead, return // reference to contents of `Request`. All methods, instead, return
// references bounded by `self`. This is easily verified by nothing // references bounded by `self`. This is easily verified by nothing

View File

@ -150,7 +150,7 @@ impl<'q> Iterator for Query<'q> {
/// `FromForm` (as in the previous example) will suffice. For special cases /// `FromForm` (as in the previous example) will suffice. For special cases
/// however, an implementation of `FromQuery` may be warranted. /// however, an implementation of `FromQuery` may be warranted.
/// ///
/// Consider a contrived scheme where we expect to recieve one query key, `key`, /// Consider a contrived scheme where we expect to receive one query key, `key`,
/// three times and wish to take the middle value. For instance, consider the /// three times and wish to take the middle value. For instance, consider the
/// query: /// query:
/// ///

View File

@ -30,7 +30,7 @@ use tokio::sync::mpsc;
/// .launch() /// .launch()
/// .await; /// .await;
/// ///
/// // If the server shut down (by visting `/shutdown`), `result` is `Ok`. /// // If the server shut down (by visiting `/shutdown`), `result` is `Ok`.
/// result.expect("server failed unexpectedly"); /// result.expect("server failed unexpectedly");
/// } /// }
/// ``` /// ```

View File

@ -40,7 +40,7 @@ fn index() -> &'static str {
accepts raw data in the body of the request and responds with a URL of accepts raw data in the body of the request and responds with a URL of
a page containing the body's content a page containing the body's content
EXMAPLE: curl --data-binary @file.txt http://localhost:8000 EXAMPLE: curl --data-binary @file.txt http://localhost:8000
GET /<id> GET /<id>

View File

@ -18,7 +18,7 @@ function restore_dev_dependencies() {
} }
if ! [ -z "$(git status --porcelain)" ]; then if ! [ -z "$(git status --porcelain)" ]; then
echo "There are uncommited changes! Aborting." echo "There are uncommitted changes! Aborting."
exit 1 exit 1
fi fi

View File

@ -297,7 +297,7 @@ with the correct ID:
# in the project root # in the project root
cargo run cargo run
# in a seperate terminal # in a separate terminal
echo "Hello, world." | curl --data-binary @- http://localhost:8000 echo "Hello, world." | curl --data-binary @- http://localhost:8000
# => http://localhost:8000/eGs # => http://localhost:8000/eGs

View File

@ -403,7 +403,7 @@ This release includes many breaking changes. Please see the
for a complete list of breaking changes along with details on handling the for a complete list of breaking changes along with details on handling the
breaking change in existing applications. breaking change in existing applications.
Rocket 0.3 will continue as a security maintance release _only_. All users are Rocket 0.3 will continue as a security maintenance release _only_. All users are
encouraged to migrate their applications to 0.4. encouraged to migrate their applications to 0.4.
## General Improvements ## General Improvements