chore: get rid of warnings

This commit is contained in:
Timo Kösters 2021-03-24 11:52:10 +01:00
parent e50f2864de
commit 16eed1d8c2
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
9 changed files with 82 additions and 96 deletions

View file

@ -136,9 +136,7 @@ pub async fn sync_events_route(
.map(|since_shortstatehash| {
Ok::<_, Error>(
since_shortstatehash
.map(|since_shortstatehash| {
db.rooms.state_full(&room_id, since_shortstatehash)
})
.map(|since_shortstatehash| db.rooms.state_full(since_shortstatehash))
.transpose()?,
)
})
@ -512,12 +510,7 @@ pub async fn sync_events_route(
})
.and_then(|shortstatehash| {
db.rooms
.state_get(
&room_id,
shortstatehash,
&EventType::RoomMember,
sender_user.as_str(),
)
.state_get(shortstatehash, &EventType::RoomMember, sender_user.as_str())
.ok()?
.ok_or_else(|| Error::bad_database("State hash in db doesn't have a state."))
.ok()