enable if_not_else lint

This commit is contained in:
Charles Hall 2024-05-14 16:50:15 -07:00
parent a32b7c1ac1
commit 623824dc0c
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
6 changed files with 288 additions and 287 deletions

View file

@ -94,7 +94,9 @@ pub(crate) async fn sync_events_route(
rx
}
Entry::Occupied(mut o) => {
if o.get().0 != body.since {
if o.get().0 == body.since {
o.get().1.clone()
} else {
let (tx, rx) = tokio::sync::watch::channel(None);
o.insert((body.since.clone(), rx.clone()));
@ -109,8 +111,6 @@ pub(crate) async fn sync_events_route(
));
rx
} else {
o.get().1.clone()
}
}
};