From 599fd6af93f7fd90996de86d9db7714081266041 Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Mon, 7 May 2018 20:53:45 +0300 Subject: [PATCH] fix formatting --- src/error.rs | 4 ++-- src/httprequest.rs | 12 ++++++------ src/ws/client.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/error.rs b/src/error.rs index 5d886ec7..9482e067 100644 --- a/src/error.rs +++ b/src/error.rs @@ -310,7 +310,7 @@ pub enum HttpRangeError { /// See `https://github.com/golang/go/commit/aa9b3d7` #[fail( display = "First-byte-pos of all of the byte-range-spec values is greater than the content size" - )] + )] NoOverlap, } @@ -392,7 +392,7 @@ impl ResponseError for ExpectError { } } -/// A set of error that can occurred during parsing content type +/// A set of error that can occure during parsing content type #[derive(Fail, PartialEq, Debug)] pub enum ContentTypeError { /// Can not parse content type diff --git a/src/httprequest.rs b/src/httprequest.rs index 42adc63a..229c0687 100644 --- a/src/httprequest.rs +++ b/src/httprequest.rs @@ -665,8 +665,8 @@ mod tests { let mut resource = ResourceHandler::<()>::default(); resource.name("index"); let routes = vec![( - Resource::new("index", "/user/{name}.{ext}"), - Some(resource), + Resource::new("index", "/user/{name}.{ext}"), + Some(resource), )]; let (router, _) = Router::new("/", ServerSettings::default(), routes); assert!(router.has_route("/user/test.html")); @@ -697,8 +697,8 @@ mod tests { let mut resource = ResourceHandler::<()>::default(); resource.name("index"); let routes = vec![( - Resource::new("index", "/user/{name}.{ext}"), - Some(resource), + Resource::new("index", "/user/{name}.{ext}"), + Some(resource), )]; let (router, _) = Router::new("/prefix/", ServerSettings::default(), routes); assert!(router.has_route("/user/test.html")); @@ -719,8 +719,8 @@ mod tests { let mut resource = ResourceHandler::<()>::default(); resource.name("index"); let routes = vec![( - Resource::external("youtube", "https://youtube.com/watch/{video_id}"), - None, + Resource::external("youtube", "https://youtube.com/watch/{video_id}"), + None, )]; let (router, _) = Router::new::<()>("", ServerSettings::default(), routes); assert!(!router.has_route("https://youtube.com/watch/unknown")); diff --git a/src/ws/client.rs b/src/ws/client.rs index 64aaa8e4..aa392a90 100644 --- a/src/ws/client.rs +++ b/src/ws/client.rs @@ -256,7 +256,7 @@ struct Inner { closed: bool, } -/// Future that implemented client websocket handshake process. +/// Future that implementes client websocket handshake process. /// /// It resolves to a pair of `ClientReader` and `ClientWriter` that /// can be used for reading and writing websocket frames.