Skip to content
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: 3 additions & 0 deletions bindings/matrix-sdk-crypto-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

#![warn(missing_docs)]
#![allow(unused_qualifications)]
// Triggers false positives.
// See <https://github.com/rust-lang/rust-clippy/issues/10319>.
#![allow(clippy::extra_unused_type_parameters)]

mod backup_recovery_key;
mod device;
Expand Down
6 changes: 5 additions & 1 deletion bindings/matrix-sdk-crypto-js/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![warn(missing_docs, missing_debug_implementations)]
#![allow(clippy::drop_non_drop)] // triggered by wasm_bindgen code
// triggered by wasm_bindgen code
#![allow(clippy::drop_non_drop)]
// Triggers false positives.
// See <https://github.com/rust-lang/rust-clippy/issues/10319>.
#![allow(clippy::extra_unused_type_parameters)]

pub mod attachment;
pub mod device;
Expand Down
3 changes: 3 additions & 0 deletions bindings/matrix-sdk-ffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// TODO: target-os conditional would be good.

#![allow(unused_qualifications)]
// Triggers false positives.
// See <https://github.com/rust-lang/rust-clippy/issues/10319>.
#![allow(clippy::extra_unused_type_parameters)]

macro_rules! unwrap_or_clone_arc_into_variant {
(
Expand Down
30 changes: 10 additions & 20 deletions crates/matrix-sdk-indexeddb/src/safe_encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,30 +230,20 @@ where

fn as_secure_string(&self, table_name: &str, store_cipher: &StoreCipher) -> String {
[
&base64_encode(
store_cipher.hash_key(table_name, self.0.as_encoded_string().as_bytes()),
&STANDARD_NO_PAD,
),
&STANDARD_NO_PAD
.encode(store_cipher.hash_key(table_name, self.0.as_encoded_string().as_bytes())),
KEY_SEPARATOR,
&base64_encode(
store_cipher.hash_key(table_name, self.1.as_encoded_string().as_bytes()),
&STANDARD_NO_PAD,
),
&STANDARD_NO_PAD
.encode(store_cipher.hash_key(table_name, self.1.as_encoded_string().as_bytes())),
KEY_SEPARATOR,
&base64_encode(
store_cipher.hash_key(table_name, self.2.as_encoded_string().as_bytes()),
&STANDARD_NO_PAD,
),
&STANDARD_NO_PAD
.encode(store_cipher.hash_key(table_name, self.2.as_encoded_string().as_bytes())),
KEY_SEPARATOR,
&base64_encode(
store_cipher.hash_key(table_name, self.3.as_encoded_string().as_bytes()),
&STANDARD_NO_PAD,
),
&STANDARD_NO_PAD
.encode(store_cipher.hash_key(table_name, self.3.as_encoded_string().as_bytes())),
KEY_SEPARATOR,
&base64_encode(
store_cipher.hash_key(table_name, self.4.as_encoded_string().as_bytes()),
&STANDARD_NO_PAD,
),
&STANDARD_NO_PAD
.encode(store_cipher.hash_key(table_name, self.4.as_encoded_string().as_bytes())),
]
.concat()
}
Expand Down