mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +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
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue