aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_analysis/src/imp.rs2
-rw-r--r--crates/ra_editor/src/extend_selection.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs4
-rw-r--r--crates/tools/src/lib.rs2
4 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index f1403cb5d..9b0d935af 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -388,7 +388,7 @@ impl AnalysisImpl {
388 .text() 388 .text()
389 .slice(range_search) 389 .slice(range_search)
390 .to_string() 390 .to_string()
391 .matches(",") 391 .matches(',')
392 .count(); 392 .count();
393 393
394 // If we have a method call eat the first param since it's just self. 394 // If we have a method call eat the first param since it's just self.
diff --git a/crates/ra_editor/src/extend_selection.rs b/crates/ra_editor/src/extend_selection.rs
index 9ee1df281..9d8df25c3 100644
--- a/crates/ra_editor/src/extend_selection.rs
+++ b/crates/ra_editor/src/extend_selection.rs
@@ -63,7 +63,7 @@ fn extend_ws(root: SyntaxNodeRef, ws: SyntaxNodeRef, offset: TextUnit) -> TextRa
63 let prefix = TextRange::from_to(ws.range().start(), offset) - ws.range().start(); 63 let prefix = TextRange::from_to(ws.range().start(), offset) - ws.range().start();
64 let ws_suffix = &ws_text.as_str()[suffix]; 64 let ws_suffix = &ws_text.as_str()[suffix];
65 let ws_prefix = &ws_text.as_str()[prefix]; 65 let ws_prefix = &ws_text.as_str()[prefix];
66 if ws_text.contains("\n") && !ws_suffix.contains("\n") { 66 if ws_text.contains('\n') && !ws_suffix.contains('\n') {
67 if let Some(node) = ws.next_sibling() { 67 if let Some(node) = ws.next_sibling() {
68 let start = match ws_prefix.rfind('\n') { 68 let start = match ws_prefix.rfind('\n') {
69 Some(idx) => ws.range().start() + TextUnit::from((idx + 1) as u32), 69 Some(idx) => ws.range().start() + TextUnit::from((idx + 1) as u32),
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index c25b63852..49bd7895a 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -160,8 +160,8 @@ pub fn handle_workspace_symbol(
160 params: req::WorkspaceSymbolParams, 160 params: req::WorkspaceSymbolParams,
161 token: JobToken, 161 token: JobToken,
162) -> Result<Option<Vec<SymbolInformation>>> { 162) -> Result<Option<Vec<SymbolInformation>>> {
163 let all_symbols = params.query.contains("#"); 163 let all_symbols = params.query.contains('#');
164 let libs = params.query.contains("*"); 164 let libs = params.query.contains('*');
165 let query = { 165 let query = {
166 let query: String = params 166 let query: String = params
167 .query 167 .query
diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs
index 444745be5..7c5410d3c 100644
--- a/crates/tools/src/lib.rs
+++ b/crates/tools/src/lib.rs
@@ -50,7 +50,7 @@ pub fn collect_tests(s: &str) -> Vec<(usize, Test)> {
50 block.map(|(_, line)| line).chain(::std::iter::once("")), 50 block.map(|(_, line)| line).chain(::std::iter::once("")),
51 "\n", 51 "\n",
52 ); 52 );
53 assert!(!text.trim().is_empty() && text.ends_with("\n")); 53 assert!(!text.trim().is_empty() && text.ends_with('\n'));
54 res.push((start_line, Test { name, text })) 54 res.push((start_line, Test { name, text }))
55 } 55 }
56 res 56 res