mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
enable if_not_else lint
This commit is contained in:
parent
a32b7c1ac1
commit
623824dc0c
6 changed files with 288 additions and 287 deletions
|
|
@ -160,7 +160,9 @@ impl Service {
|
|||
// Find events that have been added since starting the last request
|
||||
let new_events = self.db.queued_requests(&outgoing_kind).filter_map(|r| r.ok()).take(30).collect::<Vec<_>>();
|
||||
|
||||
if !new_events.is_empty() {
|
||||
if new_events.is_empty() {
|
||||
current_transaction_status.remove(&outgoing_kind);
|
||||
} else {
|
||||
// Insert pdus we found
|
||||
self.db.mark_as_active(&new_events)?;
|
||||
|
||||
|
|
@ -170,8 +172,6 @@ impl Service {
|
|||
new_events.into_iter().map(|(event, _)| event).collect(),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
current_transaction_status.remove(&outgoing_kind);
|
||||
}
|
||||
}
|
||||
Err((outgoing_kind, _)) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue