diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-12 14:08:20 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-12 14:08:20 +0000 |
commit | 74ecfc2729d2d0771304a4fed3afdfa2c2d99b43 (patch) | |
tree | eacf6870c6fab537d787bc2764901028ce595f0a /crates/ra_assists | |
parent | a36e310229f13d6959d6ce95c99b659700cefc9a (diff) | |
parent | 4fd361343449bcdf7af4642851dc5dbf772f1a68 (diff) |
Merge #804
804: Fix some typos r=killercup a=killercup
Cherry-picked and updated from my now-closed PR. All credit goes to [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker).
Co-authored-by: Pascal Hertleif <[email protected]>
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_assists/src/remove_dbg.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index c607a5142..7bd9b5ae6 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | //! `ra_assits` crate provides a bunch of code assists, aslo known as code | 1 | //! `ra_assits` crate provides a bunch of code assists, also known as code |
2 | //! actions (in LSP) or intentions (in IntelliJ). | 2 | //! actions (in LSP) or intentions (in IntelliJ). |
3 | //! | 3 | //! |
4 | //! An assist is a micro-refactoring, which is automatically activated in | 4 | //! An assist is a micro-refactoring, which is automatically activated in |
diff --git a/crates/ra_assists/src/remove_dbg.rs b/crates/ra_assists/src/remove_dbg.rs index db260c6ca..2bed270a1 100644 --- a/crates/ra_assists/src/remove_dbg.rs +++ b/crates/ra_assists/src/remove_dbg.rs | |||
@@ -17,9 +17,9 @@ pub(crate) fn remove_dbg(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> | |||
17 | 17 | ||
18 | let macro_range = macro_call.syntax().range(); | 18 | let macro_range = macro_call.syntax().range(); |
19 | 19 | ||
20 | // If the cursor is inside the macrocall, we'll try to maintain | 20 | // If the cursor is inside the macro call, we'll try to maintain the cursor |
21 | // the cursor position by subtracting the length of dbg!( from the start | 21 | // position by subtracting the length of dbg!( from the start of the file |
22 | // of the filerange, otherwise we'll default to using the start of the macrocall | 22 | // range, otherwise we'll default to using the start of the macro call |
23 | let cursor_pos = { | 23 | let cursor_pos = { |
24 | let file_range = ctx.frange.range; | 24 | let file_range = ctx.frange.range; |
25 | 25 | ||
@@ -61,7 +61,7 @@ fn is_valid_macrocall(macro_call: &ast::MacroCall, macro_name: &str) -> Option<b | |||
61 | let path = macro_call.path()?; | 61 | let path = macro_call.path()?; |
62 | let name_ref = path.segment()?.name_ref()?; | 62 | let name_ref = path.segment()?.name_ref()?; |
63 | 63 | ||
64 | // Make sure it is actually a dbg-macrocall, dbg followed by ! | 64 | // Make sure it is actually a dbg-macro call, dbg followed by ! |
65 | let excl = path.syntax().next_sibling()?; | 65 | let excl = path.syntax().next_sibling()?; |
66 | 66 | ||
67 | if name_ref.text() != macro_name || excl.kind() != EXCL { | 67 | if name_ref.text() != macro_name || excl.kind() != EXCL { |