mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-30 18:34:36 +01:00
fix formatting
This commit is contained in:
parent
cd11293c1f
commit
599fd6af93
@ -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
|
||||||
|
@ -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"));
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user