Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes some clippy lints #637

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions xmtp_api_grpc/src/auth_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ impl Authenticator {
let mut token_bytes = Vec::new();
let _ = token.encode(&mut token_bytes);

let token_base64 = base64::engine::general_purpose::STANDARD.encode(&token_bytes);
token_base64
base64::engine::general_purpose::STANDARD.encode(&token_bytes)
}

fn sign(&self, bytes_to_sign: &[u8]) -> Signature {
Expand Down
4 changes: 1 addition & 3 deletions xmtp_mls/src/groups/members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ 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()
.map(|basic_credential| (basic_credential))?;
let basic_credential = BasicCredential::try_from(&member.credential).ok()?;
Identity::get_validated_account_address(
basic_credential.identity(),
&member.signature_key,
Expand Down
1 change: 0 additions & 1 deletion xmtp_mls/src/groups/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
cursor: 0,
},
)]),
move |message| callback(message),

Check warning on line 89 in xmtp_mls/src/groups/subscriptions.rs

View workflow job for this annotation

GitHub Actions / workspace

redundant closure

warning: redundant closure --> xmtp_mls/src/groups/subscriptions.rs:89:13 | 89 | move |message| callback(message), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `callback` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
)?)
}
}
Expand All @@ -95,7 +95,6 @@
mod tests {
use prost::Message;
use xmtp_cryptography::utils::generate_local_wallet;
use xmtp_proto::xmtp::mls::api::v1::GroupMessage;

use crate::{builder::ClientBuilder, storage::group_message::GroupMessageKind};
use futures::StreamExt;
Expand Down
Loading