commit bd91c4c41d548f2236bc2791d8c1bdbf0b8a1ead
parent 162e4ad160e5d8fc979714a35a017a148da2c651
Author: triesap <tyson@radroots.org>
Date: Thu, 5 Mar 2026 20:03:55 +0000
nostr: reflow encrypted tag coverage setup
- wrap encrypted tag builder assignment for readability
- keep test coverage behavior unchanged
- preserve tag resolution expectations
- tests: cargo check -p radroots-nostr; cargo test -p radroots-nostr
Diffstat:
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/crates/nostr/tests/coverage.rs b/crates/nostr/tests/coverage.rs
@@ -361,16 +361,17 @@ fn tag_helpers_cover_matchers_and_resolve_paths() {
Err(RadrootsNostrTagsResolveError::MissingPTag(_))
));
- let encrypted_empty_p_content = RadrootsNostrEventBuilder::new(RadrootsNostrKind::TextNote, "cipher")
- .tags(vec![
- RadrootsNostrTag::custom(
- RadrootsNostrTagKind::Encrypted,
- vec!["encrypted".to_string()],
- ),
- RadrootsNostrTag::custom(RadrootsNostrTagKind::p(), Vec::<String>::new()),
- ])
- .sign_with_keys(&sender)
- .expect("sign encrypted event with empty p tag");
+ let encrypted_empty_p_content =
+ RadrootsNostrEventBuilder::new(RadrootsNostrKind::TextNote, "cipher")
+ .tags(vec![
+ RadrootsNostrTag::custom(
+ RadrootsNostrTagKind::Encrypted,
+ vec!["encrypted".to_string()],
+ ),
+ RadrootsNostrTag::custom(RadrootsNostrTagKind::p(), Vec::<String>::new()),
+ ])
+ .sign_with_keys(&sender)
+ .expect("sign encrypted event with empty p tag");
let empty_p_content = radroots_nostr_tags_resolve(&encrypted_empty_p_content, &keys);
assert!(matches!(
empty_p_content,