Version updates (#3626)

* Update some Labrinth dependencies

* Update some Labrinth dependencies

* Update some Labrinth dependencies

* Update zip in Labrinth

* Update itertools in Labrinth

* Update validator in labrinth

* Update thiserror in labrinth

* Update rust_decimal, redis, and deadpool-redis in labrinth

* Update totp-rs and spdx in labrinth

* Update maxminddb and tar in labrinth

* Update sentry and sentry-actix in labrinth

* Update image in labrinth

* Update lettre in labrinth

* Update derive-new and rust_iso3166 in labrinth

* Update async-stripe and json-patch in labrinth

* Update clap and iana-time-zone in labrinth

* Update labrinth to Rust 2024

* Cargo fmt

* Just do a full cargo update

* Update daedelus to Rust 2024

* Update daedelus_client to Rust 2024

* Set the formatting edition to 2024

* Fix formatting

IntelliJ messed up my formatting
This commit is contained in:
Josiah Glosson
2025-05-09 07:27:55 -05:00
committed by GitHub
parent 6e46317a37
commit 62de07e4e6
146 changed files with 1942 additions and 2311 deletions

View File

@@ -5,11 +5,12 @@ use crate::file_hosting::FileHost;
use crate::models::images::ImageContext;
use crate::routes::ApiError;
use color_thief::ColorFormat;
use hex::ToHex;
use image::imageops::FilterType;
use image::{
DynamicImage, EncodableLayout, GenericImageView, ImageError,
ImageOutputFormat,
DynamicImage, EncodableLayout, GenericImageView, ImageError, ImageFormat,
};
use sha1::Digest;
use std::io::Cursor;
use webp::Encoder;
@@ -57,7 +58,7 @@ pub async fn upload_image_optimized(
let cdn_url = dotenvy::var("CDN_URL")?;
let hash = sha1::Sha1::from(&bytes).hexdigest();
let hash = sha1::Sha1::digest(&bytes).encode_hex::<String>();
let (processed_image, processed_image_ext) = process_image(
bytes.clone(),
content_type,
@@ -150,7 +151,7 @@ fn process_image(
// Optimize and compress
let mut output = Vec::new();
img.write_to(&mut Cursor::new(&mut output), ImageOutputFormat::WebP)?;
img.write_to(&mut Cursor::new(&mut output), ImageFormat::WebP)?;
Ok((bytes::Bytes::from(output), "webp".to_string()))
}

View File

@@ -2,10 +2,11 @@ use crate::database::redis::RedisPool;
use crate::routes::ApiError;
use crate::util::env::parse_var;
use actix_web::{
Error, ResponseError,
body::{EitherBody, MessageBody},
dev::{ServiceRequest, ServiceResponse},
middleware::Next,
web, Error, ResponseError,
web,
};
use chrono::Utc;
use std::str::FromStr;

View File

@@ -1,5 +1,5 @@
use crate::routes::v3::project_creation::CreateError;
use crate::routes::ApiError;
use crate::routes::v3::project_creation::CreateError;
use actix_multipart::Field;
use actix_web::web::Payload;
use bytes::BytesMut;

View File

@@ -19,7 +19,7 @@ pub fn validation_errors_to_string(
let map = errors.into_errors();
let key_option = map.keys().next().copied();
let key_option = map.keys().next();
if let Some(field) = key_option {
if let Some(error) = map.get(field) {