1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

added proc-macros for route registration

This commit is contained in:
Nikolay Kim
2019-03-07 11:09:42 -08:00
parent 1151b5bf7c
commit 22708e78a9
9 changed files with 221 additions and 42 deletions

View File

@ -318,9 +318,7 @@ where
}
}
impl<P, C: StaticFileConfig + 'static> NewService<ServiceRequest<P>>
for Files<P, C>
{
impl<P, C: StaticFileConfig + 'static> NewService<ServiceRequest<P>> for Files<P, C> {
type Response = ServiceResponse;
type Error = ();
type Service = FilesService<P, C>;
@ -730,8 +728,7 @@ mod tests {
#[test]
fn test_named_file_content_range_headers() {
let mut srv = test::init_service(
App::new()
.service(Files::new("/test", ".").index_file("tests/test.binary")),
App::new().service(Files::new("/test", ".").index_file("tests/test.binary")),
);
// Valid range header
@ -770,8 +767,7 @@ mod tests {
#[test]
fn test_named_file_content_length_headers() {
let mut srv = test::init_service(
App::new()
.service(Files::new("test", ".").index_file("tests/test.binary")),
App::new().service(Files::new("test", ".").index_file("tests/test.binary")),
);
// Valid range header