about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-01-01 17:31:32 +0100
committerMara Bos <m-ou.se@m-ou.se>2021-01-01 17:31:32 +0100
commit273d2f91234367bd1348a6c4d84df22fe35becf5 (patch)
tree4d0b7da08fe7955d7a676a075e9011e296d55e86
parent4833972067c00170269c7ee7a04f1a8ce1e1d15b (diff)
downloadrust-273d2f91234367bd1348a6c4d84df22fe35becf5.tar.gz
rust-273d2f91234367bd1348a6c4d84df22fe35becf5.zip
Formatting.
-rw-r--r--crates/ide/src/syntax_highlighting/injection.rs13
-rw-r--r--crates/rust-analyzer/src/markdown.rs13
2 files changed, 22 insertions, 4 deletions
diff --git a/crates/ide/src/syntax_highlighting/injection.rs b/crates/ide/src/syntax_highlighting/injection.rs
index 3fd414f80bb..6cbd683c697 100644
--- a/crates/ide/src/syntax_highlighting/injection.rs
+++ b/crates/ide/src/syntax_highlighting/injection.rs
@@ -54,8 +54,17 @@ pub(super) fn highlight_injection(
 type RangesMap = BTreeMap<TextSize, TextSize>;
 
 const RUSTDOC_FENCE: &'static str = "```";
-const RUSTDOC_FENCE_TOKENS: &[&'static str] =
-    &["", "rust", "should_panic", "ignore", "no_run", "compile_fail", "edition2015", "edition2018", "edition2021"];
+const RUSTDOC_FENCE_TOKENS: &[&'static str] = &[
+    "",
+    "rust",
+    "should_panic",
+    "ignore",
+    "no_run",
+    "compile_fail",
+    "edition2015",
+    "edition2018",
+    "edition2021",
+];
 
 /// Extracts Rust code from documentation comments as well as a mapping from
 /// the extracted source code back to the original source ranges.
diff --git a/crates/rust-analyzer/src/markdown.rs b/crates/rust-analyzer/src/markdown.rs
index 2f1dcc9a524..a49a58c0002 100644
--- a/crates/rust-analyzer/src/markdown.rs
+++ b/crates/rust-analyzer/src/markdown.rs
@@ -1,8 +1,17 @@
 //! Transforms markdown
 
 const RUSTDOC_FENCE: &str = "```";
-const RUSTDOC_CODE_BLOCK_ATTRIBUTES_RUST_SPECIFIC: &[&str] =
-    &["", "rust", "should_panic", "ignore", "no_run", "compile_fail", "edition2015", "edition2018", "edition2021"];
+const RUSTDOC_CODE_BLOCK_ATTRIBUTES_RUST_SPECIFIC: &[&str] = &[
+    "",
+    "rust",
+    "should_panic",
+    "ignore",
+    "no_run",
+    "compile_fail",
+    "edition2015",
+    "edition2018",
+    "edition2021",
+];
 
 pub(crate) fn format_docs(src: &str) -> String {
     let mut processed_lines = Vec::new();