Skip to content

Commit 17ea444

Browse files
committed
fixup! Remove optional
1 parent b6733c9 commit 17ea444

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

databroker/src/broker.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -661,19 +661,19 @@ impl Subscriptions {
661661
}
662662
});
663663
self.change_subscriptions.retain_mut(|sub| {
664-
if sub.sender.is_closed() {
665-
info!("Subscriber gone: removing subscription");
666-
false
667-
} else {
668-
match &sub.permissions.expired() {
669-
Ok(()) => true,
670-
Err(PermissionError::Expired) => {
671-
info!("Token expired: removing subscription");
672-
false
673-
}
674-
Err(err) => panic!("Error: {:?}", err),
664+
if sub.sender.is_closed() {
665+
info!("Subscriber gone: removing subscription");
666+
false
667+
} else {
668+
match &sub.permissions.expired() {
669+
Ok(()) => true,
670+
Err(PermissionError::Expired) => {
671+
info!("Token expired: removing subscription");
672+
false
675673
}
674+
Err(err) => panic!("Error: {:?}", err),
676675
}
676+
}
677677
});
678678
}
679679
}
@@ -744,8 +744,7 @@ impl ChangeSubscription {
744744
};
745745
if notifications.updates.is_empty() {
746746
Ok(())
747-
}
748-
else {
747+
} else {
749748
match &self.sender.send(notifications).await {
750749
Ok(()) => Ok(()),
751750
Err(_) => Err(NotificationError {}),
@@ -786,8 +785,7 @@ impl ChangeSubscription {
786785
}
787786
notifications
788787
};
789-
match &self.sender.send(notifications).await
790-
{
788+
match &self.sender.send(notifications).await {
791789
Ok(()) => Ok(()),
792790
Err(_) => Err(NotificationError {}),
793791
}

0 commit comments

Comments
 (0)