Skip to content

Commit

Permalink
chore: ignore some clippy lints on wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
beltram committed Oct 4, 2023
1 parent 3f03052 commit c83e82e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto-ffi/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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()),
Expand Down
2 changes: 2 additions & 0 deletions keystore/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ unsafe impl Sync for Connection {}

impl Connection {
pub async fn open_with_key(name: impl AsRef<str>, key: impl AsRef<str>) -> CryptoKeystoreResult<Self> {
#[allow(clippy::arc_with_non_send_sync)]
let conn = Arc::new(
KeystoreDatabaseConnection::open(name.as_ref(), key.as_ref())
.await?
Expand All @@ -90,6 +91,7 @@ impl Connection {
}

pub async fn open_in_memory_with_key(name: impl AsRef<str>, key: impl AsRef<str>) -> CryptoKeystoreResult<Self> {
#[allow(clippy::arc_with_non_send_sync)]
let conn = Arc::new(
KeystoreDatabaseConnection::open_in_memory(name.as_ref(), key.as_ref())
.await?
Expand Down

0 comments on commit c83e82e

Please sign in to comment.