diff --git a/rust/src/backup/backup_archive.rs b/rust/src/backup/backup_archive.rs index d1dac2e7..86d748e4 100644 --- a/rust/src/backup/backup_archive.rs +++ b/rust/src/backup/backup_archive.rs @@ -13,6 +13,7 @@ use zip::{CompressionMethod, ZipArchive, ZipWriter}; pub(crate) struct BackupArchive {} impl BackupArchive { + #[allow(clippy::type_complexity)] fn get_backup_files( ctx: &Context, keys: &KeyManager, diff --git a/rust/src/bridge/callbacks/macros.rs b/rust/src/bridge/callbacks/macros.rs index 02b1d8d8..af53a4ee 100644 --- a/rust/src/bridge/callbacks/macros.rs +++ b/rust/src/bridge/callbacks/macros.rs @@ -31,6 +31,7 @@ macro_rules! callback_generator { // 3. Generate the Automated Init Function paste::paste! { + #[allow(clippy::too_many_arguments)] pub fn init_flutter_callbacks( callback_id: u32, $( diff --git a/rust/src/database/tables/mod.rs b/rust/src/database/tables/mod.rs index 09002155..d3058b96 100644 --- a/rust/src/database/tables/mod.rs +++ b/rust/src/database/tables/mod.rs @@ -6,7 +6,7 @@ macro_rules! generate_insert { pub async fn $fn_name( pool: &sqlx::SqlitePool, $($field: $ty),+ - ) -> crate::error::Result { + ) -> $crate::error::Result { let sql = format!( "INSERT INTO {} ({}) VALUES ({}) RETURNING id", $table, @@ -27,7 +27,7 @@ macro_rules! generate_insert { #[macro_export] macro_rules! generate_select { ($table:literal, $fn_name:ident) => { - pub async fn $fn_name(pool: &sqlx::SqlitePool) -> crate::error::Result> { + pub async fn $fn_name(pool: &sqlx::SqlitePool) -> $crate::error::Result> { let sql = format!("SELECT * FROM {}", $table); let results = sqlx::query_as::<_, Self>(sqlx::AssertSqlSafe(sql)) .fetch_all(pool) @@ -36,7 +36,7 @@ macro_rules! generate_select { } }; ($table:literal, $fn_name:ident, $($field:ident : $ty:ty),+) => { - pub async fn $fn_name(pool: &sqlx::SqlitePool, $($field: $ty),+) -> crate::error::Result> { + pub async fn $fn_name(pool: &sqlx::SqlitePool, $($field: $ty),+) -> $crate::error::Result> { let mut sql = format!("SELECT * FROM {} WHERE ", $table); let mut filters = Vec::new(); $( @@ -63,7 +63,7 @@ macro_rules! generate_table_tests { #[cfg(test)] mod tests { use super::*; - use crate::database::Database; + use $crate::database::Database; use tempfile::tempdir; #[tokio::test] @@ -91,7 +91,7 @@ macro_rules! generate_test_select { use tempfile::tempdir; let dir = tempdir().unwrap(); let db_path = dir.path().join("test.sqlite").display().to_string(); - let db = crate::database::Database::new(&db_path, None, false).await.unwrap(); + let db = $crate::database::Database::new(&db_path, None, false).await.unwrap(); db.run_migrations().await.unwrap(); $struct::$insert_fn(&db.pool, $($arg),+).await.unwrap(); diff --git a/rust/src/keys/main_key.rs b/rust/src/keys/main_key.rs index 3bb94bd6..0a3960ce 100644 --- a/rust/src/keys/main_key.rs +++ b/rust/src/keys/main_key.rs @@ -66,7 +66,7 @@ impl MainKey { // self.encrypt_with_info(b"media_main_key", media_key) // } - /// Decrypts a wrapped media key using the derived Media Main Key. + // Decrypts a wrapped media key using the derived Media Main Key. // pub fn decrypt_media_key(&self, wrapped_media_key: &[u8]) -> Result<[u8; 32]> { // let decrypted = self.decrypt_with_info(b"media_main_key", wrapped_media_key)?;