Remove mode from BestFitting

<!--
Thank you for contributing to Ruff! To help us out with reviewing, please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

This PR removes the `mode` field from `BestFitting` because it is no longer used (we now use `conditional_group` and `fits_expanded).

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

`cargo test`

<!-- How was it tested? -->
This commit is contained in:
Micha Reiser 2023-07-11 14:19:26 +02:00 committed by GitHub
parent 715250a179
commit 9a8ba58b4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 175 deletions

View file

@ -80,7 +80,7 @@ impl Document {
interned_expands
}
},
FormatElement::BestFitting { variants, mode: _ } => {
FormatElement::BestFitting { variants } => {
enclosing.push(Enclosing::BestFitting);
for variant in variants {
@ -303,7 +303,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
write!(f, [text("line_suffix_boundary")])?;
}
FormatElement::BestFitting { variants, mode } => {
FormatElement::BestFitting { variants } => {
write!(f, [text("best_fitting([")])?;
f.write_elements([
FormatElement::Tag(StartIndent),
@ -319,16 +319,6 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
FormatElement::Line(LineMode::Hard),
])?;
if *mode != BestFittingMode::FirstLine {
write!(
f,
[
dynamic_text(&std::format!("mode: {mode:?},"), None),
space()
]
)?;
}
write!(f, [text("])")])?;
}