refactor
This commit is contained in:
@@ -32,11 +32,7 @@ impl RepoStatus {
|
||||
|
||||
/// Check whether a status event references the given root event via an `e` tag.
|
||||
pub fn references_root(event: &Event, root: &EventId) -> bool {
|
||||
let root_hex: String = root.to_hex();
|
||||
event
|
||||
.tags
|
||||
.iter()
|
||||
.any(|t| t.kind() == "e" && t.content() == Some(root_hex.as_str()))
|
||||
event.tags.event_ids().any(|id| id == *root)
|
||||
}
|
||||
|
||||
/// Resolve the status of a root event per NIP-34:
|
||||
|
||||
Reference in New Issue
Block a user