Skip to content

Commit

Permalink
Successfully building
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhuaaa committed Dec 5, 2023
1 parent 600ea7e commit daef8f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions bindings_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use log::info;
use logger::FfiLogger;
use std::error::Error;
use std::sync::Arc;
use uniffi::FfiConverter;

use xmtp_api_grpc::grpc_api_helper::Client as TonicApiClient;
use xmtp_mls::groups::MlsGroup;
use xmtp_mls::storage::group_message::{GroupMessageKind, StoredGroupMessage};
use xmtp_mls::storage::group_message::StoredGroupMessage;
use xmtp_mls::types::Address;
use xmtp_mls::{
builder::ClientBuilder,
Expand Down Expand Up @@ -56,7 +56,7 @@ impl<T: Error> From<T> for GenericError {
}

// TODO Use non-string errors across Uniffi interface
fn stringify_error_chain(error: &(dyn Error + 'static)) -> String {
fn stringify_error_chain<T: Error>(error: &T) -> String {
let mut result = format!("Error: {}\n", error);

let mut source = error.source();
Expand Down Expand Up @@ -103,7 +103,7 @@ pub async fn create_client(
}
}?;

let mut xmtp_client: RustXmtpClient = ClientBuilder::new(inbox_owner.into())
let xmtp_client: RustXmtpClient = ClientBuilder::new(inbox_owner.into())
.api_client(api_client)
.store(store)
.build()?;
Expand Down Expand Up @@ -144,7 +144,7 @@ pub struct FfiConversations {
impl FfiConversations {
pub async fn create_group(
&self,
account_address: String,
_account_address: String,
) -> Result<Arc<FfiGroup>, GenericError> {
let convo = self.inner_client.create_group()?;

Expand Down Expand Up @@ -285,7 +285,7 @@ mod tests {

use crate::{
create_client, inbox_owner::SigningError, logger::FfiLogger, static_enc_key, FfiInboxOwner,
FfiListMessagesOptions, FfiXmtpClient,
FfiXmtpClient,
};
use ethers_core::rand::{
self,
Expand Down Expand Up @@ -411,7 +411,7 @@ mod tests {
Box::new(ffi_inbox_owner.clone()),
xmtp_api_grpc::LOCALHOST_ADDRESS.to_string(),
false,
Some(path),
Some(path.clone()),
Some(key),
)
.await
Expand Down
4 changes: 2 additions & 2 deletions bindings_ffi/src/v2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{stringify_error_chain, GenericError};
use crate::GenericError;

#[uniffi::export]
pub fn recover_address(
Expand All @@ -9,7 +9,7 @@ pub fn recover_address(
xmtp_cryptography::signature::RecoverableSignature::Eip191Signature(signature_bytes);
let recovered = signature.recover_address(&predigest_message)?;

return Ok(recovered);
Ok(recovered)
}

#[uniffi::export]
Expand Down
2 changes: 1 addition & 1 deletion xmtp_mls/src/storage/encrypted_store/db_connection.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::storage::RawDbConnection;
use std::{cell::RefCell, fmt, sync::Mutex};
use std::{fmt, sync::Mutex};

// Re-implementation of Cow without ToOwned requirement
enum RefOrValue<'a, T> {
Expand Down

0 comments on commit daef8f5

Please sign in to comment.