Skip to content

Commit 2360145

Browse files
committed
New FoldKinds - Consts, Statics
1 parent f6702dd commit 2360145

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/ide/src/folding_ranges.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ pub enum FoldKind {
1717
Block,
1818
ArgList,
1919
Region,
20+
Consts,
21+
Statics,
2022
}
2123

2224
#[derive(Debug)]
@@ -250,6 +252,8 @@ mod tests {
250252
FoldKind::Block => "block",
251253
FoldKind::ArgList => "arglist",
252254
FoldKind::Region => "region",
255+
FoldKind::Consts => "consts",
256+
FoldKind::Statics => "statics"
253257
};
254258
assert_eq!(kind, &attr.unwrap());
255259
}
@@ -472,7 +476,7 @@ const SECOND_CONST: &str = "second";</fold>
472476
fn fold_consecutive_static() {
473477
check(
474478
r#"
475-
<fold consts>static FIRST_STATIC: &str = "first";
479+
<fold statics>static FIRST_STATIC: &str = "first";
476480
static SECOND_STATIC: &str = "second";</fold>
477481
"#,
478482
)

0 commit comments

Comments
 (0)