aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyomide Bamidele <[email protected]>2021-03-29 12:56:02 +0100
committerAyomide Bamidele <[email protected]>2021-03-29 12:56:02 +0100
commit8e11796dc5fcaaeba7b4cc2e0096ed459ec9b899 (patch)
treea6bc549625b66cc3801f5213197a58fdfe15ec3b
parenta813062ed206b4382a1694ea6aef019f18733bca (diff)
formatting fix
-rw-r--r--crates/ide/src/folding_ranges.rs2
-rw-r--r--crates/rust-analyzer/src/to_proto.rs6
2 files changed, 6 insertions, 2 deletions
diff --git a/crates/ide/src/folding_ranges.rs b/crates/ide/src/folding_ranges.rs
index 8b8a2cc38..153726ce8 100644
--- a/crates/ide/src/folding_ranges.rs
+++ b/crates/ide/src/folding_ranges.rs
@@ -268,7 +268,7 @@ mod tests {
268 FoldKind::ArgList => "arglist", 268 FoldKind::ArgList => "arglist",
269 FoldKind::Region => "region", 269 FoldKind::Region => "region",
270 FoldKind::Consts => "consts", 270 FoldKind::Consts => "consts",
271 FoldKind::Statics => "statics" 271 FoldKind::Statics => "statics",
272 }; 272 };
273 assert_eq!(kind, &attr.unwrap()); 273 assert_eq!(kind, &attr.unwrap());
274 } 274 }
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index a3799880f..e297a72e6 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -492,7 +492,11 @@ pub(crate) fn folding_range(
492 FoldKind::Comment => Some(lsp_types::FoldingRangeKind::Comment), 492 FoldKind::Comment => Some(lsp_types::FoldingRangeKind::Comment),
493 FoldKind::Imports => Some(lsp_types::FoldingRangeKind::Imports), 493 FoldKind::Imports => Some(lsp_types::FoldingRangeKind::Imports),
494 FoldKind::Region => Some(lsp_types::FoldingRangeKind::Region), 494 FoldKind::Region => Some(lsp_types::FoldingRangeKind::Region),
495 FoldKind::Mods | FoldKind::Block | FoldKind::ArgList | FoldKind::Consts | FoldKind::Statics => None, 495 FoldKind::Mods
496 | FoldKind::Block
497 | FoldKind::ArgList
498 | FoldKind::Consts
499 | FoldKind::Statics => None,
496 }; 500 };
497 501
498 let range = range(line_index, fold.range); 502 let range = range(line_index, fold.range);