File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
src/tools/rust-analyzer/crates/ide/src Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> {
4848 let mut res = vec ! [ ] ;
4949 let mut visited_comments = FxHashSet :: default ( ) ;
5050 let mut visited_nodes = FxHashSet :: default ( ) ;
51- let mut merged_fn_bodies = FxHashSet :: default ( ) ;
5251
5352 // regions can be nested, here is a LIFO buffer
5453 let mut region_starts: Vec < TextSize > = vec ! [ ] ;
@@ -73,15 +72,14 @@ pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> {
7372 continue ;
7473 }
7574
76- if let Some ( body ) = fn_node. body ( ) {
75+ if fn_node. body ( ) . is_some ( ) {
7776 res. push ( Fold {
7877 range : TextRange :: new (
7978 node. text_range ( ) . start ( ) ,
8079 node. text_range ( ) . end ( ) ,
8180 ) ,
8281 kind : FoldKind :: Function ,
8382 } ) ;
84- merged_fn_bodies. insert ( body. syntax ( ) . text_range ( ) ) ;
8583 continue ;
8684 }
8785 }
You can’t perform that action at this time.
0 commit comments