Skip to content

Commit

Permalink
fix(items): Mention Edition 2021
Browse files Browse the repository at this point in the history
The project has been using `>= StyleEdition::Edition2024` to indicate new formatting,
and it's easier to grep for `Edition2021` to find all of the older formatting points. [1]

[1] #6286 (comment)
  • Loading branch information
malikolivier committed Aug 20, 2024
1 parent 22b076c commit 5601462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ impl<'a> FmtVisitor<'a> {
// If one of the variants use multiple lines, use multi-lined formatting for all variants.
let is_multi_line_variant = |item: &ListItem| -> bool {
let variant_str = item.inner_as_ref();
if self.config.style_edition() < StyleEdition::Edition2024 {
if self.config.style_edition() <= StyleEdition::Edition2021 {
// Fall back to previous naive implementation (#5662) because of
// rustfmt's stability guarantees
return variant_str.contains('\n');
Expand Down

0 comments on commit 5601462

Please sign in to comment.