diff --git a/crates/dav/src/resource.rs b/crates/dav/src/resource.rs index 879798d..ae15312 100644 --- a/crates/dav/src/resource.rs +++ b/crates/dav/src/resource.rs @@ -171,14 +171,15 @@ pub trait ResourceService: Sized + 'static { #[inline] fn actix_resource() -> actix_web::Resource { - let propfind_method = || web::method(Method::from_str("PROPFIND").unwrap()); - let proppatch_method = || web::method(Method::from_str("PROPPATCH").unwrap()); - Self::actix_additional_routes( web::resource("") .name(Self::resource_name()) - .route(propfind_method().to(route_propfind::)) - .route(proppatch_method().to(route_proppatch::)) + .route( + web::method(Method::from_str("PROPFIND").unwrap()).to(route_propfind::), + ) + .route( + web::method(Method::from_str("PROPPATCH").unwrap()).to(route_proppatch::), + ) .delete(route_delete::), ) }