From 9014e43ce1eece1b712ec7236655578a85d38cf6 Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Fri, 21 Jun 2024 08:29:33 +0100 Subject: [PATCH] chore: bump rust to 1.79.0 and apply new lints --- Cargo.toml | 2 +- complement/Dockerfile | 2 +- flake.nix | 2 +- rust-toolchain.toml | 3 +-- src/service/media/mod.rs | 14 ++++++-------- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c74773a0..67128f07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ repository = "https://gitlab.com/famedly/conduit" version = "0.9.0-alpha" # See also `rust-toolchain.toml` -rust-version = "1.78.0" +rust-version = "1.79.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/complement/Dockerfile b/complement/Dockerfile index 341470af..e7cde40e 100644 --- a/complement/Dockerfile +++ b/complement/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.78.0 +FROM rust:1.79.0 WORKDIR /workdir diff --git a/flake.nix b/flake.nix index 91325443..f36f7e7a 100644 --- a/flake.nix +++ b/flake.nix @@ -59,7 +59,7 @@ file = ./rust-toolchain.toml; # See also `rust-toolchain.toml` - sha256 = "sha256-opUgs6ckUQCyDxcB9Wy51pqhd0MPGHUVbwRKKPGiwZU="; + sha256 = "sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU="; }; }); in diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3ffd3a5e..957c8f41 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,7 +2,6 @@ # # Other files that need upkeep when this changes: # -# * `.gitlab-ci.yml` # * `Cargo.toml` # * `flake.nix` # @@ -10,7 +9,7 @@ # If you're having trouble making the relevant changes, bug a maintainer. [toolchain] -channel = "1.78.0" +channel = "1.79.0" components = [ # For rust-analyzer "rust-src", diff --git a/src/service/media/mod.rs b/src/service/media/mod.rs index 0340ab49..1a80400c 100644 --- a/src/service/media/mod.rs +++ b/src/service/media/mod.rs @@ -166,22 +166,20 @@ impl Service { / u64::from(original_height) }; if use_width { - if intermediate <= u64::from(::std::u32::MAX) { + if intermediate <= u64::from(u32::MAX) { (width, intermediate as u32) } else { ( - (u64::from(width) * u64::from(::std::u32::MAX) / intermediate) - as u32, - ::std::u32::MAX, + (u64::from(width) * u64::from(u32::MAX) / intermediate) as u32, + u32::MAX, ) } - } else if intermediate <= u64::from(::std::u32::MAX) { + } else if intermediate <= u64::from(u32::MAX) { (intermediate as u32, height) } else { ( - ::std::u32::MAX, - (u64::from(height) * u64::from(::std::u32::MAX) / intermediate) - as u32, + u32::MAX, + (u64::from(height) * u64::from(u32::MAX) / intermediate) as u32, ) } };