diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index f1403cb5d7..9b0d935afb 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs @@ -388,7 +388,7 @@ impl AnalysisImpl { .text() .slice(range_search) .to_string() - .matches(",") + .matches(',') .count(); // 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 9ee1df2810..9d8df25c3a 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 let prefix = TextRange::from_to(ws.range().start(), offset) - ws.range().start(); let ws_suffix = &ws_text.as_str()[suffix]; let ws_prefix = &ws_text.as_str()[prefix]; - if ws_text.contains("\n") && !ws_suffix.contains("\n") { + if ws_text.contains('\n') && !ws_suffix.contains('\n') { if let Some(node) = ws.next_sibling() { let start = match ws_prefix.rfind('\n') { 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 c25b638520..49bd7895a6 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( params: req::WorkspaceSymbolParams, token: JobToken, ) -> Result>> { - let all_symbols = params.query.contains("#"); - let libs = params.query.contains("*"); + let all_symbols = params.query.contains('#'); + let libs = params.query.contains('*'); let query = { let query: String = params .query diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs index 444745be5d..7c5410d3c7 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)> { block.map(|(_, line)| line).chain(::std::iter::once("")), "\n", ); - assert!(!text.trim().is_empty() && text.ends_with("\n")); + assert!(!text.trim().is_empty() && text.ends_with('\n')); res.push((start_line, Test { name, text })) } res