aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-06-03 12:44:40 +0100
committervsrs <[email protected]>2020-06-05 13:00:30 +0100
commitb147e6eb95b8bbc8cd9a56f9a9a629b8671bdc0e (patch)
tree1f6007871bef114f9d18db7e4880e9e00d886b68
parentda7ec4b3398ffaf672a755bf57066e17ac42303a (diff)
Code formatting
-rw-r--r--crates/ra_ide/src/hover.rs5
-rw-r--r--crates/ra_ide/src/lib.rs2
-rw-r--r--crates/rust-analyzer/src/config.rs5
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index baa9fc8a8..2b9095a82 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -14,7 +14,7 @@ use ra_syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffs
14 14
15use crate::{ 15use crate::{
16 display::{macro_label, rust_code_markup, rust_code_markup_with_doc, ShortLabel, ToNav}, 16 display::{macro_label, rust_code_markup, rust_code_markup_with_doc, ShortLabel, ToNav},
17 FilePosition, RangeInfo, NavigationTarget, 17 FilePosition, NavigationTarget, RangeInfo,
18}; 18};
19 19
20#[derive(Clone, Debug, PartialEq, Eq)] 20#[derive(Clone, Debug, PartialEq, Eq)]
@@ -308,7 +308,7 @@ mod tests {
308 308
309 fn assert_impl_action(action: &HoverAction, position: u32) { 309 fn assert_impl_action(action: &HoverAction, position: u32) {
310 let offset = match action { 310 let offset = match action {
311 HoverAction::Implementaion(pos) => pos.offset 311 HoverAction::Implementaion(pos) => pos.offset,
312 }; 312 };
313 assert_eq!(offset, position.into()); 313 assert_eq!(offset, position.into());
314 } 314 }
@@ -1161,5 +1161,4 @@ fn func(foo: i32) { if true { <|>foo; }; }
1161 ); 1161 );
1162 assert_impl_action(&actions[0], 6); 1162 assert_impl_action(&actions[0], 6);
1163 } 1163 }
1164
1165} 1164}
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs
index a9601400f..a56718d3f 100644
--- a/crates/ra_ide/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -66,7 +66,7 @@ pub use crate::{
66 display::{file_structure, FunctionSignature, NavigationTarget, StructureNode}, 66 display::{file_structure, FunctionSignature, NavigationTarget, StructureNode},
67 expand_macro::ExpandedMacro, 67 expand_macro::ExpandedMacro,
68 folding_ranges::{Fold, FoldKind}, 68 folding_ranges::{Fold, FoldKind},
69 hover::{HoverResult, HoverAction, HoverConfig}, 69 hover::{HoverAction, HoverConfig, HoverResult},
70 inlay_hints::{InlayHint, InlayHintsConfig, InlayKind}, 70 inlay_hints::{InlayHint, InlayHintsConfig, InlayKind},
71 references::{Declaration, Reference, ReferenceAccess, ReferenceKind, ReferenceSearchResult}, 71 references::{Declaration, Reference, ReferenceAccess, ReferenceKind, ReferenceSearchResult},
72 runnables::{Runnable, RunnableKind, TestId}, 72 runnables::{Runnable, RunnableKind, TestId},
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index e7c859577..14c4fe9ad 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -11,7 +11,7 @@ use std::{ffi::OsString, path::PathBuf};
11 11
12use lsp_types::ClientCapabilities; 12use lsp_types::ClientCapabilities;
13use ra_flycheck::FlycheckConfig; 13use ra_flycheck::FlycheckConfig;
14use ra_ide::{AssistConfig, CompletionConfig, InlayHintsConfig, HoverConfig}; 14use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
15use ra_project_model::{CargoConfig, JsonProject, ProjectManifest}; 15use ra_project_model::{CargoConfig, JsonProject, ProjectManifest};
16use serde::Deserialize; 16use serde::Deserialize;
17 17
@@ -342,7 +342,8 @@ impl Config {
342 342
343 self.assist.allow_snippets(false); 343 self.assist.allow_snippets(false);
344 if let Some(experimental) = &caps.experimental { 344 if let Some(experimental) = &caps.experimental {
345 let get_bool = |index: &str| experimental.get(index).and_then(|it| it.as_bool()) == Some(true); 345 let get_bool =
346 |index: &str| experimental.get(index).and_then(|it| it.as_bool()) == Some(true);
346 347
347 let snippet_text_edit = get_bool("snippetTextEdit"); 348 let snippet_text_edit = get_bool("snippetTextEdit");
348 self.assist.allow_snippets(snippet_text_edit); 349 self.assist.allow_snippets(snippet_text_edit);