From be5555e893a7c92cf1c197da198cecf0af54e5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 8 Mar 2024 12:24:00 +0100 Subject: [PATCH] ffi: please clippy --- .../matrix-sdk-ffi/src/timeline/content.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/timeline/content.rs b/bindings/matrix-sdk-ffi/src/timeline/content.rs index 21aee269ec3..38589dde29b 100644 --- a/bindings/matrix-sdk-ffi/src/timeline/content.rs +++ b/bindings/matrix-sdk-ffi/src/timeline/content.rs @@ -358,17 +358,13 @@ impl From<&matrix_sdk_ui::timeline::AnyOtherFullStateEventContent> for OtherStat let users: HashMap; match c { FullContent::Original { content, prev_content } => { - previous = if let Some(prev_content) = prev_content { - Some( - prev_content - .users - .iter() - .map(|(k, &v)| (k.to_string(), v.into())) - .collect(), - ) - } else { - None - }; + previous = prev_content.as_ref().map(|prev_content| { + prev_content + .users + .iter() + .map(|(k, &v)| (k.to_string(), v.into())) + .collect() + }); users = power_level_user_changes(content, prev_content) .iter() .map(|(k, v)| (k.to_string(), *v))