diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 0f8e8efc2..f50869df6 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -49,7 +49,7 @@ pub fn dc_is_configured(context: &Context) -> bool { /******************************************************************************* * Configure JOB ******************************************************************************/ -#[allow(non_snake_case, unused_must_use)] +#[allow(non_snake_case, unused_must_use, clippy::cognitive_complexity)] pub fn JobConfigureImap(context: &Context) -> job::Status { if !context.sql.is_open() { error!(context, "Cannot configure, database not opened.",); diff --git a/src/dc_receive_imf.rs b/src/dc_receive_imf.rs index 2b25c25b1..ac05bf54f 100644 --- a/src/dc_receive_imf.rs +++ b/src/dc_receive_imf.rs @@ -249,6 +249,7 @@ pub fn dc_receive_imf( Ok(()) } +#[allow(clippy::too_many_arguments, clippy::cognitive_complexity)] fn add_parts( context: &Context, mut mime_parser: &mut MimeMessage, @@ -700,6 +701,7 @@ fn save_locations( } } +#[allow(clippy::too_many_arguments)] fn calc_timestamps( context: &Context, chat_id: ChatId, @@ -744,7 +746,7 @@ fn calc_timestamps( /// - create an ad-hoc group based on the recipient list /// /// on success the function returns the found/created (chat_id, chat_blocked) tuple . -#[allow(non_snake_case)] +#[allow(non_snake_case, clippy::cognitive_complexity)] fn create_or_lookup_group( context: &Context, mime_parser: &mut MimeMessage, diff --git a/src/lib.rs b/src/lib.rs index ed0199c6a..a13de4035 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,5 @@ #![forbid(unsafe_code)] #![deny(clippy::correctness, missing_debug_implementations, clippy::all)] -// for now we hide warnings to not clutter/hide errors during "cargo clippy" -#![allow(clippy::cognitive_complexity, clippy::too_many_arguments)] #![allow(clippy::match_bool)] #![feature(ptr_wrapping_offset_from)] #![feature(drain_filter)] diff --git a/src/mimefactory.rs b/src/mimefactory.rs index aeafb8062..ef9b4a44c 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -576,6 +576,7 @@ impl<'a, 'b> MimeFactory<'a, 'b> { }) } + #[allow(clippy::cognitive_complexity)] fn render_message( &mut self, protected_headers: &mut Vec
, diff --git a/src/mimeparser.rs b/src/mimeparser.rs index 1dbd8df48..3031c3f7b 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -175,6 +175,7 @@ impl<'a> MimeMessage<'a> { Ok(parser) } + #[allow(clippy::cognitive_complexity)] fn parse_headers(&mut self) -> Result<()> { if self.get(HeaderDef::AutocryptSetupMessage).is_some() { self.parts.drain_filter(|part| { diff --git a/src/sql.rs b/src/sql.rs index 9b5f34b49..7779b47e6 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -365,6 +365,7 @@ fn table_exists(conn: &Connection, name: impl AsRef) -> Result { Ok(exists) } +#[allow(clippy::cognitive_complexity)] fn open( context: &Context, sql: &Sql,