From 36bba029f43b92278794f9c92dcce815c791bb1c Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 1 Mar 2025 00:50:59 +0100 Subject: [PATCH] Update to rust edition 2024 --- Cargo.toml | 5 ++--- mark-bin/Cargo.toml | 12 ++++++------ mark/Cargo.toml | 10 +++++----- mark/src/dither.rs | 4 ++-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3f83e66..0f33bcc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [workspace] -resolver = "2" +resolver = "3" members = ["mark", "mark-bin"] [workspace.package] version = "0.0.0" -edition = "2021" +edition = "2024" [workspace.dependencies] clap = { version = "4.5.21", features = ["derive", "deprecated"] } @@ -28,7 +28,6 @@ rust.redundant_imports = "warn" rust.redundant_lifetimes = "warn" rust.single_use_lifetimes = "warn" rust.unit_bindings = "warn" -rust.unnameable_types = "warn" rust.unused_crate_dependencies = "warn" rust.unused_import_braces = "warn" rust.unused_lifetimes = "warn" diff --git a/mark-bin/Cargo.toml b/mark-bin/Cargo.toml index 46bce1e..21d9c32 100644 --- a/mark-bin/Cargo.toml +++ b/mark-bin/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "mark-bin" -version.workspace = true -edition.workspace = true +version = { workspace = true } +edition = { workspace = true } [dependencies] -clap.workspace = true -image.workspace = true -mark.workspace = true -palette.workspace = true +clap = { workspace = true } +image = { workspace = true } +mark = { workspace = true } +palette = { workspace = true } [lints] workspace = true diff --git a/mark/Cargo.toml b/mark/Cargo.toml index 2accefd..c16215b 100644 --- a/mark/Cargo.toml +++ b/mark/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "mark" -version.workspace = true -edition.workspace = true +version = { workspace = true } +edition = { workspace = true } [dependencies] -image.workspace = true -palette.workspace = true -rand.workspace = true +image = { workspace = true } +palette = { workspace = true } +rand = { workspace = true } [lints] workspace = true diff --git a/mark/src/dither.rs b/mark/src/dither.rs index 9031b4e..ef334c8 100644 --- a/mark/src/dither.rs +++ b/mark/src/dither.rs @@ -9,10 +9,10 @@ use std::marker::PhantomData; use image::RgbaImage; use palette::{ - color_difference::{Ciede2000, HyAb}, Clamp, IntoColor, Lab, Srgb, + color_difference::{Ciede2000, HyAb}, }; -use rand::{rngs::SmallRng, Rng, SeedableRng}; +use rand::{Rng, SeedableRng, rngs::SmallRng}; use crate::util;