From 36b0a0f7296f01f20722b69207abaac7e2d22316 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 26 Oct 2024 12:44:02 +0100 Subject: [PATCH] Formatting --- pyproject-fmt/rust/src/dependency_groups.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject-fmt/rust/src/dependency_groups.rs b/pyproject-fmt/rust/src/dependency_groups.rs index 959b1a8..0efaed7 100644 --- a/pyproject-fmt/rust/src/dependency_groups.rs +++ b/pyproject-fmt/rust/src/dependency_groups.rs @@ -2,14 +2,13 @@ use common::array::{sort, transform}; use common::pep508::{format_requirement, get_canonic_requirement_name}; use common::table::{collapse_sub_tables, for_entries, reorder_table_keys, Tables}; -#[allow(clippy::too_many_lines)] -pub fn fix(tables: &mut Tables, - keep_full_version: bool,) { +pub fn fix(tables: &mut Tables, keep_full_version: bool) { collapse_sub_tables(tables, "dependency-groups"); let table_element = tables.get("dependency-groups"); if table_element.is_none() { return; } + let table = &mut table_element.unwrap().first().unwrap().borrow_mut(); for_entries(table, &mut |_key, entry| { transform(entry, &|s| format_requirement(s, keep_full_version));