Skip to content

Commit 0c5ee8e

Browse files
committed
comment: reserved_room_for_brace
1 parent 0eecc48 commit 0c5ee8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/imports.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,8 @@ impl Rewrite for UseTree {
11391139
if next_segment.is_some() {
11401140
rewritten_segment.push_str("::");
11411141
}
1142+
// If `next_segment` is a list, we should check overflow with `curr_segment` with
1143+
// open brace: `...::curr_segment{`. So, 1 will be added to a shape.
11421144
let reserved_room_for_brace = match next_segment.map(|s| &s.kind) {
11431145
Some(UseSegmentKind::List(_)) => "{".len(),
11441146
_ => 0,

0 commit comments

Comments
 (0)