diff --git a/bindings_node/src/message.rs b/bindings_node/src/message.rs index 9b6e3134f..0d8172a50 100644 --- a/bindings_node/src/message.rs +++ b/bindings_node/src/message.rs @@ -85,7 +85,7 @@ impl From for MsgQueryArgs { MsgQueryArgs { sent_before_ns: opts.sent_before_ns, sent_after_ns: opts.sent_after_ns, - delivery_status: delivery_status, + delivery_status, limit: opts.limit, direction, ..Default::default() diff --git a/xmtp_mls/src/groups/group_metadata.rs b/xmtp_mls/src/groups/group_metadata.rs index bdfe885aa..a5db2534f 100644 --- a/xmtp_mls/src/groups/group_metadata.rs +++ b/xmtp_mls/src/groups/group_metadata.rs @@ -1,3 +1,5 @@ +use std::fmt::Display; + use openmls::{extensions::Extensions, group::MlsGroup as OpenMlsGroup}; use prost::Message; use thiserror::Error; @@ -188,12 +190,12 @@ where } } -impl ToString for DmMembers +impl Display for DmMembers where Id: AsRef, { - fn to_string(&self) -> String { - String::from(self) + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", String::from(self)) } } diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index e633fed65..b41218bba 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -1136,7 +1136,7 @@ impl MlsGroup { &dm_id[..inbox_id.len()] }; - return Ok(target_inbox.to_string()); + Ok(target_inbox.to_string()) } /// Find the `consent_state` of the group @@ -1674,16 +1674,13 @@ pub(crate) mod tests { use diesel::{ExpressionMethods, RunQueryDsl}; use futures::future::join_all; use prost::Message; - use std::{sync::Arc, time::Duration}; + use std::sync::Arc; use wasm_bindgen_test::wasm_bindgen_test; use xmtp_common::assert_err; use xmtp_content_types::{group_updated::GroupUpdatedCodec, ContentCodec}; use xmtp_cryptography::utils::generate_local_wallet; - use xmtp_proto::xmtp::mls::message_contents::plaintext_envelope::Content; + use xmtp_proto::xmtp::mls::api::v1::group_message::Version; use xmtp_proto::xmtp::mls::message_contents::EncodedContent; - use xmtp_proto::xmtp::mls::{ - api::v1::group_message::Version, message_contents::PlaintextEnvelope, - }; use crate::storage::group::StoredGroup; use crate::storage::schema::{group_messages, groups}; @@ -2071,7 +2068,6 @@ pub(crate) mod tests { .unwrap(); bo_dm.send_message(b"Hello there").await.unwrap(); - std::thread::sleep(Duration::from_millis(20)); alix_dm .send_message(b"No, let's use this dm") .await diff --git a/xmtp_mls/src/storage/encrypted_store/group.rs b/xmtp_mls/src/storage/encrypted_store/group.rs index c624943d0..323c5d644 100644 --- a/xmtp_mls/src/storage/encrypted_store/group.rs +++ b/xmtp_mls/src/storage/encrypted_store/group.rs @@ -577,7 +577,7 @@ impl DmIdExt for String { &dm_id[..id.len()] }; - return target_inbox.to_string(); + target_inbox.to_string() } } @@ -586,10 +586,7 @@ pub(crate) mod tests { #[cfg(target_arch = "wasm32")] wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_dedicated_worker); - use std::{ - sync::atomic::{AtomicU16, Ordering}, - time::Duration, - }; + use std::sync::atomic::{AtomicU16, Ordering}; use super::*; use crate::{