From c5262dcf35303c7cceb560981ddb3bd8bea71575 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Thu, 28 Aug 2025 00:57:02 +0200 Subject: [PATCH] Update to rust 1.89 and edition 2024 --- Cargo.lock | 49 +++++++++------------- Cargo.toml | 2 +- Dockerfile | 2 +- automation_cast/Cargo.toml | 2 +- automation_devices/Cargo.toml | 4 +- automation_devices/src/contact_sensor.rs | 4 +- automation_devices/src/hue_switch.rs | 2 +- automation_devices/src/ikea_remote.rs | 2 +- automation_devices/src/light_sensor.rs | 8 ++-- automation_devices/src/washer.rs | 4 +- automation_devices/src/zigbee/light.rs | 6 +-- automation_devices/src/zigbee/outlet.rs | 6 +-- automation_lib/Cargo.toml | 2 +- automation_lib/src/device_manager.rs | 4 +- automation_lib/src/error.rs | 4 +- automation_lib/src/lib.rs | 1 - automation_lib/src/ntfy.rs | 2 +- automation_lib/src/presence.rs | 6 +-- automation_macro/Cargo.toml | 2 +- automation_macro/src/lib.rs | 3 +- automation_macro/src/lua_device_config.rs | 10 ++--- google_home/google_home/Cargo.toml | 2 +- google_home/google_home/src/fulfillment.rs | 8 ++-- google_home/google_home/src/lib.rs | 1 - google_home/google_home/src/traits.rs | 2 +- google_home/google_home_macro/Cargo.toml | 2 +- google_home/google_home_macro/src/lib.rs | 5 +-- rust-toolchain.toml | 2 +- src/web.rs | 2 +- 29 files changed, 68 insertions(+), 81 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa97f71..19f8a58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -782,7 +782,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.0", + "socket2", "tokio", "tower-service", "tracing", @@ -1371,9 +1371,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", "cfg_aliases", @@ -1382,7 +1382,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls 0.23.31", - "socket2 0.5.10", + "socket2", "thiserror 2.0.16", "tokio", "tracing", @@ -1391,9 +1391,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.12" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ "bytes", "getrandom 0.3.3", @@ -1412,16 +1412,16 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1479,9 +1479,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", @@ -1491,9 +1491,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", @@ -1502,9 +1502,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "reqwest" @@ -1835,16 +1835,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.0" @@ -2005,7 +1995,7 @@ dependencies = [ "mio", "pin-project-lite", "slab", - "socket2 0.6.0", + "socket2", "tokio-macros", "windows-sys 0.59.0", ] @@ -2193,13 +2183,14 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.6" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "137a3c834eaf7139b73688502f3f1141a0337c5d8e4d9b536f9b8c796e26a7c4" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 2deee39..1381ad1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "automation" version = "0.1.0" -edition = "2021" +edition = "2024" [workspace] members = [ diff --git a/Dockerfile b/Dockerfile index 2054c8a..8cc4b3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.86 AS base +FROM rust:1.89 AS base ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse RUN cargo install cargo-chef --locked --version 0.1.71 && \ cargo install cargo-auditable --locked --version 0.6.6 diff --git a/automation_cast/Cargo.toml b/automation_cast/Cargo.toml index fb7e7a3..98ee0a8 100644 --- a/automation_cast/Cargo.toml +++ b/automation_cast/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "automation_cast" version = "0.1.0" -edition = "2021" +edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/automation_devices/Cargo.toml b/automation_devices/Cargo.toml index 6f7f558..c696bd0 100644 --- a/automation_devices/Cargo.toml +++ b/automation_devices/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "automation_devices" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] automation_lib = { workspace = true } @@ -17,7 +17,7 @@ tracing = { workspace = true } serde_json = { workspace = true } impls = { workspace = true } serde = { workspace = true } -reqwest = { workspace = true } # Use rustls, since the other packages also use rustls +reqwest = { workspace = true } # Use rustls, since the other packages also use rustls anyhow = { workspace = true } axum = { workspace = true } bytes = { workspace = true } diff --git a/automation_devices/src/contact_sensor.rs b/automation_devices/src/contact_sensor.rs index 758976c..f35598e 100644 --- a/automation_devices/src/contact_sensor.rs +++ b/automation_devices/src/contact_sensor.rs @@ -68,11 +68,11 @@ pub struct ContactSensor { } impl ContactSensor { - async fn state(&self) -> RwLockReadGuard { + async fn state(&self) -> RwLockReadGuard<'_, State> { self.state.read().await } - async fn state_mut(&self) -> RwLockWriteGuard { + async fn state_mut(&self) -> RwLockWriteGuard<'_, State> { self.state.write().await } } diff --git a/automation_devices/src/hue_switch.rs b/automation_devices/src/hue_switch.rs index e4174ec..d881f08 100644 --- a/automation_devices/src/hue_switch.rs +++ b/automation_devices/src/hue_switch.rs @@ -5,7 +5,7 @@ use automation_lib::device::{Device, LuaDeviceCreate}; use automation_lib::event::OnMqtt; use automation_lib::mqtt::WrappedAsyncClient; use automation_macro::LuaDeviceConfig; -use rumqttc::{matches, Publish}; +use rumqttc::{Publish, matches}; use serde::Deserialize; use tracing::{debug, trace, warn}; diff --git a/automation_devices/src/ikea_remote.rs b/automation_devices/src/ikea_remote.rs index c81c508..58c2350 100644 --- a/automation_devices/src/ikea_remote.rs +++ b/automation_devices/src/ikea_remote.rs @@ -6,7 +6,7 @@ use automation_lib::messages::{RemoteAction, RemoteMessage}; use automation_lib::mqtt::WrappedAsyncClient; use automation_macro::LuaDeviceConfig; use axum::async_trait; -use rumqttc::{matches, Publish}; +use rumqttc::{Publish, matches}; use tracing::{debug, error, trace}; #[derive(Debug, Clone, LuaDeviceConfig)] diff --git a/automation_devices/src/light_sensor.rs b/automation_devices/src/light_sensor.rs index c979742..feb034d 100644 --- a/automation_devices/src/light_sensor.rs +++ b/automation_devices/src/light_sensor.rs @@ -38,11 +38,11 @@ pub struct LightSensor { } impl LightSensor { - async fn state(&self) -> RwLockReadGuard { + async fn state(&self) -> RwLockReadGuard<'_, State> { self.state.read().await } - async fn state_mut(&self) -> RwLockWriteGuard { + async fn state_mut(&self) -> RwLockWriteGuard<'_, State> { self.state.write().await } } @@ -99,9 +99,7 @@ impl OnMqtt for LightSensor { let is_dark = self.state().await.is_dark; trace!( "In between min ({}) and max ({}) value, keeping current state: {}", - self.config.min, - self.config.max, - is_dark + self.config.min, self.config.max, is_dark ); is_dark }; diff --git a/automation_devices/src/washer.rs b/automation_devices/src/washer.rs index 00ff394..c7f2934 100644 --- a/automation_devices/src/washer.rs +++ b/automation_devices/src/washer.rs @@ -38,11 +38,11 @@ pub struct Washer { } impl Washer { - async fn state(&self) -> RwLockReadGuard { + async fn state(&self) -> RwLockReadGuard<'_, State> { self.state.read().await } - async fn state_mut(&self) -> RwLockWriteGuard { + async fn state_mut(&self) -> RwLockWriteGuard<'_, State> { self.state.write().await } } diff --git a/automation_devices/src/zigbee/light.rs b/automation_devices/src/zigbee/light.rs index 5aa3bfd..5bcc3cb 100644 --- a/automation_devices/src/zigbee/light.rs +++ b/automation_devices/src/zigbee/light.rs @@ -15,7 +15,7 @@ use google_home::device; use google_home::errors::ErrorCode; use google_home::traits::{Brightness, Color, ColorSetting, ColorTemperatureRange, OnOff}; use google_home::types::Type; -use rumqttc::{matches, Publish}; +use rumqttc::{Publish, matches}; use serde::{Deserialize, Serialize}; use serde_json::json; use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; @@ -100,11 +100,11 @@ pub type LightBrightness = Light; pub type LightColorTemperature = Light; impl Light { - async fn state(&self) -> RwLockReadGuard { + async fn state(&self) -> RwLockReadGuard<'_, T> { self.state.read().await } - async fn state_mut(&self) -> RwLockWriteGuard { + async fn state_mut(&self) -> RwLockWriteGuard<'_, T> { self.state.write().await } } diff --git a/automation_devices/src/zigbee/outlet.rs b/automation_devices/src/zigbee/outlet.rs index c83c192..9f22df4 100644 --- a/automation_devices/src/zigbee/outlet.rs +++ b/automation_devices/src/zigbee/outlet.rs @@ -15,7 +15,7 @@ use google_home::device; use google_home::errors::ErrorCode; use google_home::traits::OnOff; use google_home::types::Type; -use rumqttc::{matches, Publish}; +use rumqttc::{Publish, matches}; use serde::{Deserialize, Serialize}; use serde_json::json; use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; @@ -95,11 +95,11 @@ pub type OutletOnOff = Outlet; pub type OutletPower = Outlet; impl Outlet { - async fn state(&self) -> RwLockReadGuard { + async fn state(&self) -> RwLockReadGuard<'_, T> { self.state.read().await } - async fn state_mut(&self) -> RwLockWriteGuard { + async fn state_mut(&self) -> RwLockWriteGuard<'_, T> { self.state.write().await } } diff --git a/automation_lib/Cargo.toml b/automation_lib/Cargo.toml index cdfb48c..e95074a 100644 --- a/automation_lib/Cargo.toml +++ b/automation_lib/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "automation_lib" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] automation_macro = { workspace = true } diff --git a/automation_lib/src/device_manager.rs b/automation_lib/src/device_manager.rs index 497f30a..329b51c 100644 --- a/automation_lib/src/device_manager.rs +++ b/automation_lib/src/device_manager.rs @@ -2,8 +2,8 @@ use std::collections::HashMap; use std::pin::Pin; use std::sync::Arc; -use futures::future::join_all; use futures::Future; +use futures::future::join_all; use tokio::sync::{RwLock, RwLockReadGuard}; use tokio_cron_scheduler::{Job, JobScheduler}; use tracing::{debug, instrument, trace}; @@ -64,7 +64,7 @@ impl DeviceManager { self.devices.read().await.get(name).cloned() } - pub async fn devices(&self) -> RwLockReadGuard { + pub async fn devices(&self) -> RwLockReadGuard<'_, DeviceMap> { self.devices.read().await } diff --git a/automation_lib/src/error.rs b/automation_lib/src/error.rs index a95cb71..2f4549c 100644 --- a/automation_lib/src/error.rs +++ b/automation_lib/src/error.rs @@ -38,7 +38,9 @@ impl fmt::Display for MissingEnv { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "Missing environment variable")?; if self.keys.is_empty() { - unreachable!("This error should only be returned if there are actually missing environment variables"); + unreachable!( + "This error should only be returned if there are actually missing environment variables" + ); } if self.keys.len() == 1 { write!(f, " '{}'", self.keys[0])?; diff --git a/automation_lib/src/lib.rs b/automation_lib/src/lib.rs index 93051c7..7ea97fa 100644 --- a/automation_lib/src/lib.rs +++ b/automation_lib/src/lib.rs @@ -1,6 +1,5 @@ #![allow(incomplete_features)] #![feature(specialization)] -#![feature(let_chains)] pub mod action_callback; pub mod config; diff --git a/automation_lib/src/ntfy.rs b/automation_lib/src/ntfy.rs index f337329..27c209b 100644 --- a/automation_lib/src/ntfy.rs +++ b/automation_lib/src/ntfy.rs @@ -9,7 +9,7 @@ use serde::Serialize; use serde_repr::*; use tracing::{error, trace, warn}; -use crate::device::{impl_device, Device, LuaDeviceCreate}; +use crate::device::{Device, LuaDeviceCreate, impl_device}; use crate::event::{self, Event, EventChannel, OnNotification, OnPresence}; #[derive(Debug, Serialize_repr, Clone, Copy)] diff --git a/automation_lib/src/presence.rs b/automation_lib/src/presence.rs index de4fd6d..bd07aae 100644 --- a/automation_lib/src/presence.rs +++ b/automation_lib/src/presence.rs @@ -10,7 +10,7 @@ use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use tracing::{debug, trace, warn}; use crate::config::MqttDeviceConfig; -use crate::device::{impl_device, Device, LuaDeviceCreate}; +use crate::device::{Device, LuaDeviceCreate, impl_device}; use crate::event::{self, Event, EventChannel, OnMqtt}; use crate::messages::PresenceMessage; use crate::mqtt::WrappedAsyncClient; @@ -40,11 +40,11 @@ pub struct Presence { } impl Presence { - async fn state(&self) -> RwLockReadGuard { + async fn state(&self) -> RwLockReadGuard<'_, State> { self.state.read().await } - async fn state_mut(&self) -> RwLockWriteGuard { + async fn state_mut(&self) -> RwLockWriteGuard<'_, State> { self.state.write().await } } diff --git a/automation_macro/Cargo.toml b/automation_macro/Cargo.toml index 339abbd..d8f8318 100644 --- a/automation_macro/Cargo.toml +++ b/automation_macro/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "automation_macro" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] proc-macro = true diff --git a/automation_macro/src/lib.rs b/automation_macro/src/lib.rs index 8ade07f..261b5a4 100644 --- a/automation_macro/src/lib.rs +++ b/automation_macro/src/lib.rs @@ -1,9 +1,8 @@ -#![feature(let_chains)] #![feature(iter_intersperse)] mod lua_device_config; use lua_device_config::impl_lua_device_config_macro; -use syn::{parse_macro_input, DeriveInput}; +use syn::{DeriveInput, parse_macro_input}; #[proc_macro_derive(LuaDeviceConfig, attributes(device_config))] pub fn lua_device_config_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { diff --git a/automation_macro/src/lua_device_config.rs b/automation_macro/src/lua_device_config.rs index 6dc12a1..7987a1e 100644 --- a/automation_macro/src/lua_device_config.rs +++ b/automation_macro/src/lua_device_config.rs @@ -6,8 +6,8 @@ use syn::punctuated::Punctuated; use syn::spanned::Spanned; use syn::token::Paren; use syn::{ - parenthesized, Data, DataStruct, DeriveInput, Expr, Field, Fields, FieldsNamed, LitStr, Result, - Token, Type, + Data, DataStruct, DeriveInput, Expr, Field, Fields, FieldsNamed, LitStr, Result, Token, Type, + parenthesized, }; mod kw { @@ -155,7 +155,7 @@ fn field_from_lua(field: &Field) -> TokenStream { [] => field.ident.clone().unwrap().to_string(), [rename] => rename.to_owned(), _ => { - return quote_spanned! {field.span() => compile_error!("Field contains duplicate 'rename'")} + return quote_spanned! {field.span() => compile_error!("Field contains duplicate 'rename'")}; } }; @@ -174,7 +174,7 @@ fn field_from_lua(field: &Field) -> TokenStream { [] => quote! {panic!(#missing)}, [default] => default.to_owned(), _ => { - return quote_spanned! {field.span() => compile_error!("Field contains duplicate 'default'")} + return quote_spanned! {field.span() => compile_error!("Field contains duplicate 'default'")}; } }; @@ -232,7 +232,7 @@ fn field_from_lua(field: &Field) -> TokenStream { [] => value, [value] => value.to_owned(), _ => { - return quote_spanned! {field.span() => compile_error!("Only one of either 'from' or 'with' is allowed")} + return quote_spanned! {field.span() => compile_error!("Only one of either 'from' or 'with' is allowed")}; } }; diff --git a/google_home/google_home/Cargo.toml b/google_home/google_home/Cargo.toml index 8b66e4c..0791c55 100644 --- a/google_home/google_home/Cargo.toml +++ b/google_home/google_home/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "google_home" version = "0.1.0" -edition = "2021" +edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/google_home/google_home/src/fulfillment.rs b/google_home/google_home/src/fulfillment.rs index 66d0bb0..89828ff 100644 --- a/google_home/google_home/src/fulfillment.rs +++ b/google_home/google_home/src/fulfillment.rs @@ -2,14 +2,14 @@ use std::collections::HashMap; use std::sync::Arc; use automation_cast::Cast; -use futures::future::{join_all, OptionFuture}; +use futures::future::{OptionFuture, join_all}; use thiserror::Error; use tokio::sync::Mutex; +use crate::Device; use crate::errors::{DeviceError, ErrorCode}; use crate::request::{self, Intent, Request}; -use crate::response::{self, execute, query, sync, Response, ResponsePayload}; -use crate::Device; +use crate::response::{self, Response, ResponsePayload, execute, query, sync}; #[derive(Debug)] pub struct GoogleHome { @@ -64,7 +64,7 @@ impl GoogleHome { devices: &HashMap>, ) -> sync::Payload { let mut resp_payload = sync::Payload::new(&self.user_id); - let f = devices.iter().map(|(_, device)| async move { + let f = devices.values().map(|device| async move { if let Some(device) = device.as_ref().cast() { Some(Device::sync(device).await) } else { diff --git a/google_home/google_home/src/lib.rs b/google_home/google_home/src/lib.rs index fea5720..b91721e 100644 --- a/google_home/google_home/src/lib.rs +++ b/google_home/google_home/src/lib.rs @@ -1,6 +1,5 @@ #![allow(incomplete_features)] #![feature(specialization)] -#![feature(let_chains)] pub mod device; mod fulfillment; diff --git a/google_home/google_home/src/traits.rs b/google_home/google_home/src/traits.rs index ca576f0..0357771 100644 --- a/google_home/google_home/src/traits.rs +++ b/google_home/google_home/src/traits.rs @@ -3,8 +3,8 @@ use automation_cast::Cast; use google_home_macro::traits; use serde::{Deserialize, Serialize}; -use crate::errors::ErrorCode; use crate::Device; +use crate::errors::ErrorCode; traits! { Device, diff --git a/google_home/google_home_macro/Cargo.toml b/google_home/google_home_macro/Cargo.toml index 60b8a15..8641529 100644 --- a/google_home/google_home_macro/Cargo.toml +++ b/google_home/google_home_macro/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "google_home_macro" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] proc-macro = true diff --git a/google_home/google_home_macro/src/lib.rs b/google_home/google_home_macro/src/lib.rs index d0da73a..afe88e9 100644 --- a/google_home/google_home_macro/src/lib.rs +++ b/google_home/google_home_macro/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(let_chains)] #![feature(iter_intersperse)] use proc_macro::TokenStream; use quote::quote; @@ -6,8 +5,8 @@ use syn::parse::Parse; use syn::punctuated::Punctuated; use syn::token::Brace; use syn::{ - braced, parse_macro_input, GenericArgument, Ident, LitStr, Path, PathArguments, PathSegment, - ReturnType, Signature, Token, Type, TypePath, + GenericArgument, Ident, LitStr, Path, PathArguments, PathSegment, ReturnType, Signature, Token, + Type, TypePath, braced, parse_macro_input, }; mod kw { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 74f7654..8f34934 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2024-12-06" +channel = "nightly-2025-08-20" components = ["rustfmt", "clippy", "rust-analyzer"] profile = "minimal" diff --git a/src/web.rs b/src/web.rs index a8c0c53..9b17161 100644 --- a/src/web.rs +++ b/src/web.rs @@ -2,9 +2,9 @@ use std::result; use axum::async_trait; use axum::extract::{FromRef, FromRequestParts}; +use axum::http::StatusCode; use axum::http::request::Parts; use axum::http::status::InvalidStatusCode; -use axum::http::StatusCode; use axum::response::IntoResponse; use serde::{Deserialize, Serialize}; use thiserror::Error;