mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-06 07:28:23 +00:00
chore: fmt and clippy fixes
This commit is contained in:
@@ -165,7 +165,11 @@ pub fn announcement_coordinate(announcement: &Event, repo_id: &str) -> String {
|
||||
|
||||
/// Build a kind-5 deletion request signed by `client` carrying the supplied
|
||||
/// `e`-tag event ids and `a`-tag coordinate strings.
|
||||
pub fn build_deletion(client: &AuditClient, event_ids: &[EventId], coordinates: &[String]) -> Event {
|
||||
pub fn build_deletion(
|
||||
client: &AuditClient,
|
||||
event_ids: &[EventId],
|
||||
coordinates: &[String],
|
||||
) -> Event {
|
||||
let mut builder = client.event_builder(Kind::EventDeletion, "delete");
|
||||
|
||||
for id in event_ids {
|
||||
|
||||
@@ -670,7 +670,7 @@ async fn newer_addressable_event_survives_a_tag_deletion() {
|
||||
|
||||
// Stage 3: delete v1 by its own `a` coordinate. The deletion's created_at is
|
||||
// "now", so only versions at or before now are deleted.
|
||||
let deletion = build_deletion(&client, &[], &[addr_coord.clone()]);
|
||||
let deletion = build_deletion(&client, &[], std::slice::from_ref(&addr_coord));
|
||||
let deletion_ts = deletion.created_at;
|
||||
client
|
||||
.send_event(deletion)
|
||||
|
||||
@@ -49,9 +49,7 @@
|
||||
|
||||
mod common;
|
||||
|
||||
use common::{
|
||||
announcement_served_by_coordinate, build_vanish, publish_served_repo, TestRelay,
|
||||
};
|
||||
use common::{announcement_served_by_coordinate, build_vanish, publish_served_repo, TestRelay};
|
||||
|
||||
use grasp_audit::{AuditClient, AuditConfig};
|
||||
use std::time::Duration;
|
||||
@@ -157,7 +155,12 @@ async fn events_from_vanished_pubkey_are_rejected() {
|
||||
|
||||
// A brand-new event from the now-vanished pubkey must be rejected.
|
||||
let issue = client
|
||||
.create_issue(&announcement, "Post-vanish issue", "should be blocked", vec![])
|
||||
.create_issue(
|
||||
&announcement,
|
||||
"Post-vanish issue",
|
||||
"should be blocked",
|
||||
vec![],
|
||||
)
|
||||
.expect("build issue");
|
||||
let issue_id = issue.id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user