From 26a02489721cbf81a3e8c09c095aee5ff5786275 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sat, 18 Apr 2026 11:29:38 +0200 Subject: Format sources --- src/controller/balancing.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/controller/balancing.rs') diff --git a/src/controller/balancing.rs b/src/controller/balancing.rs index 718358c..c3d5ee8 100644 --- a/src/controller/balancing.rs +++ b/src/controller/balancing.rs @@ -18,7 +18,8 @@ pub async fn table( ) -> Response> { let page = query.page.unwrap_or(1); let count = db::balancing::count(&wallet.db_conn).await; - let balancings = db::balancing::list_for_table(&wallet.db_conn, page, PER_PAGE).await; + let balancings = + db::balancing::list_for_table(&wallet.db_conn, page, PER_PAGE).await; let max_page = (count as f32 / PER_PAGE as f32).ceil() as i64; let context = minijinja::context!( @@ -70,7 +71,6 @@ async fn create_form_feedback( ) } - pub async fn create( wallet: &Wallet, query: queries::Balancing, @@ -84,8 +84,7 @@ pub async fn create( Some(balancing) => { match db::balancing::create(&wallet.db_conn, balancing).await { Some(id) => { - let row = - db::balancing::get_row(&wallet.db_conn, id).await; + let row = db::balancing::get_row(&wallet.db_conn, id).await; let page = (row - 1) / PER_PAGE + 1; utils::redirect(&format!( "/balancings?page={}&highlight={}", @@ -175,7 +174,10 @@ pub async fn delete( query: queries::Balancing, ) -> Response> { if db::balancing::delete(&wallet.db_conn, id).await { - utils::redirect(&format!("/balancings?page={}", query.page.unwrap_or(1))) + utils::redirect(&format!( + "/balancings?page={}", + query.page.unwrap_or(1) + )) } else { update_form_feedback( id, -- cgit v1.2.3