From 4c940fa925a7df52c80e4c7c31a19db45c9bf1f3 Mon Sep 17 00:00:00 2001 From: alyssa Date: Mon, 1 Sep 2025 03:36:13 +0000 Subject: [PATCH] chore: bump rust edition to 2024 --- ci/Dockerfile.rust | 2 +- crates/api/Cargo.toml | 2 +- crates/api/src/endpoints/private.rs | 3 ++- crates/api/src/endpoints/system.rs | 6 +++--- crates/api/src/main.rs | 6 ++---- crates/api/src/middleware/auth.rs | 2 +- crates/api/src/middleware/logger.rs | 2 +- crates/api/src/middleware/params.rs | 6 +++--- crates/api/src/util.rs | 2 +- crates/avatars/Cargo.toml | 2 +- crates/avatars/src/main.rs | 4 ++-- crates/avatars/src/process.rs | 2 +- crates/avatars/src/pull.rs | 4 ++-- crates/dispatch/Cargo.toml | 2 +- crates/dispatch/src/logger.rs | 2 +- crates/dispatch/src/main.rs | 9 ++++----- crates/gateway/Cargo.toml | 2 +- crates/gateway/src/api.rs | 6 +++--- crates/gateway/src/discord/cache.rs | 4 ++-- crates/gateway/src/discord/gateway.rs | 6 +++--- crates/gateway/src/event_awaiter.rs | 12 +++++++++--- crates/gateway/src/logger.rs | 2 +- crates/gateway/src/main.rs | 3 +-- crates/gdpr_worker/Cargo.toml | 2 +- crates/gdpr_worker/src/main.rs | 4 +--- crates/libpk/Cargo.toml | 2 +- crates/libpk/src/_config.rs | 6 +++--- crates/libpk/src/db/repository/avatars.rs | 2 +- crates/libpk/src/db/types/avatars.rs | 2 +- crates/libpk/src/lib.rs | 3 +-- crates/macros/Cargo.toml | 2 +- crates/macros/src/api.rs | 4 ++-- crates/macros/src/model.rs | 2 +- crates/migrate/Cargo.toml | 2 +- crates/migrate/src/main.rs | 2 -- crates/models/Cargo.toml | 2 +- crates/models/src/lib.rs | 2 +- crates/scheduled_tasks/Cargo.toml | 2 +- 38 files changed, 64 insertions(+), 66 deletions(-) diff --git a/ci/Dockerfile.rust b/ci/Dockerfile.rust index e320fb00..063cb6ea 100644 --- a/ci/Dockerfile.rust +++ b/ci/Dockerfile.rust @@ -4,7 +4,7 @@ WORKDIR /build RUN apk add rustup build-base # todo: arm64 target -RUN rustup-init --default-host x86_64-unknown-linux-musl --default-toolchain nightly-2024-08-20 --profile default -y +RUN rustup-init --default-host x86_64-unknown-linux-musl --default-toolchain nightly-2025-08-22 --profile default -y ENV PATH=/root/.cargo/bin:$PATH ENV RUSTFLAGS='-C link-arg=-s' diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml index 9413d62c..b19bfe74 100644 --- a/crates/api/Cargo.toml +++ b/crates/api/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "api" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] pluralkit_models = { path = "../models" } diff --git a/crates/api/src/endpoints/private.rs b/crates/api/src/endpoints/private.rs index 067fef57..2116e3c5 100644 --- a/crates/api/src/endpoints/private.rs +++ b/crates/api/src/endpoints/private.rs @@ -4,9 +4,10 @@ use fred::interfaces::*; use libpk::state::ShardState; use pk_macros::api_endpoint; use serde::Deserialize; -use serde_json::{json, Value}; +use serde_json::{Value, json}; use std::collections::HashMap; +#[allow(dead_code)] #[derive(Deserialize)] #[serde(rename_all = "PascalCase")] struct ClusterStats { diff --git a/crates/api/src/endpoints/system.rs b/crates/api/src/endpoints/system.rs index 7b919df5..58c9a154 100644 --- a/crates/api/src/endpoints/system.rs +++ b/crates/api/src/endpoints/system.rs @@ -1,11 +1,11 @@ -use axum::{extract::State, response::IntoResponse, Extension, Json}; +use axum::{Extension, Json, extract::State, response::IntoResponse}; use pk_macros::api_endpoint; -use serde_json::{json, Value}; +use serde_json::{Value, json}; use sqlx::Postgres; use pluralkit_models::{PKSystem, PKSystemConfig, PrivacyLevel}; -use crate::{auth::AuthState, error::fail, ApiContext}; +use crate::{ApiContext, auth::AuthState, error::fail}; #[api_endpoint] pub async fn get_system_settings( diff --git a/crates/api/src/main.rs b/crates/api/src/main.rs index 07e47f89..f22450ce 100644 --- a/crates/api/src/main.rs +++ b/crates/api/src/main.rs @@ -1,16 +1,14 @@ -#![feature(let_chains)] - use auth::{AuthState, INTERNAL_APPID_HEADER, INTERNAL_SYSTEMID_HEADER}; use axum::{ + Extension, Router, body::Body, extract::{Request as ExtractRequest, State}, http::Uri, response::{IntoResponse, Response}, routing::{delete, get, patch, post}, - Extension, Router, }; use hyper_util::{ - client::legacy::{connect::HttpConnector, Client}, + client::legacy::{Client, connect::HttpConnector}, rt::TokioExecutor, }; use tracing::info; diff --git a/crates/api/src/middleware/auth.rs b/crates/api/src/middleware/auth.rs index 0992757f..1d536e97 100644 --- a/crates/api/src/middleware/auth.rs +++ b/crates/api/src/middleware/auth.rs @@ -10,7 +10,7 @@ use subtle::ConstantTimeEq; use tracing::error; use crate::auth::AuthState; -use crate::{util::json_err, ApiContext}; +use crate::{ApiContext, util::json_err}; pub async fn auth(State(ctx): State, mut req: Request, next: Next) -> Response { let mut authed_system_id: Option = None; diff --git a/crates/api/src/middleware/logger.rs b/crates/api/src/middleware/logger.rs index 38e45e2c..512234bb 100644 --- a/crates/api/src/middleware/logger.rs +++ b/crates/api/src/middleware/logger.rs @@ -2,7 +2,7 @@ use std::time::Instant; use axum::{extract::MatchedPath, extract::Request, middleware::Next, response::Response}; use metrics::{counter, histogram}; -use tracing::{info, span, warn, Instrument, Level}; +use tracing::{Instrument, Level, info, span, warn}; use crate::{auth::AuthState, util::header_or_unknown}; diff --git a/crates/api/src/middleware/params.rs b/crates/api/src/middleware/params.rs index 06a76f64..1b52bfbf 100644 --- a/crates/api/src/middleware/params.rs +++ b/crates/api/src/middleware/params.rs @@ -6,11 +6,11 @@ use axum::{ routing::url_params::UrlParams, }; -use sqlx::{types::Uuid, Postgres}; +use sqlx::{Postgres, types::Uuid}; use tracing::error; use crate::auth::AuthState; -use crate::{util::json_err, ApiContext}; +use crate::{ApiContext, util::json_err}; use pluralkit_models::PKSystem; // move this somewhere else @@ -31,7 +31,7 @@ pub async fn params(State(ctx): State, mut req: Request, next: Next) StatusCode::BAD_REQUEST, r#"{"message":"400: Bad Request","code": 0}"#.to_string(), ) - .into() + .into(); } }; diff --git a/crates/api/src/util.rs b/crates/api/src/util.rs index 35a5bf0d..e9723976 100644 --- a/crates/api/src/util.rs +++ b/crates/api/src/util.rs @@ -3,7 +3,7 @@ use axum::{ http::{HeaderValue, StatusCode}, response::IntoResponse, }; -use serde_json::{json, to_string, Value}; +use serde_json::{Value, json, to_string}; use tracing::error; pub fn header_or_unknown(header: Option<&HeaderValue>) -> &str { diff --git a/crates/avatars/Cargo.toml b/crates/avatars/Cargo.toml index 725e5396..ee1aa91e 100644 --- a/crates/avatars/Cargo.toml +++ b/crates/avatars/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "avatars" version = "0.1.0" -edition = "2021" +edition = "2024" [[bin]] name = "avatar_cleanup" diff --git a/crates/avatars/src/main.rs b/crates/avatars/src/main.rs index c8399086..df80ac82 100644 --- a/crates/avatars/src/main.rs +++ b/crates/avatars/src/main.rs @@ -8,10 +8,10 @@ use anyhow::Context; use axum::extract::State; use axum::routing::get; use axum::{ + Json, Router, http::StatusCode, response::{IntoResponse, Response}, routing::post, - Json, Router, }; use libpk::_config::AvatarsConfig; use libpk::db::repository::avatars as db; @@ -153,7 +153,7 @@ async fn verify( ) .await?; - let encoded = process::process_async(result.data, req.kind).await?; + process::process_async(result.data, req.kind).await?; Ok(()) } diff --git a/crates/avatars/src/process.rs b/crates/avatars/src/process.rs index 024f40de..0c9ba8c1 100644 --- a/crates/avatars/src/process.rs +++ b/crates/avatars/src/process.rs @@ -4,7 +4,7 @@ use std::io::Cursor; use std::time::Instant; use tracing::{debug, error, info, instrument}; -use crate::{hash::Hash, ImageKind, PKAvatarError}; +use crate::{ImageKind, PKAvatarError, hash::Hash}; const MAX_DIMENSION: u32 = 4000; diff --git a/crates/avatars/src/pull.rs b/crates/avatars/src/pull.rs index fdf5f073..44c4a952 100644 --- a/crates/avatars/src/pull.rs +++ b/crates/avatars/src/pull.rs @@ -62,7 +62,7 @@ pub async fn pull( let size = match response.content_length() { None => return Err(PKAvatarError::MissingHeader("Content-Length")), Some(size) if size > MAX_SIZE => { - return Err(PKAvatarError::ImageFileSizeTooLarge(size, MAX_SIZE)) + return Err(PKAvatarError::ImageFileSizeTooLarge(size, MAX_SIZE)); } Some(size) => size, }; @@ -162,7 +162,7 @@ pub fn parse_url(url: &str) -> anyhow::Result { attachment_id: 0, filename: "".to_string(), full_url: url.to_string(), - }) + }); } _ => anyhow::bail!("not a discord cdn url"), } diff --git a/crates/dispatch/Cargo.toml b/crates/dispatch/Cargo.toml index c76856d1..f48acf8c 100644 --- a/crates/dispatch/Cargo.toml +++ b/crates/dispatch/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dispatch" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] anyhow = { workspace = true } diff --git a/crates/dispatch/src/logger.rs b/crates/dispatch/src/logger.rs index aa65bc67..ec2576b6 100644 --- a/crates/dispatch/src/logger.rs +++ b/crates/dispatch/src/logger.rs @@ -1,7 +1,7 @@ use std::time::Instant; use axum::{extract::MatchedPath, extract::Request, middleware::Next, response::Response}; -use tracing::{info, span, warn, Instrument, Level}; +use tracing::{Instrument, Level, info, span, warn}; // log any requests that take longer than 2 seconds // todo: change as necessary diff --git a/crates/dispatch/src/main.rs b/crates/dispatch/src/main.rs index 6570cf19..3a3403bd 100644 --- a/crates/dispatch/src/main.rs +++ b/crates/dispatch/src/main.rs @@ -5,17 +5,16 @@ use hickory_client::{ rr::{DNSClass, Name, RData, RecordType}, udp::UdpClientStream, }; -use reqwest::{redirect::Policy, StatusCode}; +use reqwest::{StatusCode, redirect::Policy}; use std::{ net::{Ipv4Addr, SocketAddr, SocketAddrV4}, sync::Arc, time::Duration, }; use tokio::{net::UdpSocket, sync::RwLock}; -use tracing::{debug, error, info}; -use tracing_subscriber::EnvFilter; +use tracing::{debug, error}; -use axum::{extract::State, http::Uri, routing::post, Json, Router}; +use axum::{Json, Router, extract::State, http::Uri, routing::post}; mod logger; @@ -128,7 +127,7 @@ async fn dispatch( match res { Ok(res) if res.status() != 200 => { - return DispatchResponse::InvalidResponseCode(res.status()).to_string() + return DispatchResponse::InvalidResponseCode(res.status()).to_string(); } Err(error) => { error!(?error, url = req.url.clone(), "failed to fetch"); diff --git a/crates/gateway/Cargo.toml b/crates/gateway/Cargo.toml index c707b29b..0222ab18 100644 --- a/crates/gateway/Cargo.toml +++ b/crates/gateway/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gateway" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] anyhow = { workspace = true } diff --git a/crates/gateway/src/api.rs b/crates/gateway/src/api.rs index f8c3f556..aa2d069e 100644 --- a/crates/gateway/src/api.rs +++ b/crates/gateway/src/api.rs @@ -1,18 +1,18 @@ use axum::{ + Router, extract::{ConnectInfo, Path, State}, http::StatusCode, response::{IntoResponse, Response}, routing::{delete, get, post}, - Router, }; use libpk::runtime_config::RuntimeConfig; use serde_json::{json, to_string}; use tracing::{error, info}; -use twilight_model::id::{marker::ChannelMarker, Id}; +use twilight_model::id::{Id, marker::ChannelMarker}; use crate::{ discord::{ - cache::{dm_channel, DiscordCache, DM_PERMISSIONS}, + cache::{DM_PERMISSIONS, DiscordCache, dm_channel}, gateway::cluster_config, shard_state::ShardStateManager, }, diff --git a/crates/gateway/src/discord/cache.rs b/crates/gateway/src/discord/cache.rs index e0a4aacf..cc538d08 100644 --- a/crates/gateway/src/discord/cache.rs +++ b/crates/gateway/src/discord/cache.rs @@ -4,18 +4,18 @@ use serde::Serialize; use std::{collections::HashMap, sync::Arc}; use tokio::sync::RwLock; use twilight_cache_inmemory::{ + InMemoryCache, ResourceType, model::CachedMember, permission::{MemberRoles, RootError}, traits::CacheableChannel, - InMemoryCache, ResourceType, }; use twilight_gateway::Event; use twilight_model::{ channel::{Channel, ChannelType}, guild::{Guild, Member, Permissions}, id::{ - marker::{ChannelMarker, GuildMarker, MessageMarker, UserMarker}, Id, + marker::{ChannelMarker, GuildMarker, MessageMarker, UserMarker}, }, }; use twilight_util::permission_calculator::PermissionCalculator; diff --git a/crates/gateway/src/discord/gateway.rs b/crates/gateway/src/discord/gateway.rs index 8210e06e..215fb4cf 100644 --- a/crates/gateway/src/discord/gateway.rs +++ b/crates/gateway/src/discord/gateway.rs @@ -6,17 +6,17 @@ use std::sync::Arc; use tokio::sync::mpsc::Sender; use tracing::{error, info, warn}; use twilight_gateway::{ - create_iterator, CloseFrame, ConfigBuilder, Event, EventTypeFlags, Message, Shard, ShardId, + CloseFrame, ConfigBuilder, Event, EventTypeFlags, Message, Shard, ShardId, create_iterator, }; use twilight_model::gateway::{ + Intents, payload::outgoing::update_presence::UpdatePresencePayload, presence::{Activity, ActivityType, Status}, - Intents, }; use crate::{ - discord::identify_queue::{self, RedisQueue}, RUNTIME_CONFIG_KEY_EVENT_TARGET, + discord::identify_queue::{self, RedisQueue}, }; use super::cache::DiscordCache; diff --git a/crates/gateway/src/event_awaiter.rs b/crates/gateway/src/event_awaiter.rs index 765ad8e5..97a6955e 100644 --- a/crates/gateway/src/event_awaiter.rs +++ b/crates/gateway/src/event_awaiter.rs @@ -3,7 +3,7 @@ // - interaction: (custom_id where not_includes "help-menu") use std::{ - collections::{hash_map::Entry, HashMap}, + collections::{HashMap, hash_map::Entry}, net::{IpAddr, SocketAddr}, time::Duration, }; @@ -15,8 +15,8 @@ use twilight_gateway::Event; use twilight_model::{ application::interaction::InteractionData, id::{ - marker::{ChannelMarker, MessageMarker, UserMarker}, Id, + marker::{ChannelMarker, MessageMarker, UserMarker}, }, }; @@ -103,7 +103,13 @@ impl EventAwaiter { } } } - info!("ran event_awaiter cleanup loop, took {}us, {} reactions, {} messages, {} interactions", Instant::now().duration_since(now).as_micros(), counts.0, counts.1, counts.2); + info!( + "ran event_awaiter cleanup loop, took {}us, {} reactions, {} messages, {} interactions", + Instant::now().duration_since(now).as_micros(), + counts.0, + counts.1, + counts.2 + ); } } diff --git a/crates/gateway/src/logger.rs b/crates/gateway/src/logger.rs index 459aef31..0a081432 100644 --- a/crates/gateway/src/logger.rs +++ b/crates/gateway/src/logger.rs @@ -4,7 +4,7 @@ use axum::{ extract::MatchedPath, extract::Request, http::StatusCode, middleware::Next, response::Response, }; use metrics::{counter, histogram}; -use tracing::{info, span, warn, Instrument, Level}; +use tracing::{Instrument, Level, info, span, warn}; // log any requests that take longer than 2 seconds // todo: change as necessary diff --git a/crates/gateway/src/main.rs b/crates/gateway/src/main.rs index 12db76b5..3ac7be21 100644 --- a/crates/gateway/src/main.rs +++ b/crates/gateway/src/main.rs @@ -1,4 +1,3 @@ -#![feature(let_chains)] #![feature(if_let_guard)] #![feature(duration_constructors)] @@ -10,7 +9,7 @@ use libpk::{runtime_config::RuntimeConfig, state::ShardStateEvent}; use reqwest::{ClientBuilder, StatusCode}; use std::{sync::Arc, time::Duration, vec::Vec}; use tokio::{ - signal::unix::{signal, SignalKind}, + signal::unix::{SignalKind, signal}, sync::mpsc::channel, task::JoinSet, }; diff --git a/crates/gdpr_worker/Cargo.toml b/crates/gdpr_worker/Cargo.toml index a30751f9..b57ccddf 100644 --- a/crates/gdpr_worker/Cargo.toml +++ b/crates/gdpr_worker/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gdpr_worker" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] libpk = { path = "../libpk" } diff --git a/crates/gdpr_worker/src/main.rs b/crates/gdpr_worker/src/main.rs index b40557c0..bcedbedd 100644 --- a/crates/gdpr_worker/src/main.rs +++ b/crates/gdpr_worker/src/main.rs @@ -1,12 +1,10 @@ -#![feature(let_chains)] - use sqlx::prelude::FromRow; use std::{sync::Arc, time::Duration}; use tracing::{error, info, warn}; use twilight_http::api_error::{ApiError, GeneralApiError}; use twilight_model::id::{ - marker::{ChannelMarker, MessageMarker}, Id, + marker::{ChannelMarker, MessageMarker}, }; // create table messages_gdpr_jobs (mid bigint not null references messages(mid) on delete cascade, channel bigint not null); diff --git a/crates/libpk/Cargo.toml b/crates/libpk/Cargo.toml index 30d77ae0..1f0c3c42 100644 --- a/crates/libpk/Cargo.toml +++ b/crates/libpk/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "libpk" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] anyhow = { workspace = true } diff --git a/crates/libpk/src/_config.rs b/crates/libpk/src/_config.rs index 7f992d95..f21d9adf 100644 --- a/crates/libpk/src/_config.rs +++ b/crates/libpk/src/_config.rs @@ -3,7 +3,7 @@ use lazy_static::lazy_static; use serde::Deserialize; use std::sync::Arc; -use twilight_model::id::{marker::UserMarker, Id}; +use twilight_model::id::{Id, marker::UserMarker}; #[derive(Clone, Deserialize, Debug)] pub struct ClusterSettings { @@ -151,11 +151,11 @@ lazy_static! { // hacks if let Ok(var) = std::env::var("NOMAD_ALLOC_INDEX") && std::env::var("pluralkit__discord__cluster__total_nodes").is_ok() { - std::env::set_var("pluralkit__discord__cluster__node_id", var); + unsafe { std::env::set_var("pluralkit__discord__cluster__node_id", var); } } if let Ok(var) = std::env::var("STATEFULSET_NAME_FOR_INDEX") && std::env::var("pluralkit__discord__cluster__total_nodes").is_ok() { - std::env::set_var("pluralkit__discord__cluster__node_id", var.split("-").last().unwrap()); + unsafe { std::env::set_var("pluralkit__discord__cluster__node_id", var.split("-").last().unwrap()); } } Arc::new(Config::builder() diff --git a/crates/libpk/src/db/repository/avatars.rs b/crates/libpk/src/db/repository/avatars.rs index 1ff10cc7..9a667c11 100644 --- a/crates/libpk/src/db/repository/avatars.rs +++ b/crates/libpk/src/db/repository/avatars.rs @@ -52,7 +52,7 @@ pub async fn remove_deletion_queue(pool: &PgPool, attachment_id: u64) -> anyhow: pub async fn pop_queue( pool: &PgPool, -) -> anyhow::Result, ImageQueueEntry)>> { +) -> anyhow::Result, ImageQueueEntry)>> { let mut tx = pool.begin().await?; let res: Option = sqlx::query_as("delete from image_queue where itemid = (select itemid from image_queue order by itemid for update skip locked limit 1) returning *") .fetch_optional(&mut *tx).await?; diff --git a/crates/libpk/src/db/types/avatars.rs b/crates/libpk/src/db/types/avatars.rs index aea6aafd..0b07fbb2 100644 --- a/crates/libpk/src/db/types/avatars.rs +++ b/crates/libpk/src/db/types/avatars.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use sqlx::{ - types::chrono::{DateTime, Utc}, FromRow, + types::chrono::{DateTime, Utc}, }; use uuid::Uuid; diff --git a/crates/libpk/src/lib.rs b/crates/libpk/src/lib.rs index 55031bf3..137eb94d 100644 --- a/crates/libpk/src/lib.rs +++ b/crates/libpk/src/lib.rs @@ -1,9 +1,8 @@ -#![feature(let_chains)] use std::net::SocketAddr; use metrics_exporter_prometheus::PrometheusBuilder; use sentry::IntoDsn; -use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; +use tracing_subscriber::{EnvFilter, layer::SubscriberExt, util::SubscriberInitExt}; use sentry_tracing::event_from_event; diff --git a/crates/macros/Cargo.toml b/crates/macros/Cargo.toml index 10feaf88..7f320881 100644 --- a/crates/macros/Cargo.toml +++ b/crates/macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pk_macros" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] proc-macro = true diff --git a/crates/macros/src/api.rs b/crates/macros/src/api.rs index 7f797b8c..8094b9ea 100644 --- a/crates/macros/src/api.rs +++ b/crates/macros/src/api.rs @@ -1,7 +1,7 @@ use quote::quote; -use syn::{parse_macro_input, FnArg, ItemFn, Pat}; +use syn::{FnArg, ItemFn, Pat, parse_macro_input}; -fn pretty_print(ts: &proc_macro2::TokenStream) -> String { +fn _pretty_print(ts: &proc_macro2::TokenStream) -> String { let file = syn::parse_file(&ts.to_string()).unwrap(); prettyplease::unparse(&file) } diff --git a/crates/macros/src/model.rs b/crates/macros/src/model.rs index 924b5bcd..e37d0dde 100644 --- a/crates/macros/src/model.rs +++ b/crates/macros/src/model.rs @@ -1,6 +1,6 @@ use proc_macro2::{Span, TokenStream}; use quote::quote; -use syn::{parse_macro_input, DeriveInput, Expr, Ident, Meta, Type}; +use syn::{DeriveInput, Expr, Ident, Meta, Type, parse_macro_input}; #[derive(Clone, Debug)] enum ElemPatchability { diff --git a/crates/migrate/Cargo.toml b/crates/migrate/Cargo.toml index cf4eff2d..0843cb3f 100644 --- a/crates/migrate/Cargo.toml +++ b/crates/migrate/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "migrate" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] libpk = { path = "../libpk" } diff --git a/crates/migrate/src/main.rs b/crates/migrate/src/main.rs index 85b15e33..0ee621e2 100644 --- a/crates/migrate/src/main.rs +++ b/crates/migrate/src/main.rs @@ -1,5 +1,3 @@ -#![feature(let_chains)] - use tracing::info; include!(concat!(env!("OUT_DIR"), "/data.rs")); diff --git a/crates/models/Cargo.toml b/crates/models/Cargo.toml index 0fbc358c..752fbaa5 100644 --- a/crates/models/Cargo.toml +++ b/crates/models/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pluralkit_models" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] chrono = { workspace = true, features = ["serde"] } diff --git a/crates/models/src/lib.rs b/crates/models/src/lib.rs index 0bd1f92b..08350488 100644 --- a/crates/models/src/lib.rs +++ b/crates/models/src/lib.rs @@ -18,7 +18,7 @@ pub enum PrivacyLevel { } // this sucks, put it somewhere else -use sqlx::{postgres::PgTypeInfo, Database, Decode, Postgres, Type}; +use sqlx::{Database, Decode, Postgres, Type, postgres::PgTypeInfo}; use std::error::Error; _util::fake_enum_impls!(PrivacyLevel); diff --git a/crates/scheduled_tasks/Cargo.toml b/crates/scheduled_tasks/Cargo.toml index 624db0e8..1e86f2c3 100644 --- a/crates/scheduled_tasks/Cargo.toml +++ b/crates/scheduled_tasks/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "scheduled_tasks" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] libpk = { path = "../libpk" }