From 547838e285737603e111f85128d0d608fdd1b597 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Sat, 30 May 2026 17:27:50 +0200 Subject: [PATCH] fmt: improve formatting --- Cargo.toml | 14 +++++++------- justfile | 3 ++- rustfmt.toml | 3 +++ src/api.rs | 3 +-- src/storage.rs | 6 +++++- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef74af4..f4cee49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,10 +7,15 @@ edition = "2024" axum = "0.8.9" serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.150" -time = { version = "0.3.47", features = ["serde", "formatting"] } +time = { version = "0.3.47", features = ["formatting", "serde"] } tokio = { version = "1.52.3", features = ["full"] } tower-http = { version = "0.6.11", features = ["fs"] } -uuid = { version = "1.23.2", features = ["v4", "serde"] } +uuid = { version = "1.23.2", features = ["serde", "v4"] } + +[dev-dependencies] +http-body-util = "0.1.3" +tempfile = "3.27.0" +tower = { version = "0.5.3", features = ["util"] } [lints.clippy] pedantic = { level = "warn", priority = -1 } @@ -26,8 +31,3 @@ strip = true lto = true panic = "unwind" codegen-units = 1 - -[dev-dependencies] -http-body-util = "0.1.3" -tempfile = "3.27.0" -tower = { version = "0.5.3", features = ["util"] } diff --git a/justfile b/justfile index 76dbf14..b4ad1f0 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,6 @@ fmt: - cargo fmt --all + cargo +nightly fmt --all + fd -e toml -x tombi format --quiet test: cargo test --all-targets diff --git a/rustfmt.toml b/rustfmt.toml index f216078..e75670f 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1 +1,4 @@ edition = "2024" +group_imports = "StdExternalCrate" +imports_granularity = "Crate" +imports_layout = "HorizontalVertical" diff --git a/src/api.rs b/src/api.rs index b4276b0..5c7b7a6 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1,8 +1,7 @@ use axum::{ Json, body::Bytes, - extract::Path, - extract::State, + extract::{Path, State}, http::StatusCode, response::{IntoResponse, Response}, }; diff --git a/src/storage.rs b/src/storage.rs index 7f3880c..8116dee 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -9,7 +9,11 @@ use tokio::{fs, io::AsyncWriteExt}; use uuid::Uuid; use crate::model::{ - CHUNK_SIZE, CompleteUploadResponse, CreateUploadRequest, UploadMeta, UploadProgressResponse, + CHUNK_SIZE, + CompleteUploadResponse, + CreateUploadRequest, + UploadMeta, + UploadProgressResponse, }; #[derive(Clone, Debug)]