From 869d8517a0a42a6cf82324f17bf14e39903b1ef9 Mon Sep 17 00:00:00 2001 From: Mirotin Artem Date: Mon, 15 Jun 2026 10:40:45 +0300 Subject: [PATCH] Rustfmt --- src/api/config_edit.rs | 10 ++++++++-- src/api/config_store.rs | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/api/config_edit.rs b/src/api/config_edit.rs index 3b77e18..8f25cfc 100644 --- a/src/api/config_edit.rs +++ b/src/api/config_edit.rs @@ -355,8 +355,14 @@ mod tests { let written = tokio::fs::read_to_string(&path).await.unwrap(); assert!(written.contains("public_port = 443"), "{written}"); - assert!(!written.contains("443.0"), "must not be a float:\n{written}"); - assert!(!written.contains("\"443\""), "must not be a string:\n{written}"); + assert!( + !written.contains("443.0"), + "must not be a float:\n{written}" + ); + assert!( + !written.contains("\"443\""), + "must not be a string:\n{written}" + ); let parsed: toml::Value = toml::from_str(&written).unwrap(); assert_eq!( diff --git a/src/api/config_store.rs b/src/api/config_store.rs index ba03ca5..cc5dc25 100644 --- a/src/api/config_store.rs +++ b/src/api/config_store.rs @@ -381,7 +381,9 @@ fn header_belongs_to(header: &str, table_name: &str) -> bool { }; let body = body.trim(); body == table_name - || body.strip_prefix(table_name).is_some_and(|rest| rest.starts_with('.')) + || body + .strip_prefix(table_name) + .is_some_and(|rest| rest.starts_with('.')) } /// Locate the first contiguous byte range covering `table_name` and the nested