diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab63e5b162..dbd77e8720 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,9 +103,9 @@ jobs: - os: macos-latest rust: 1.83.0 - # Minimum Supported Rust Version = 1.77.0 + # Minimum Supported Rust Version = 1.81.0 - os: ubuntu-latest - rust: 1.77.0 + rust: 1.81.0 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index 0428022fed..e1f4c53808 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "deltachat" version = "1.151.5" edition = "2021" license = "MPL-2.0" -rust-version = "1.77" +rust-version = "1.81" repository = "https://github.com/deltachat/deltachat-core-rust" [profile.dev] diff --git a/src/chat.rs b/src/chat.rs index d05ce56f7e..b9a3180ecd 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -312,7 +312,7 @@ impl ChatId { /// Create a group or mailinglist raw database record with the given parameters. /// The function does not add SELF nor checks if the record already exists. - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] pub(crate) async fn create_multiuser_record( context: &Context, chattype: Chattype, @@ -4519,7 +4519,7 @@ pub(crate) async fn delete_and_reset_all_device_msgs(context: &Context) -> Resul /// /// For example, it can be a message showing that a member was added to a group. /// Doesn't fail if the chat doesn't exist. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub(crate) async fn add_info_msg_with_cmd( context: &Context, chat_id: ChatId, diff --git a/src/constants.rs b/src/constants.rs index affd7700d3..0987a4bb2a 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,6 +1,6 @@ //! # Constants. -#![allow(missing_docs)] +#![expect(missing_docs)] use deltachat_derive::{FromSql, ToSql}; use once_cell::sync::Lazy; diff --git a/src/contact.rs b/src/contact.rs index 6ce4ecfa9f..61ad7db1f4 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -805,7 +805,6 @@ impl Contact { } let mut name = sanitize_name(name); - #[allow(clippy::collapsible_if)] if origin <= Origin::OutgoingTo { // The user may accidentally have written to a "noreply" address with another MUA: if addr.contains("noreply") diff --git a/src/headerdef.rs b/src/headerdef.rs index b4865dd716..6a45190f0f 100644 --- a/src/headerdef.rs +++ b/src/headerdef.rs @@ -4,7 +4,7 @@ use mailparse::{MailHeader, MailHeaderMap}; #[derive(Debug, Display, Clone, PartialEq, Eq, IntoStaticStr)] #[strum(serialize_all = "kebab_case")] -#[allow(missing_docs)] +#[expect(missing_docs)] pub enum HeaderDef { MessageId, Subject, @@ -111,7 +111,7 @@ impl HeaderDef { } } -#[allow(missing_docs)] +#[expect(missing_docs)] pub trait HeaderDefMap { /// Returns requested header value if it exists. fn get_header_value(&self, headerdef: HeaderDef) -> Option; diff --git a/src/imap.rs b/src/imap.rs index d6319e67dd..13cd222e39 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -1301,7 +1301,7 @@ impl Session { /// Returns the last UID fetched successfully and the info about each downloaded message. /// If the message is incorrect or there is a failure to write a message to the database, /// it is skipped and the error is logged. - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] pub(crate) async fn fetch_many_msgs( &mut self, context: &Context, @@ -2687,7 +2687,6 @@ mod tests { } } - #[allow(clippy::too_many_arguments)] async fn check_target_folder_combination( folder: &str, mvbox_move: bool, diff --git a/src/log.rs b/src/log.rs index b665cf242d..1ba106146d 100644 --- a/src/log.rs +++ b/src/log.rs @@ -1,6 +1,6 @@ //! # Logging. -#![allow(missing_docs)] +#![expect(missing_docs)] use crate::context::Context; diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 52820a1437..3787ee2ca7 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -1047,7 +1047,6 @@ impl MimeFactory { part.body(text) } - #[allow(clippy::cognitive_complexity)] async fn render_message( &mut self, context: &Context, diff --git a/src/mimeparser.rs b/src/mimeparser.rs index 52219a8f0a..ee36511a1c 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -1281,7 +1281,7 @@ impl MimeMessage { Ok(self.parts.len() > old_part_count) } - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] async fn do_add_single_file_part( &mut self, context: &Context, diff --git a/src/param.rs b/src/param.rs index b65cfd1d39..9e746c0038 100644 --- a/src/param.rs +++ b/src/param.rs @@ -374,7 +374,6 @@ impl Params { /// created without copying if the path already refers to a valid /// blob. If so a [BlobObject] will be returned regardless of the /// `create` argument. - #[allow(clippy::needless_lifetimes)] pub async fn get_blob<'a>( &self, key: Param, diff --git a/src/pgp.rs b/src/pgp.rs index f729237d99..804d520c09 100644 --- a/src/pgp.rs +++ b/src/pgp.rs @@ -21,11 +21,9 @@ use tokio::runtime::Handle; use crate::constants::KeyGenType; use crate::key::{DcKey, Fingerprint}; -#[allow(missing_docs)] #[cfg(test)] pub(crate) const HEADER_AUTOCRYPT: &str = "autocrypt-prefer-encrypt"; -#[allow(missing_docs)] pub const HEADER_SETUPCODE: &str = "passphrase-begin"; /// Preferred symmetric encryption algorithm. diff --git a/src/quota.rs b/src/quota.rs index 0070a76ca3..a0e8df346b 100644 --- a/src/quota.rs +++ b/src/quota.rs @@ -187,7 +187,7 @@ mod tests { Ok(()) } - #[allow(clippy::assertions_on_constants)] + #[expect(clippy::assertions_on_constants)] #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn test_quota_thresholds() -> anyhow::Result<()> { assert!(QUOTA_ALLCLEAR_PERCENTAGE > 50); diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 0d2d6ee97d..12a7767502 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -158,7 +158,7 @@ async fn insert_tombstone(context: &Context, rfc724_mid: &str) -> Result /// If `is_partial_download` is set, it contains the full message size in bytes. /// Do not confuse that with `replace_msg_id` that will be set when the full message is loaded /// later. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub(crate) async fn receive_imf_inner( context: &Context, folder: &str, @@ -679,7 +679,7 @@ pub async fn from_field_to_contact_id( /// Creates a `ReceivedMsg` from given parts which might consist of /// multiple messages (if there are multiple attachments). /// Every entry in `mime_parser.parts` produces a new row in the `msgs` table. -#[allow(clippy::too_many_arguments, clippy::cognitive_complexity)] +#[expect(clippy::too_many_arguments)] async fn add_parts( context: &Context, mime_parser: &mut MimeMessage, @@ -1836,7 +1836,7 @@ async fn lookup_chat_by_reply( Ok(Some((parent_chat.id, parent_chat.blocked))) } -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] async fn lookup_chat_or_create_adhoc_group( context: &Context, mime_parser: &MimeMessage, @@ -1971,7 +1971,7 @@ async fn is_probably_private_reply( /// than two members, a new ad hoc group is created. /// /// On success the function returns the created (chat_id, chat_blocked) tuple. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] async fn create_group( context: &Context, mime_parser: &mut MimeMessage, @@ -2091,7 +2091,6 @@ async fn create_group( /// just omitted. /// /// * `is_partial_download` - whether the message is not fully downloaded. -#[allow(clippy::too_many_arguments)] async fn apply_group_changes( context: &Context, mime_parser: &mut MimeMessage, diff --git a/src/smtp.rs b/src/smtp.rs index 7bc51a2780..84b0936426 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -104,7 +104,7 @@ impl Smtp { } /// Connect using the provided login params. - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] pub async fn connect( &mut self, context: &Context, diff --git a/src/smtp/connect.rs b/src/smtp/connect.rs index 5652d14272..869405cd30 100644 --- a/src/smtp/connect.rs +++ b/src/smtp/connect.rs @@ -45,7 +45,7 @@ async fn new_smtp_transport( Ok(transport) } -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub(crate) async fn connect_and_auth( context: &Context, proxy_config: &Option, diff --git a/src/stock_str.rs b/src/stock_str.rs index 9d2ab1a65f..eb07e34ae6 100644 --- a/src/stock_str.rs +++ b/src/stock_str.rs @@ -34,7 +34,7 @@ pub struct StockStrings { /// See the `stock_*` methods on [Context] to use these. /// /// [Context]: crate::context::Context -#[allow(missing_docs)] +#[expect(missing_docs)] #[derive(Debug, Clone, Copy, PartialEq, Eq, FromPrimitive, ToPrimitive, EnumProperty)] #[repr(u32)] pub enum StockMessage { diff --git a/src/tools.rs b/src/tools.rs index bad4cb2529..53d815bbc8 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -1,7 +1,7 @@ //! Some tools and enhancements to the used libraries, there should be //! no references to Context and other "larger" entities here. -#![allow(missing_docs)] +#![expect(missing_docs)] use std::borrow::Cow; use std::io::{Cursor, Write};