From c83e82e81b59502f30f9a7de63de2e9fe18e7d6d Mon Sep 17 00:00:00 2001 From: beltram Date: Wed, 4 Oct 2023 15:28:03 +0200 Subject: [PATCH] chore: ignore some clippy lints on wasm --- crypto-ffi/src/wasm.rs | 3 ++- keystore/src/connection/mod.rs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crypto-ffi/src/wasm.rs b/crypto-ffi/src/wasm.rs index b4b031ffe2..8f1754c530 100644 --- a/crypto-ffi/src/wasm.rs +++ b/crypto-ffi/src/wasm.rs @@ -91,7 +91,7 @@ impl CoreCryptoError { impl std::fmt::Display for CoreCryptoError { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { let rich_error = CoreCryptoJsRichError::from(self); - let rich_error_json = serde_json::to_string(&rich_error).map_err(|_| std::fmt::Error::default())?; + let rich_error_json = serde_json::to_string(&rich_error).map_err(|_| std::fmt::Error)?; write!(f, "{}\n\n{rich_error_json}", self.0) } } @@ -859,6 +859,7 @@ impl CoreCryptoWasmCallbacks { client_is_existing_group_user: js_sys::Function, ctx: JsValue, ) -> Self { + #[allow(clippy::arc_with_non_send_sync)] Self { authorize: std::sync::Arc::new(authorize.into()), user_authorize: std::sync::Arc::new(user_authorize.into()), diff --git a/keystore/src/connection/mod.rs b/keystore/src/connection/mod.rs index ce50552131..a37f8466e6 100644 --- a/keystore/src/connection/mod.rs +++ b/keystore/src/connection/mod.rs @@ -81,6 +81,7 @@ unsafe impl Sync for Connection {} impl Connection { pub async fn open_with_key(name: impl AsRef, key: impl AsRef) -> CryptoKeystoreResult { + #[allow(clippy::arc_with_non_send_sync)] let conn = Arc::new( KeystoreDatabaseConnection::open(name.as_ref(), key.as_ref()) .await? @@ -90,6 +91,7 @@ impl Connection { } pub async fn open_in_memory_with_key(name: impl AsRef, key: impl AsRef) -> CryptoKeystoreResult { + #[allow(clippy::arc_with_non_send_sync)] let conn = Arc::new( KeystoreDatabaseConnection::open_in_memory(name.as_ref(), key.as_ref()) .await?