Skip to content

Commit

Permalink
Merge <#6346>
Browse files Browse the repository at this point in the history
Downgrade Rust used for release builds.
  • Loading branch information
link2xt committed Dec 17, 2024
2 parents 6cd6aca + 5069b58 commit 67e16d0
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ jobs:
- os: macos-latest
rust: 1.83.0

# Minimum Supported Rust Version = 1.81.0
# Minimum Supported Rust Version = 1.77.0
- os: ubuntu-latest
rust: 1.81.0
rust: 1.77.0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "deltachat"
version = "1.152.0"
edition = "2021"
license = "MPL-2.0"
rust-version = "1.81"
rust-version = "1.77"
repository = "https://github.com/deltachat/deltachat-core-rust"

[profile.dev]
Expand Down
62 changes: 58 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
description = "Delta Chat core";
inputs = {
fenix.url = "github:nix-community/fenix";
# Old Rust to build releases.
fenix.url = "github:nix-community/fenix?rev=85f4139f3c092cf4afd9f9906d7ed218ef262c97";

# New Rust for development shell.
new-fenix.url = "github:nix-community/fenix";

flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
nix-filter.url = "github:numtide/nix-filter";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
android.url = "github:tadfisher/android-nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, nix-filter, naersk, fenix, android }:
outputs = { self, nixpkgs, flake-utils, nix-filter, naersk, fenix, new-fenix, android }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
Expand Down Expand Up @@ -539,13 +544,13 @@
let
pkgs = import nixpkgs {
system = system;
overlays = [ fenix.overlays.default ];
overlays = [ new-fenix.overlays.default ];
};
in
pkgs.mkShell {

buildInputs = with pkgs; [
(fenix.packages.${system}.complete.withComponents [
(new-fenix.packages.${system}.complete.withComponents [
"cargo"
"clippy"
"rust-src"
Expand Down
4 changes: 2 additions & 2 deletions src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub(crate) async fn create_multiuser_record(
context: &Context,
chattype: Chattype,
Expand Down Expand Up @@ -4444,7 +4444,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.
#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub(crate) async fn add_info_msg_with_cmd(
context: &Context,
chat_id: ChatId,
Expand Down
1 change: 1 addition & 0 deletions src/contact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,7 @@ 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")
Expand Down
3 changes: 2 additions & 1 deletion src/imap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub(crate) async fn fetch_many_msgs(
&mut self,
context: &Context,
Expand Down Expand Up @@ -2689,6 +2689,7 @@ mod tests {
}
}

#[allow(clippy::too_many_arguments)]
async fn check_target_folder_combination(
folder: &str,
mvbox_move: bool,
Expand Down
1 change: 1 addition & 0 deletions src/mimefactory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ impl MimeFactory {
part.body(text)
}

#[allow(clippy::cognitive_complexity)]
async fn render_message(
&mut self,
context: &Context,
Expand Down
2 changes: 1 addition & 1 deletion src/mimeparser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ impl MimeMessage {
Ok(self.parts.len() > old_part_count)
}

#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
async fn do_add_single_file_part(
&mut self,
context: &Context,
Expand Down
1 change: 1 addition & 0 deletions src/param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ impl Params {
/// Note that in the [ParamsFile::FsPath] case the blob can be
/// created without copying if the path already refers to a valid
/// blob. If so a [BlobObject] will be returned.
#[allow(clippy::needless_lifetimes)]
pub async fn get_blob<'a>(
&self,
key: Param,
Expand Down
2 changes: 2 additions & 0 deletions src/pgp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ 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.
Expand Down
2 changes: 1 addition & 1 deletion src/quota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ mod tests {
Ok(())
}

#[expect(clippy::assertions_on_constants)]
#[allow(clippy::assertions_on_constants)]
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_quota_thresholds() -> anyhow::Result<()> {
assert!(QUOTA_ALLCLEAR_PERCENTAGE > 50);
Expand Down
9 changes: 5 additions & 4 deletions src/receive_imf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async fn insert_tombstone(context: &Context, rfc724_mid: &str) -> Result<MsgId>
/// 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.
#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub(crate) async fn receive_imf_inner(
context: &Context,
folder: &str,
Expand Down Expand Up @@ -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.
#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments, clippy::cognitive_complexity)]
async fn add_parts(
context: &Context,
mime_parser: &mut MimeMessage,
Expand Down Expand Up @@ -1834,7 +1834,7 @@ async fn lookup_chat_by_reply(
Ok(Some((parent_chat.id, parent_chat.blocked)))
}

#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
async fn lookup_chat_or_create_adhoc_group(
context: &Context,
mime_parser: &MimeMessage,
Expand Down Expand Up @@ -1969,7 +1969,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.
#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
async fn create_group(
context: &Context,
mime_parser: &mut MimeMessage,
Expand Down Expand Up @@ -2089,6 +2089,7 @@ 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,
Expand Down
2 changes: 1 addition & 1 deletion src/smtp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl Smtp {
}

/// Connect using the provided login params.
#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub async fn connect(
&mut self,
context: &Context,
Expand Down
2 changes: 1 addition & 1 deletion src/smtp/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async fn new_smtp_transport<S: AsyncBufRead + AsyncWrite + Unpin>(
Ok(transport)
}

#[expect(clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub(crate) async fn connect_and_auth(
context: &Context,
proxy_config: &Option<ProxyConfig>,
Expand Down

0 comments on commit 67e16d0

Please sign in to comment.