Fix typos.

Co-authored-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
Sergio Benitez 2023-11-03 17:03:46 -05:00
parent 0d48743bd8
commit 124ec94b46
17 changed files with 21 additions and 21 deletions

View File

@ -141,7 +141,7 @@ pub use self::tungstenite::Message;
/// max_send_queue: Some(5),
/// // Decrease the maximum (complete) message size to 4MiB.
/// max_message_size: Some(4.mebibytes().as_u64() as usize),
/// // Decrease the maximum size of _one_ frame (not messag) to 1MiB.
/// // Decrease the maximum size of _one_ frame (not message) to 1MiB.
/// max_frame_size: Some(1.mebibytes().as_u64() as usize),
/// // Use the default values for the rest.
/// ..Default::default()

View File

@ -444,7 +444,7 @@ fn form_validate_contains_all_errors() {
#[field(validate = evaluate())]
firstname: String,
check: bool,
// this validator is hardcoded to return an error but it doesnt
// this validator is hardcoded to return an error but it doesn't
#[field(validate = evaluate_with_argument(self.check))]
lastname: String,
}

View File

@ -47,7 +47,7 @@ error: attribute cannot be applied to `main` function
note: this function cannot be `main`
--> tests/ui-fail-nightly/async-entry.rs:50:8
|
50 | fn main() -> rocekt::Rocket<rocket::Build> {
50 | fn main() -> rocket::Rocket<rocket::Build> {
| ^^^^
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -38,7 +38,7 @@ error: attribute cannot be applied to `main` function
error: [note] this function cannot be `main`
--> tests/ui-fail-stable/async-entry.rs:50:8
|
50 | fn main() -> rocekt::Rocket<rocket::Build> {
50 | fn main() -> rocket::Rocket<rocket::Build> {
| ^^^^
error: attribute can only be applied to functions that return a value

View File

@ -47,7 +47,7 @@ mod launch_b {
mod launch_c {
#[rocket::launch]
fn main() -> rocekt::Rocket<rocket::Build> {
fn main() -> rocket::Rocket<rocket::Build> {
rocket::build()
}
}

View File

@ -114,7 +114,7 @@
// .map_err(|e| errors.push(e))
// .map(Some).unwrap_or(None);
//
// let field_b = B::finblize(&mut this.field_b)
// let field_b = B::finalize(&mut this.field_b)
// .map_err(|e| errors.push(e))
// .map(Some).unwrap_or(None);
//

View File

@ -200,7 +200,7 @@ macro_rules! pub_request_impl {
/// Set mTLS client certificates to send along with the request.
///
/// If the request already contained certificates, they are replaced with
/// thsoe in `reader.`
/// those in `reader.`
///
/// `reader` is expected to be PEM-formatted and contain X509 certificates.
/// If it contains more than one certificate, the entire chain is set on the

View File

@ -89,7 +89,7 @@ pub type Outcome<S, E> = outcome::Outcome<S, (Status, E), Status>;
/// * **Forward**(Status)
///
/// If the `Outcome` is [`Forward`], the request will be forwarded to the next
/// matching route until either one succeds or there are no further matching
/// matching route until either one succeeds or there are no further matching
/// routes to attempt. In the latter case, the request will be sent to the
/// [`Catcher`](crate::Catcher) for the designated `Status`. Note that users
/// can request an `Option<S>` to catch `Forward`s.

View File

@ -783,7 +783,7 @@ mod sse_tests {
yield Event::data("bar");
};
// We expect: foo\n\n [heartbeat] bar\n\n [maybe beartbeat].
// We expect: foo\n\n [heartbeat] bar\n\n [maybe heartbeat].
let string = stream.heartbeat(Duration::from_millis(350)).into_string();
let heartbeats = string.matches(HEARTBEAT).count();
assert!(heartbeats >= 1 && heartbeats <= 3, "got {} beat(s)", heartbeats);

View File

@ -176,10 +176,10 @@ impl From<&Referrer> for Header<'static> {
/// The [Expect-CT] header: enables reporting and/or enforcement of [Certificate
/// Transparency].
///
/// [Certificate Transparency] can detect and prevent the use of misissued,
/// malicious, or revoked TLS certificates. It solves a variety of problems with
/// public TLS/SSL certificate management and is valuable measure for all public
/// TLS applications.
/// [Certificate Transparency] can detect and prevent the use of incorrectly
/// issued malicious, or revoked TLS certificates. It solves a variety of
/// problems with public TLS/SSL certificate management and is valuable measure
/// for all public TLS applications.
///
/// If you're just [getting started] with certificate transparency, ensure that
/// your [site is in compliance][getting started] before you enable enforcement

View File

@ -145,7 +145,7 @@ fn test_forwarding() {
fn test_redirection() {
let client = Client::debug(rocket()).expect("valid rocket");
// Redirection only happens if enabled, and doesn't affect index behaviour.
// Redirection only happens if enabled, and doesn't affect index behavior.
let response = client.get("/no_index/inner").dispatch();
assert_eq!(response.status(), Status::NotFound);

View File

@ -504,8 +504,8 @@ fn index() -> Template {
}
```
For a template to be renderable, it must first be registered. The `Template`
fairing automatically registers all discoverable templates when attached. The
To render a template, it must first be registered. The `Template` fairing
automatically registers all discoverable templates when attached. The
[Fairings](../fairings) sections of the guide provides more information on
fairings. To attach the template fairing, simply call
`.attach(Template::fairing())` on an instance of `Rocket` as follows:

View File

@ -21,7 +21,7 @@ The process for using managed state is simple:
! note: All managed state must be thread-safe.
Because Rocket automatically multithreads your application, handlers can
Because Rocket automatically parallelizes your application, handlers can
concurrently access managed state. As a result, managed state must be
thread-safe. Thanks to Rust, this condition is checked at compile-time by
ensuring that the type of values you store in managed state implement `Send` +

View File

@ -17,7 +17,7 @@ contributors at the end of this article.
## About Rocket
Rocket is a web framework for Rust with a focus on ease of use, expressibility,
Rocket is a web framework for Rust with a focus on ease of use, expressiveness,
and speed. Rocket makes it simple to write fast web applications without
sacrificing flexibility or type safety. All with minimal code.

View File

@ -15,7 +15,7 @@ support: a sincere thank you to everyone involved!
## About Rocket
Rocket is a web framework for Rust with a focus on ease of use, expressibility,
Rocket is a web framework for Rust with a focus on ease of use, expressiveness,
and speed. Rocket makes it simple to write fast web applications without
sacrificing flexibility or type safety. All with minimal code.

View File

@ -31,7 +31,7 @@ Friday, November 9th for the general release!
## About Rocket
Rocket is a web framework for Rust with a focus on ease of use, expressibility,
Rocket is a web framework for Rust with a focus on ease of use, expressiveness,
and speed. Rocket makes it simple to write fast web applications without
sacrificing flexibility or type safety. All with minimal code.

View File

@ -38,7 +38,7 @@ Wednesday, December 5th for the general release!
## About Rocket
Rocket is a web framework for Rust with a focus on ease of use, expressibility,
Rocket is a web framework for Rust with a focus on ease of use, expressiveness,
and speed. Rocket makes it simple to write fast web applications without
sacrificing flexibility or type safety. All with minimal code.