From 5779b018b1ad61ab22e6c23879c62ca7699541f6 Mon Sep 17 00:00:00 2001 From: Nugine Date: Fri, 29 Sep 2023 11:52:38 +0800 Subject: [PATCH] s3s: fix lints --- .github/workflows/ci.yml | 2 +- crates/s3s/src/sig_v4/authorization_v4.rs | 8 ++++---- justfile | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 719dc4df..6e576d48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: with: tool: just - run: cargo fmt --all -- --check - - run: cargo clippy -- -D warnings + - run: cargo clippy --all-features --all-targets -- -D warnings - run: cargo test --all-features - run: | just codegen diff --git a/crates/s3s/src/sig_v4/authorization_v4.rs b/crates/s3s/src/sig_v4/authorization_v4.rs index 4263b116..61a5a2e9 100644 --- a/crates/s3s/src/sig_v4/authorization_v4.rs +++ b/crates/s3s/src/sig_v4/authorization_v4.rs @@ -174,11 +174,11 @@ mod tests { #[test] fn auth_header() { { - let auth = r#"AWS4-HMAC-SHA256 + let auth = "AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20130524/us-east-1/s3/aws4_request, SignedHeaders=host;range;x-amz-date, Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024 - "#; + "; let ans = AuthorizationV4::parse(auth).unwrap(); assert_eq!(ans.algorithm, "AWS4-HMAC-SHA256"); @@ -190,11 +190,11 @@ mod tests { assert_eq!(ans.signature, "fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024"); } { - let auth = r#"AWS4-HMAC-SHA256 + let auth = "AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20200931/us-east-1/s3/aws4_request, SignedHeaders=host;range;x-amz-date, Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024 - "#; + "; assert!(AuthorizationV4::parse(auth).is_err()); } diff --git a/justfile b/justfile index 244e298c..e12551d5 100644 --- a/justfile +++ b/justfile @@ -3,7 +3,7 @@ fmt: dev: cargo fmt - cargo clippy + cargo clippy --all-features --all-targets cargo test doc: