Skip to content

Commit

Permalink
Update aggregate_member_list() .filter_map
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieobject committed Mar 27, 2024
1 parent ef47a3f commit 4d04bf6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xmtp_mls/src/groups/members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ pub fn aggregate_member_list(openmls_group: &OpenMlsGroup) -> Result<Vec<GroupMe
let member_map: HashMap<String, GroupMember> = openmls_group
.members()
.filter_map(|member| {
let basic_credential = BasicCredential::try_from(&member.credential).ok()?;
let basic_credential = BasicCredential::try_from(
&member.credential
)
.ok()
.map(|basic_credential| (basic_credential))?;

Check warning on line 45 in xmtp_mls/src/groups/members.rs

View workflow job for this annotation

GitHub Actions / workspace

unnecessary map of the identity function

warning: unnecessary map of the identity function --> xmtp_mls/src/groups/members.rs:44:18 | 44 | .ok() | __________________^ 45 | | .map(|basic_credential| (basic_credential))?; | |_______________________________________________________^ help: remove the call to `map` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity = note: `#[warn(clippy::map_identity)]` on by default
Identity::get_validated_account_address(
basic_credential.identity(),
&member.signature_key,
Expand Down

0 comments on commit 4d04bf6

Please sign in to comment.