mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
Reduce the scope of clippy exceptions
This prevents creation of new overly complex functions.
This commit is contained in:
committed by
holger krekel
parent
0f52f63863
commit
1732c3b350
@@ -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.",);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -576,6 +576,7 @@ impl<'a, 'b> MimeFactory<'a, 'b> {
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(clippy::cognitive_complexity)]
|
||||
fn render_message(
|
||||
&mut self,
|
||||
protected_headers: &mut Vec<Header>,
|
||||
|
||||
@@ -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| {
|
||||
|
||||
@@ -365,6 +365,7 @@ fn table_exists(conn: &Connection, name: impl AsRef<str>) -> Result<bool> {
|
||||
Ok(exists)
|
||||
}
|
||||
|
||||
#[allow(clippy::cognitive_complexity)]
|
||||
fn open(
|
||||
context: &Context,
|
||||
sql: &Sql,
|
||||
|
||||
Reference in New Issue
Block a user