Return correct Errors and replace panic, fix misc review issues

Remove EventJson todo comments, clean up Cargo.toml commented ruma deps.
This commit is contained in:
Devin R 2020-06-24 17:03:33 -04:00
parent ddc7598870
commit 84dcb885a7
5 changed files with 20 additions and 43 deletions

View file

@ -32,7 +32,7 @@ impl Globals {
.unwrap_or("localhost")
.to_owned(),
)
.map_err(|_| Error::bad_database("Invalid server name"))?,
.map_err(|_| Error::BadConfig("Invalid server name"))?,
registration_disabled: config.get_bool("registration_disabled").unwrap_or(false),
})
}

View file

@ -62,8 +62,6 @@ impl RoomEdus {
room_id: &RoomId,
since: u64,
) -> Result<impl Iterator<Item = Result<EventJson<EduEvent>>>> {
// TODO is this ^^^^^^^
// only ever a read receipt could we just return EphemeralRoomEvent here?
let mut prefix = room_id.to_string().as_bytes().to_vec();
prefix.push(0xff);