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,
/// 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.
StrictOriginWhenCrossOrigin,

View File

@ -4,7 +4,7 @@ use rocket::request::{self, FromRequest};
use crate::templates::ContextManager;
/// Request guard for dynamiclly querying template metadata.
/// Request guard for dynamically querying template metadata.
///
/// # 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),*])))
}
// 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
// (`<param>`) with `param=<param>`.
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
/// value of `status` must be an unsigned integer representing a valid status
/// 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
/// `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
/// 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
/// [`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 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
/// 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::tokio::io::AsyncReadExt;
// Use all of the code generation avaiable at once.
// Use all of the code generation available at once.
#[derive(FromForm, UriDisplayQuery)]
struct Inner<'r> {

View File

@ -9,7 +9,7 @@ use crate::ext::IntoOwned;
/// Error emitted on URI parse failure.
///
/// 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
/// `Display` implementation. In other words, by printing a value of this type.
#[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,
/// 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.
///
/// Additionally, for `Formatter<Query>`:

View File

@ -165,7 +165,7 @@ impl Error for ConfigError {
NotFound => "config file was not found",
IoError => "there was an I/O error while reading the config file",
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",
BadEntry(..) => "an environment specified as `[environment]` 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
//! 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,
//! consider the following short program which reads the `token` configuration
//! 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
/// [`blocking::Client`](crate::local::blocking::Client).
///
/// ## Multithreaded Syncronization Pitfalls
/// ## Multithreaded Synchronization Pitfalls
///
/// Unlike its [`blocking`](crate::local::blocking) variant, this `async` `Client`
/// 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
// also ensure that `Response` doesn't leak any such references. To
// 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
// reference to contents of `Request`. All methods, instead, return
// 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
/// 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
/// query:
///

View File

@ -30,7 +30,7 @@ use tokio::sync::mpsc;
/// .launch()
/// .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");
/// }
/// ```

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
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>

View File

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

View File

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