diff options
Diffstat (limited to 'crates/assists/src/handlers/remove_mut.rs')
-rw-r--r-- | crates/assists/src/handlers/remove_mut.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/remove_mut.rs b/crates/assists/src/handlers/remove_mut.rs index 44f41daa9..575b271f7 100644 --- a/crates/assists/src/handlers/remove_mut.rs +++ b/crates/assists/src/handlers/remove_mut.rs | |||
@@ -18,7 +18,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists}; | |||
18 | // } | 18 | // } |
19 | // ``` | 19 | // ``` |
20 | pub(crate) fn remove_mut(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | 20 | pub(crate) fn remove_mut(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { |
21 | let mut_token = ctx.find_token_at_offset(T![mut])?; | 21 | let mut_token = ctx.find_token_syntax_at_offset(T![mut])?; |
22 | let delete_from = mut_token.text_range().start(); | 22 | let delete_from = mut_token.text_range().start(); |
23 | let delete_to = match mut_token.next_token() { | 23 | let delete_to = match mut_token.next_token() { |
24 | Some(it) if it.kind() == SyntaxKind::WHITESPACE => it.text_range().end(), | 24 | Some(it) if it.kind() == SyntaxKind::WHITESPACE => it.text_range().end(), |