filters/protected_events: fix clippy

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2024-07-09 11:05:01 -07:00
parent 39d70fd179
commit f08e805673

View file

@ -6,8 +6,8 @@ pub struct ProtectedEvents {}
impl NoteFilter for ProtectedEvents {
fn filter_note(&mut self, input: &InputMessage) -> OutputMessage {
for tag in &input.event.tags {
for entry in tag {
if let Some(tag) = input.event.tags.first() {
if let Some(entry) = tag.first() {
if entry == "-" {
return OutputMessage::new(
input.event.id.clone(),
@ -15,9 +15,7 @@ impl NoteFilter for ProtectedEvents {
Some("blocked: event marked as protected".to_string()),
);
}
break;
}
break;
}
OutputMessage::new(input.event.id.clone(), Action::Accept, None)