Skip to content

Commit 8791a38

Browse files
committed
replaced if guard with explicit pattern matching
1 parent 35aade7 commit 8791a38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use tracing::debug;
77

88
use crate::comment::{combine_strs_with_missing_comments, contains_comment};
99
use crate::config::lists::*;
10-
use crate::config::{IndentStyle, StyleEdition, TypeDensity};
10+
use crate::config::{IndentStyle, StyleEdition, StyleEdition::*, TypeDensity};
1111
use crate::expr::{
1212
ExprType, RhsAssignKind, format_expr, rewrite_assign_rhs, rewrite_call, rewrite_tuple,
1313
rewrite_unary_prefix,
@@ -1297,7 +1297,7 @@ fn join_bounds_inner(
12971297
// or the single item is of type `Trait`,
12981298
// and any of the internal arrays contains more than one item;
12991299
let retry_with_force_newline = match context.config.style_edition() {
1300-
style_edition if style_edition <= StyleEdition::Edition2021 => {
1300+
Edition2015 | Edition2018 | Edition2021 => {
13011301
!force_newline
13021302
&& items.len() > 1
13031303
&& (result.0.contains('\n') || result.0.len() > shape.width)

0 commit comments

Comments
 (0)