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));