Skip to content

Commit

Permalink
ffi: please clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinesp committed Mar 8, 2024
1 parent ead2e14 commit be5555e
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions bindings/matrix-sdk-ffi/src/timeline/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,17 +358,13 @@ impl From<&matrix_sdk_ui::timeline::AnyOtherFullStateEventContent> for OtherStat
let users: HashMap<String, i64>;
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))
Expand Down

0 comments on commit be5555e

Please sign in to comment.