From e02048c353a9e884d2c319b9168ce0ed6d538130 Mon Sep 17 00:00:00 2001 From: Ana Bujan Date: Tue, 29 Mar 2022 13:23:01 +0200 Subject: [PATCH] Remove Clone requirement from Args --- Cargo.toml | 2 +- src/lib.rs | 4 ++-- src/tests/test_service.rs | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 784047a..e4fd938 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-permissions" -version = "1.0.0" +version = "1.0.1" edition = "2018" authors = ["Ana Bujan "] readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index f27fd56..eca655b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,9 +46,9 @@ pub fn check_with_custom_deny( ) -> Route where F: Handler, - Args: FromRequest + 'static + Clone, + Args: FromRequest + 'static, P1: Permission, - P1Args: FromRequest + 'static + Clone, + P1Args: FromRequest + 'static, F::Output: Responder, { route.service(fn_factory(move || { diff --git a/src/tests/test_service.rs b/src/tests/test_service.rs index f9e4082..cd60930 100644 --- a/src/tests/test_service.rs +++ b/src/tests/test_service.rs @@ -51,10 +51,6 @@ mod tests { #[actix_web::test] async fn test_deny_all_default_handler() { - fn custom_deny_handler(_req: HttpRequest) -> HttpResponse { - HttpResponse::new(StatusCode::FORBIDDEN) - } - async fn deny_all(_req: HttpRequest) -> actix_web::Result { Ok(false) }