mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2025-05-20 01:18:52 +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:
|
when:
|
||||||
- event: pull_request
|
- 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:
|
cargo_clippy:
|
||||||
image: *rust_image
|
image: *rust_image
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -92,7 +92,6 @@ tower = { version = "0.5.2", optional = true }
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
anyhow = "1.0.95"
|
anyhow = "1.0.95"
|
||||||
axum = { version = "0.8.1", features = ["macros"] }
|
axum = { version = "0.8.1", features = ["macros"] }
|
||||||
axum-extra = { version = "0.10.0", features = ["typed-header"] }
|
|
||||||
env_logger = "0.11.6"
|
env_logger = "0.11.6"
|
||||||
tokio = { version = "1.42.0", features = ["full"] }
|
tokio = { version = "1.42.0", features = ["full"] }
|
||||||
|
|
||||||
|
|
|
@ -136,8 +136,8 @@ impl SendActivityTask {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn build_tasks<'a, Activity, Datatype, ActorType>(
|
pub(crate) async fn build_tasks<Activity, Datatype, ActorType>(
|
||||||
activity: &'a Activity,
|
activity: &Activity,
|
||||||
actor: &ActorType,
|
actor: &ActorType,
|
||||||
inboxes: Vec<Url>,
|
inboxes: Vec<Url>,
|
||||||
data: &Data<Datatype>,
|
data: &Data<Datatype>,
|
||||||
|
|
|
@ -360,6 +360,7 @@ const _: () = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Internal only
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[allow(clippy::unwrap_used)]
|
#[allow(clippy::unwrap_used)]
|
||||||
pub mod tests {
|
pub mod tests {
|
||||||
|
|
|
@ -276,6 +276,7 @@ pub(crate) fn verify_body_hash(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Internal only
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[allow(clippy::unwrap_used)]
|
#[allow(clippy::unwrap_used)]
|
||||||
pub mod test {
|
pub mod test {
|
||||||
|
@ -378,6 +379,7 @@ pub mod test {
|
||||||
assert_eq!(invalid, Err(Error::ActivityBodyDigestInvalid));
|
assert_eq!(invalid, Err(Error::ActivityBodyDigestInvalid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Internal only, return hardcoded keypair for testing
|
||||||
pub fn test_keypair() -> Keypair {
|
pub fn test_keypair() -> Keypair {
|
||||||
let rsa = RsaPrivateKey::from_pkcs1_pem(PRIVATE_KEY).unwrap();
|
let rsa = RsaPrivateKey::from_pkcs1_pem(PRIVATE_KEY).unwrap();
|
||||||
let pkey = RsaPublicKey::from(&rsa);
|
let pkey = RsaPublicKey::from(&rsa);
|
||||||
|
|
Loading…
Reference in a new issue