diff --git a/.woodpecker.yml b/.woodpecker.yml index f1dd4a0..f9d5cf8 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,6 +9,15 @@ steps: when: - event: pull_request + cargo_shear: + image: *rust_nightly_image + commands: + - *install_binstall + - cargo binstall -y cargo-shear + - cargo shear + when: + - event: pull_request + cargo_clippy: image: *rust_image environment: diff --git a/Cargo.toml b/Cargo.toml index a622fd4..1938e3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,6 @@ tower = { version = "0.5.2", optional = true } [dev-dependencies] anyhow = "1.0.95" axum = { version = "0.8.1", features = ["macros"] } -axum-extra = { version = "0.10.0", features = ["typed-header"] } env_logger = "0.11.6" tokio = { version = "1.42.0", features = ["full"] } diff --git a/src/activity_sending.rs b/src/activity_sending.rs index 1c84757..4971485 100644 --- a/src/activity_sending.rs +++ b/src/activity_sending.rs @@ -136,8 +136,8 @@ impl SendActivityTask { } } -pub(crate) async fn build_tasks<'a, Activity, Datatype, ActorType>( - activity: &'a Activity, +pub(crate) async fn build_tasks( + activity: &Activity, actor: &ActorType, inboxes: Vec, data: &Data, diff --git a/src/fetch/object_id.rs b/src/fetch/object_id.rs index 0e01bbf..136ec38 100644 --- a/src/fetch/object_id.rs +++ b/src/fetch/object_id.rs @@ -360,6 +360,7 @@ const _: () = { } }; +/// Internal only #[cfg(test)] #[allow(clippy::unwrap_used)] pub mod tests { diff --git a/src/http_signatures.rs b/src/http_signatures.rs index dd92d19..95d0a12 100644 --- a/src/http_signatures.rs +++ b/src/http_signatures.rs @@ -276,6 +276,7 @@ pub(crate) fn verify_body_hash( Ok(()) } +/// Internal only #[cfg(test)] #[allow(clippy::unwrap_used)] pub mod test { @@ -378,6 +379,7 @@ pub mod test { assert_eq!(invalid, Err(Error::ActivityBodyDigestInvalid)); } + /// Internal only, return hardcoded keypair for testing pub fn test_keypair() -> Keypair { let rsa = RsaPrivateKey::from_pkcs1_pem(PRIVATE_KEY).unwrap(); let pkey = RsaPublicKey::from(&rsa);