apply lint suggestions and version bump

This commit is contained in:
Jonathan de Jong 2021-07-14 12:31:38 +02:00
parent be6b6c3cf0
commit e1b89c1248
11 changed files with 81 additions and 98 deletions

View file

@ -533,17 +533,15 @@ impl Rooms {
r
},
|pduid| {
let r = Ok(Some(self.pduid_pdu.get(&pduid)?.ok_or_else(|| {
Ok(Some(self.pduid_pdu.get(&pduid)?.ok_or_else(|| {
Error::bad_database("Invalid pduid in eventid_pduid.")
})?));
r
})?))
},
)?
.map(|pdu| {
let r = serde_json::from_slice(&pdu)
serde_json::from_slice(&pdu)
.map_err(|_| Error::bad_database("Invalid PDU in db."))
.map(Arc::new);
r
.map(Arc::new)
})
.transpose()?
{
@ -1112,7 +1110,7 @@ impl Rooms {
}
};
new_state.insert(shortstatekey, shorteventid.into());
new_state.insert(shortstatekey, shorteventid);
let new_state_hash = self.calculate_hash(
&new_state