mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
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:
parent
715250a179
commit
9a8ba58b4c
4 changed files with 13 additions and 175 deletions
|
@ -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("])")])?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue