mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2025-03-13 18:52:39 +00:00
Merge branch 'main' into upgrade-deps6
This commit is contained in:
commit
481fb60e27
5 changed files with 14 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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"] }
|
||||
|
||||
|
|
|
@ -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, Datatype, ActorType>(
|
||||
activity: &Activity,
|
||||
actor: &ActorType,
|
||||
inboxes: Vec<Url>,
|
||||
data: &Data<Datatype>,
|
||||
|
|
|
@ -360,6 +360,7 @@ const _: () = {
|
|||
}
|
||||
};
|
||||
|
||||
/// Internal only
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used)]
|
||||
pub mod tests {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue