replace unwraps with expects

This commit is contained in:
Matthias Ahouansou
2024-02-23 19:39:30 +00:00
parent 976a73a0e5
commit ace9637bc2
3 changed files with 16 additions and 4 deletions

View File

@@ -1620,7 +1620,7 @@ pub async fn sync_events_v4_route(
} else {
match services().rooms.state_accessor.get_avatar(room_id)? {
ruma::JsOption::Some(avatar) => {
js_option::JsOption::Some(avatar.url.unwrap())
js_option::JsOption::from_option(avatar.url)
}
ruma::JsOption::Null => ruma::JsOption::Null,
ruma::JsOption::Undefined => ruma::JsOption::Undefined,