From 00f520cd2d8b85feb721e7b8e0eeb94a942d1495 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 18 Mar 2020 06:23:43 +0900 Subject: [PATCH 1/2] Fix clippy warnings --- actix-identity/src/lib.rs | 8 ++++---- actix-session/src/cookie.rs | 9 +++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/actix-identity/src/lib.rs b/actix-identity/src/lib.rs index 1d9568a88..94c4e6231 100644 --- a/actix-identity/src/lib.rs +++ b/actix-identity/src/lib.rs @@ -623,8 +623,8 @@ mod tests { use actix_web::{error, web, App, Error, HttpResponse}; const COOKIE_KEY_MASTER: [u8; 32] = [0; 32]; - const COOKIE_NAME: &'static str = "actix_auth"; - const COOKIE_LOGIN: &'static str = "test"; + const COOKIE_NAME: &str = "actix_auth"; + const COOKIE_LOGIN: &str = "test"; #[actix_rt::test] async fn test_identity() { @@ -790,7 +790,7 @@ mod tests { let key: Vec = COOKIE_KEY_MASTER .iter() .chain([1, 0, 0, 0].iter()) - .map(|e| *e) + .copied() .collect(); jar.private(&Key::from_master(&key)).add(Cookie::new( COOKIE_NAME, @@ -846,7 +846,7 @@ mod tests { let key: Vec = COOKIE_KEY_MASTER .iter() .chain([1, 0, 0, 0].iter()) - .map(|e| *e) + .copied() .collect(); let cookie = cookies .private(&Key::from_master(&key)) diff --git a/actix-session/src/cookie.rs b/actix-session/src/cookie.rs index dc3011419..1acf41076 100644 --- a/actix-session/src/cookie.rs +++ b/actix-session/src/cookie.rs @@ -403,8 +403,7 @@ mod tests { assert!(response .response() .cookies() - .find(|c| c.name() == "actix-session") - .is_some()); + .any(|c| c.name() == "actix-session")); } #[actix_rt::test] @@ -424,8 +423,7 @@ mod tests { assert!(response .response() .cookies() - .find(|c| c.name() == "actix-session") - .is_some()); + .any(|c| c.name() == "actix-session")); } #[actix_rt::test] @@ -445,8 +443,7 @@ mod tests { assert!(response .response() .cookies() - .find(|c| c.name() == "actix-session") - .is_some()); + .any(|c| c.name() == "actix-session")); } #[actix_rt::test] From 5e59fb157cc77c162c718cd389499bcde8af1085 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 18 Mar 2020 06:24:39 +0900 Subject: [PATCH 2/2] Add codecov.yml --- codecov.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..d0afdad86 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,5 @@ +ignore: # ignore codecoverage on following paths + - "**/examples" + - ".github" + - "**/*.md" + - "**/*.toml"