1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00

fix formatting

This commit is contained in:
Alexander Andreev 2018-05-07 20:53:45 +03:00
parent cd11293c1f
commit 599fd6af93
3 changed files with 9 additions and 9 deletions

View File

@ -310,7 +310,7 @@ pub enum HttpRangeError {
/// See `https://github.com/golang/go/commit/aa9b3d7` /// See `https://github.com/golang/go/commit/aa9b3d7`
#[fail( #[fail(
display = "First-byte-pos of all of the byte-range-spec values is greater than the content size" display = "First-byte-pos of all of the byte-range-spec values is greater than the content size"
)] )]
NoOverlap, 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)] #[derive(Fail, PartialEq, Debug)]
pub enum ContentTypeError { pub enum ContentTypeError {
/// Can not parse content type /// Can not parse content type

View File

@ -665,8 +665,8 @@ mod tests {
let mut resource = ResourceHandler::<()>::default(); let mut resource = ResourceHandler::<()>::default();
resource.name("index"); resource.name("index");
let routes = vec![( let routes = vec![(
Resource::new("index", "/user/{name}.{ext}"), Resource::new("index", "/user/{name}.{ext}"),
Some(resource), Some(resource),
)]; )];
let (router, _) = Router::new("/", ServerSettings::default(), routes); let (router, _) = Router::new("/", ServerSettings::default(), routes);
assert!(router.has_route("/user/test.html")); assert!(router.has_route("/user/test.html"));
@ -697,8 +697,8 @@ mod tests {
let mut resource = ResourceHandler::<()>::default(); let mut resource = ResourceHandler::<()>::default();
resource.name("index"); resource.name("index");
let routes = vec![( let routes = vec![(
Resource::new("index", "/user/{name}.{ext}"), Resource::new("index", "/user/{name}.{ext}"),
Some(resource), Some(resource),
)]; )];
let (router, _) = Router::new("/prefix/", ServerSettings::default(), routes); let (router, _) = Router::new("/prefix/", ServerSettings::default(), routes);
assert!(router.has_route("/user/test.html")); assert!(router.has_route("/user/test.html"));
@ -719,8 +719,8 @@ mod tests {
let mut resource = ResourceHandler::<()>::default(); let mut resource = ResourceHandler::<()>::default();
resource.name("index"); resource.name("index");
let routes = vec![( let routes = vec![(
Resource::external("youtube", "https://youtube.com/watch/{video_id}"), Resource::external("youtube", "https://youtube.com/watch/{video_id}"),
None, None,
)]; )];
let (router, _) = Router::new::<()>("", ServerSettings::default(), routes); let (router, _) = Router::new::<()>("", ServerSettings::default(), routes);
assert!(!router.has_route("https://youtube.com/watch/unknown")); assert!(!router.has_route("https://youtube.com/watch/unknown"));

View File

@ -256,7 +256,7 @@ struct Inner {
closed: bool, 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 /// It resolves to a pair of `ClientReader` and `ClientWriter` that
/// can be used for reading and writing websocket frames. /// can be used for reading and writing websocket frames.