diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41c4cc2aa..c87f6a8ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: name: Lint Rust runs-on: ubuntu-latest env: - RUSTUP_TOOLCHAIN: 1.79.0 + RUSTUP_TOOLCHAIN: 1.80.0 steps: - uses: actions/checkout@v4 with: @@ -95,11 +95,11 @@ jobs: matrix: include: - os: ubuntu-latest - rust: 1.79.0 + rust: 1.80.0 - os: windows-latest - rust: 1.79.0 + rust: 1.80.0 - os: macos-latest - rust: 1.79.0 + rust: 1.80.0 # Minimum Supported Rust Version = 1.77.0 - os: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 958cc6b1e..8b65eb696 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -190,3 +190,6 @@ vendored = [ "rusqlite/bundled-sqlcipher-vendored-openssl", "reqwest/native-tls-vendored" ] + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index 09cd4acf4..4e2b0745e 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -4418,7 +4418,7 @@ trait ResultExt { /// Like `log_err()`, but: /// - returns the default value instead of an Err value. /// - emits an error instead of a warning for an [Err] result. This means - /// that the error will be shown to the user in a small pop-up. + /// that the error will be shown to the user in a small pop-up. fn unwrap_or_log_default(self, context: &context::Context, message: &str) -> T; } diff --git a/scripts/coredeps/install-rust.sh b/scripts/coredeps/install-rust.sh index 2a5dbba3a..488160800 100755 --- a/scripts/coredeps/install-rust.sh +++ b/scripts/coredeps/install-rust.sh @@ -7,7 +7,7 @@ set -euo pipefail # # Avoid using rustup here as it depends on reading /proc/self/exe and # has problems running under QEMU. -RUST_VERSION=1.79.0 +RUST_VERSION=1.80.0 ARCH="$(uname -m)" test -f "/lib/libc.musl-$ARCH.so.1" && LIBC=musl || LIBC=gnu diff --git a/src/chatlist.rs b/src/chatlist.rs index 5878b8907..f1ad18d90 100644 --- a/src/chatlist.rs +++ b/src/chatlist.rs @@ -82,11 +82,13 @@ impl Chatlist { /// not needed when DC_GCL_ARCHIVED_ONLY is already set) /// - if the flag DC_GCL_ADD_ALLDONE_HINT is set, DC_CHAT_ID_ALLDONE_HINT /// is added as needed. + /// /// `query`: An optional query for filtering the list. Only chats matching this query - /// are returned. When `is:unread` is contained in the query, the chatlist is - /// filtered such that only chats with unread messages show up. + /// are returned. When `is:unread` is contained in the query, the chatlist is + /// filtered such that only chats with unread messages show up. + /// /// `query_contact_id`: An optional contact ID for filtering the list. Only chats including this contact ID - /// are returned. + /// are returned. pub async fn try_load( context: &Context, listflags: usize, diff --git a/src/contact.rs b/src/contact.rs index c6435c225..7a6a32112 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -747,7 +747,7 @@ impl Contact { /// - "name": name passed as function argument, belonging to the given origin /// - "row_name": current name used in the database, typically set to "name" /// - "row_authname": name as authorized from a contact, set only through a From-header - /// Depending on the origin, both, "row_name" and "row_authname" are updated from "name". + /// Depending on the origin, both, "row_name" and "row_authname" are updated from "name". /// /// Returns the contact_id and a `Modifier` value indicating if a modification occurred. pub(crate) async fn add_or_lookup( @@ -997,7 +997,7 @@ impl Contact { /// - if the flag DC_GCL_ADD_SELF is set, SELF is added to the list unless filtered by other parameters /// - if the flag DC_GCL_VERIFIED_ONLY is set, only verified contacts are returned. /// if DC_GCL_VERIFIED_ONLY is not set, verified and unverified contacts are returned. - /// `query` is a string to filter the list. + /// `query` is a string to filter the list. pub async fn get_all( context: &Context, listflags: u32, diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 23496b3d3..ef051a99e 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -632,9 +632,9 @@ pub(crate) async fn receive_imf_inner( /// Also returns whether it is blocked or not and its origin. /// /// * `prevent_rename`: if true, the display_name of this contact will not be changed. Useful for -/// mailing lists: In some mailing lists, many users write from the same address but with different -/// display names. We don't want the display name to change every time the user gets a new email from -/// a mailing list. +/// mailing lists: In some mailing lists, many users write from the same address but with different +/// display names. We don't want the display name to change every time the user gets a new email from +/// a mailing list. /// /// Returns `None` if From field does not contain a valid contact address. pub async fn from_field_to_contact_id( diff --git a/src/sql.rs b/src/sql.rs index b6a42f767..48a732344 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -350,12 +350,12 @@ impl Sql { /// /// 1. As mentioned above, SQLite's locking mechanism is non-async and sleeps in a loop. /// 2. If there are other write transactions, we block the db connection until - /// upgraded. If some reader comes then, it has to get the next, less used connection with a - /// worse per-connection page cache (SQLite allows one write and any number of reads in parallel). + /// upgraded. If some reader comes then, it has to get the next, less used connection with a + /// worse per-connection page cache (SQLite allows one write and any number of reads in parallel). /// 3. If a transaction is blocked for more than `busy_timeout`, it fails with SQLITE_BUSY. /// 4. If upon a successful upgrade to a write transaction the db has been modified, - /// the transaction has to be rolled back and retried, which means extra work in terms of - /// CPU/battery. + /// the transaction has to be rolled back and retried, which means extra work in terms of + /// CPU/battery. /// /// The only pro of making write transactions DEFERRED w/o the external locking would be some /// parallelism between them. diff --git a/src/tools.rs b/src/tools.rs index 36cff5359..92b5deeda 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -258,6 +258,7 @@ async fn maybe_warn_on_outdated(context: &Context, now: i64, approx_compile_time /// Generate an ID. The generated ID should be as short and as unique as possible: /// - short, because it may also used as part of Message-ID headers or in QR codes /// - unique as two IDs generated on two devices should not be the same. However, collisions are not world-wide but only by the few contacts. +/// /// IDs generated by this function are 66 bit wide and are returned as 11 base64 characters. /// /// Additional information when used as a message-id or group-id: