Skip to content

Commit a0da5d7

Browse files
committed
Simplify per review comment - use defer and matches!
1 parent 5b4a063 commit a0da5d7

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/types.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -944,16 +944,10 @@ fn join_bounds_inner(
944944
// Whether a PathSegment segment includes internal array containing more than one item
945945
let is_segment_with_multi_items_array = |seg: &ast::PathSegment| {
946946
if let Some(args_in) = &seg.args {
947-
match &**args_in {
948-
ast::AngleBracketed(args) => {
949-
if args.args.len() > 1 {
950-
true
951-
} else {
952-
false
953-
}
954-
}
955-
_ => false,
956-
}
947+
matches!(
948+
args_in.deref(),
949+
ast::GenericArgs::AngleBracketed(bracket_args) if bracket_args.args.len() > 1
950+
)
957951
} else {
958952
false
959953
}

0 commit comments

Comments
 (0)