From 2d80c5053d4a34710f04caf1324275c519dc8a4c Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Sat, 24 Mar 2018 09:35:52 +0300 Subject: [PATCH] spelling check --- LICENSE-MIT | 2 +- examples/http-proxy/src/main.rs | 4 ++-- examples/state/src/main.rs | 2 +- guide/src/qs_14.md | 2 +- src/header/common/accept_charset.rs | 2 +- src/header/common/expires.rs | 2 +- src/header/common/if_modified_since.rs | 2 +- src/header/common/if_unmodified_since.rs | 2 +- src/header/common/last_modified.rs | 2 +- src/info.rs | 2 +- src/ws/mod.rs | 4 ++-- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/LICENSE-MIT b/LICENSE-MIT index 410ce45a4..0f80296ae 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2017 Nikilay Kim +Copyright (c) 2017 Nikolay Kim Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated diff --git a/examples/http-proxy/src/main.rs b/examples/http-proxy/src/main.rs index 551101c97..c1ca93ff1 100644 --- a/examples/http-proxy/src/main.rs +++ b/examples/http-proxy/src/main.rs @@ -15,7 +15,7 @@ fn index(_req: HttpRequest) -> Box> { .map_err(error::Error::from) // <- convert SendRequestError to an Error .and_then( |resp| resp.body() // <- this is MessageBody type, resolves to complete body - .from_err() // <- convet PayloadError to a Error + .from_err() // <- convert PayloadError to a Error .and_then(|body| { // <- we got complete body, now send as server response httpcodes::HttpOk.build() .body(body) @@ -36,7 +36,7 @@ fn streaming(_req: HttpRequest) -> Box> { // read one chunk from client response and send this chunk to a server response // .from_err() converts PayloadError to a Error .body(Body::Streaming(Box::new(resp.from_err()))) - .map_err(|e| e.into()) // HttpOk::build() mayb return HttpError, we need to convert it to a Error + .map_err(|e| e.into()) // HttpOk::build() maybe return HttpError, we need to convert it to a Error }) .responder() } diff --git a/examples/state/src/main.rs b/examples/state/src/main.rs index 0f7e0ec3b..e1f1a93c4 100644 --- a/examples/state/src/main.rs +++ b/examples/state/src/main.rs @@ -17,7 +17,7 @@ struct AppState { counter: Cell, } -/// somple handle +/// simple handle fn index(req: HttpRequest) -> HttpResponse { println!("{:?}", req); req.state().counter.set(req.state().counter.get() + 1); diff --git a/guide/src/qs_14.md b/guide/src/qs_14.md index f7dd6e7f7..665319c3f 100644 --- a/guide/src/qs_14.md +++ b/guide/src/qs_14.md @@ -51,7 +51,7 @@ impl Handler for DbExecutor { name: &msg.name, }; - // normal diesl operations + // normal diesel operations diesel::insert_into(users) .values(&new_user) .execute(&self.0) diff --git a/src/header/common/accept_charset.rs b/src/header/common/accept_charset.rs index 1e798ad6d..a7c06e595 100644 --- a/src/header/common/accept_charset.rs +++ b/src/header/common/accept_charset.rs @@ -63,7 +63,7 @@ header! { (AcceptCharset, http::ACCEPT_CHARSET) => (QualityItem)+ test_accept_charset { - /// Testcase from RFC + /// Test case from RFC test_header!(test1, vec![b"iso-8859-5, unicode-1-1;q=0.8"]); } } diff --git a/src/header/common/expires.rs b/src/header/common/expires.rs index cc80cd241..f0a03e9da 100644 --- a/src/header/common/expires.rs +++ b/src/header/common/expires.rs @@ -33,7 +33,7 @@ header! { (Expires, http::EXPIRES) => [HttpDate] test_expires { - // Testcase from RFC + // Test case from RFC test_header!(test1, vec![b"Thu, 01 Dec 1994 16:00:00 GMT"]); } } diff --git a/src/header/common/if_modified_since.rs b/src/header/common/if_modified_since.rs index 264fcac49..a48bb0956 100644 --- a/src/header/common/if_modified_since.rs +++ b/src/header/common/if_modified_since.rs @@ -33,7 +33,7 @@ header! { (IfModifiedSince, http::IF_MODIFIED_SINCE) => [HttpDate] test_if_modified_since { - // Testcase from RFC + // Test case from RFC test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]); } } diff --git a/src/header/common/if_unmodified_since.rs b/src/header/common/if_unmodified_since.rs index d0fce4fcd..9041aff25 100644 --- a/src/header/common/if_unmodified_since.rs +++ b/src/header/common/if_unmodified_since.rs @@ -34,7 +34,7 @@ header! { (IfUnmodifiedSince, http::IF_UNMODIFIED_SINCE) => [HttpDate] test_if_unmodified_since { - // Testcase from RFC + // Test case from RFC test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]); } } diff --git a/src/header/common/last_modified.rs b/src/header/common/last_modified.rs index 402c73745..919e01492 100644 --- a/src/header/common/last_modified.rs +++ b/src/header/common/last_modified.rs @@ -33,6 +33,6 @@ header! { (LastModified, http::LAST_MODIFIED) => [HttpDate] test_last_modified { - // Testcase from RFC + // Test case from RFC test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);} } diff --git a/src/info.rs b/src/info.rs index 6177cd021..7e1b40f04 100644 --- a/src/info.rs +++ b/src/info.rs @@ -147,7 +147,7 @@ impl<'a> ConnectionInfo<'a> { /// /// - Forwarded /// - X-Forwarded-For - /// - peername of opened socket + /// - peer name of opened socket #[inline] pub fn remote(&self) -> Option<&str> { if let Some(r) = self.remote { diff --git a/src/ws/mod.rs b/src/ws/mod.rs index 12fb4d709..bcce10011 100644 --- a/src/ws/mod.rs +++ b/src/ws/mod.rs @@ -103,8 +103,8 @@ pub enum ProtocolError { /// A payload reached size limit. #[fail(display="A payload reached size limit.")] Overflow, - /// Continuation is not supproted - #[fail(display="Continuation is not supproted.")] + /// Continuation is not supported + #[fail(display="Continuation is not supported.")] NoContinuation, /// Bad utf-8 encoding #[fail(display="Bad utf-8 encoding.")]