431 errors left
This commit is contained in:
parent
bd8b616ca0
commit
8708cd3b63
32 changed files with 640 additions and 973 deletions
|
@ -54,11 +54,11 @@ impl service::appservice::Data for KeyValueDatabase {
|
|||
)
|
||||
}
|
||||
|
||||
fn iter_ids(&self) -> Result<Box<dyn Iterator<Item = Result<String>>>> {
|
||||
Ok(self.id_appserviceregistrations.iter().map(|(id, _)| {
|
||||
fn iter_ids<'a>(&'a self) -> Result<Box<dyn Iterator<Item = Result<String>> + 'a>> {
|
||||
Ok(Box::new(self.id_appserviceregistrations.iter().map(|(id, _)| {
|
||||
utils::string_from_bytes(&id)
|
||||
.map_err(|_| Error::bad_database("Invalid id bytes in id_appserviceregistrations."))
|
||||
}))
|
||||
})))
|
||||
}
|
||||
|
||||
fn all(&self) -> Result<Vec<(String, serde_yaml::Value)>> {
|
||||
|
|
|
@ -16,13 +16,13 @@ impl service::rooms::directory::Data for KeyValueDatabase {
|
|||
}
|
||||
|
||||
fn public_rooms(&self) -> Box<dyn Iterator<Item = Result<Box<RoomId>>>> {
|
||||
self.publicroomids.iter().map(|(bytes, _)| {
|
||||
Box::new(self.publicroomids.iter().map(|(bytes, _)| {
|
||||
RoomId::parse(
|
||||
utils::string_from_bytes(&bytes).map_err(|_| {
|
||||
Error::bad_database("Room ID in publicroomids is invalid unicode.")
|
||||
})?,
|
||||
)
|
||||
.map_err(|_| Error::bad_database("Room ID in publicroomids is invalid."))
|
||||
})
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -513,7 +513,7 @@ impl KeyValueDatabase {
|
|||
let states_parents = last_roomsstatehash.map_or_else(
|
||||
|| Ok(Vec::new()),
|
||||
|&last_roomsstatehash| {
|
||||
db.rooms.load_shortstatehash_info(dbg!(last_roomsstatehash))
|
||||
db.rooms.state_accessor.load_shortstatehash_info(dbg!(last_roomsstatehash))
|
||||
},
|
||||
)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue