From ae8e601c4e3c94650f0f209c608ceac286d7d90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=97=8D+85CD?= <50108258+kwaa@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:52:28 +0800 Subject: [PATCH] fix(ci): allow dead code --- src/http_signatures.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/http_signatures.rs b/src/http_signatures.rs index 8d69929..f1a7fbe 100644 --- a/src/http_signatures.rs +++ b/src/http_signatures.rs @@ -23,9 +23,7 @@ use reqwest::Request; use reqwest_middleware::RequestBuilder; use rsa::{ pkcs8::{DecodePublicKey, EncodePrivateKey, EncodePublicKey, LineEnding}, - Pkcs1v15Sign, - RsaPrivateKey, - RsaPublicKey, + Pkcs1v15Sign, RsaPrivateKey, RsaPublicKey, }; use serde::Deserialize; use sha2::{Digest, Sha256}; @@ -138,6 +136,7 @@ where /// from any actor of type A, and returns that actor if a valid signature is found. /// This function will return an `Err` variant when no signature is found /// or if the signature could not be verified. +#[allow(dead_code)] pub(crate) async fn signing_actor<'a, A, H>( headers: H, method: &Method, @@ -229,10 +228,12 @@ struct DigestPart { #[allow(dead_code)] pub algorithm: String, /// The hashsum + #[allow(dead_code)] pub digest: String, } impl DigestPart { + #[allow(dead_code)] fn try_from_header(h: &HeaderValue) -> Option> { let h = h.to_str().ok()?.split(';').next()?; let v: Vec<_> = h @@ -257,6 +258,7 @@ impl DigestPart { } /// Verify body of an inbox request against the hash provided in `Digest` header. +#[allow(dead_code)] pub(crate) fn verify_body_hash( digest_header: Option<&HeaderValue>, body: &[u8],