aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2018-10-16 16:45:10 +0100
committerAlan Du <[email protected]>2018-10-18 00:42:23 +0100
commit5db663d61fb8b006e3b84ef3bcc9cddbe94e5f49 (patch)
treeb4b904c3580f975bc69f1f68ff938fe70da11bfa /crates/ra_editor
parent4dbf0379ccd5c7643d48658f0ecc224add5a5c5c (diff)
Clippy lint: single-character string constant
Diffstat (limited to 'crates/ra_editor')
-rw-r--r--crates/ra_editor/src/extend_selection.rs2
1 files changed, 1 insertions, 1 deletions
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),