Remove unnecessary prefixes (#10158)

This commit is contained in:
Charlie Marsh 2024-12-25 14:18:01 -05:00 committed by GitHub
parent 3cb723220e
commit bec8468183
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 124 additions and 175 deletions

View file

@ -319,7 +319,7 @@ impl PyProjectTomlMut {
if index.default {
if !table
.get("default")
.and_then(toml_edit::Item::as_bool)
.and_then(Item::as_bool)
.is_some_and(|default| default)
{
let mut formatted = Formatted::new(true);
@ -371,7 +371,7 @@ impl PyProjectTomlMut {
});
// Set the position to the minimum, if it's not already the first element.
if let Some(min) = existing.iter().filter_map(toml_edit::Table::position).min() {
if let Some(min) = existing.iter().filter_map(Table::position).min() {
table.set_position(min);
// Increment the position of all existing elements.