From a565e71018faa1193521121afd0eb0ed83cf5ba3 Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Wed, 31 Jan 2018 20:28:53 +0300 Subject: [PATCH 1/2] spelling check --- src/client/connector.rs | 2 +- src/middleware/cors.rs | 4 ++-- src/pipeline.rs | 2 +- src/route.rs | 2 +- src/server/h1.rs | 2 +- src/ws/client.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/client/connector.rs b/src/client/connector.rs index 6323649c7..7778fe9b1 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -140,7 +140,7 @@ impl ClientConnector { /// /// Arbiter::handle().spawn({ /// conn.call_fut( - /// Connect::new("https://www.rust-lang.org").unwrap()) // <- connecto to host + /// Connect::new("https://www.rust-lang.org").unwrap()) // <- connect to host /// .map_err(|_| ()) /// .and_then(|res| { /// if let Ok(mut stream) = res { diff --git a/src/middleware/cors.rs b/src/middleware/cors.rs index ad5f295c6..d80cbd4f7 100644 --- a/src/middleware/cors.rs +++ b/src/middleware/cors.rs @@ -579,7 +579,7 @@ impl CorsBuilder { /// Set a wildcard origins /// - /// If send widlcard is set and the `allowed_origins` parameter is `All`, a wildcard + /// If send wildcard is set and the `allowed_origins` parameter is `All`, a wildcard /// `Access-Control-Allow-Origin` response header is sent, rather than the request’s /// `Origin` header. /// @@ -603,7 +603,7 @@ impl CorsBuilder { /// If true, injects the `Access-Control-Allow-Credentials` header in responses. /// This allows cookies and credentials to be submitted across domains. /// - /// This option cannot be used in conjuction with an `allowed_origin` set to `All` + /// This option cannot be used in conjunction with an `allowed_origin` set to `All` /// and `send_wildcards` set to `true`. /// /// Defaults to `false`. diff --git a/src/pipeline.rs b/src/pipeline.rs index fb3c9b0b0..d1328ad99 100644 --- a/src/pipeline.rs +++ b/src/pipeline.rs @@ -689,7 +689,7 @@ impl Completed { #[inline] fn init(info: &mut PipelineInfo) -> PipelineState { if let Some(ref err) = info.error { - error!("Error occured during request handling: {}", err); + error!("Error occurred during request handling: {}", err); } if info.context.is_none() { diff --git a/src/route.rs b/src/route.rs index 542b4b18e..bd721b1c6 100644 --- a/src/route.rs +++ b/src/route.rs @@ -127,7 +127,7 @@ impl InnerHandler { #[inline] pub fn handle(&self, req: HttpRequest) -> Reply { // reason: handler is unique per thread, - // handler get called from async code, and handler doesnt have side effects + // handler get called from async code, and handler doesn't have side effects #[allow(mutable_transmutes)] #[cfg_attr(feature = "cargo-clippy", allow(borrowed_box))] let h: &mut Box> = unsafe { mem::transmute(self.0.as_ref()) }; diff --git a/src/server/h1.rs b/src/server/h1.rs index b039b09ed..32c0cc126 100644 --- a/src/server/h1.rs +++ b/src/server/h1.rs @@ -1205,7 +1205,7 @@ mod tests { // type in chunked let mut buf = Buffer::new( "GET /test HTTP/1.1\r\n\ - transfer-encoding: chnked\r\n\r\n"); + transfer-encoding: chunked\r\n\r\n"); let req = parse_ready!(&mut buf); if let Ok(val) = req.chunked() { diff --git a/src/ws/client.rs b/src/ws/client.rs index 5de25c606..7e4c4f9b1 100644 --- a/src/ws/client.rs +++ b/src/ws/client.rs @@ -35,7 +35,7 @@ pub type WsClientFuture = Future; -/// Websockt client error +/// Websocket client error #[derive(Fail, Debug)] pub enum WsClientError { #[fail(display="Invalid url")] From a1b96b1cf453a75cf3a02e38ca5bfce682778730 Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Wed, 31 Jan 2018 21:37:12 +0300 Subject: [PATCH 2/2] return "chnked" value --- src/server/h1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/h1.rs b/src/server/h1.rs index 32c0cc126..b039b09ed 100644 --- a/src/server/h1.rs +++ b/src/server/h1.rs @@ -1205,7 +1205,7 @@ mod tests { // type in chunked let mut buf = Buffer::new( "GET /test HTTP/1.1\r\n\ - transfer-encoding: chunked\r\n\r\n"); + transfer-encoding: chnked\r\n\r\n"); let req = parse_ready!(&mut buf); if let Ok(val) = req.chunked() {