filters/protected_events: fix clippy
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user