aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/invert_if.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-11-06 21:39:02 +0000
committerGitHub <[email protected]>2020-11-06 21:39:02 +0000
commit7f12a1f225c7d3397f27964ce039b55d680772d3 (patch)
tree26043b20588eae4510e28249f11a094aacaf190d /crates/assists/src/handlers/invert_if.rs
parentcdddcaee851be1cff1eeb23599f5a58f1b30a927 (diff)
parent6158304f8b64ef7cdf58b14bc675baf33a27a853 (diff)
Merge #6485
6485: Remove RAW literals r=matklad a=matklad bors r+ 🤖 closes https://github.com/rust-analyzer/rust-analyzer/issues/6308 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/invert_if.rs')
-rw-r--r--crates/assists/src/handlers/invert_if.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/invert_if.rs b/crates/assists/src/handlers/invert_if.rs
index 461fcf862..ea722b91b 100644
--- a/crates/assists/src/handlers/invert_if.rs
+++ b/crates/assists/src/handlers/invert_if.rs
@@ -29,7 +29,7 @@ use crate::{
29// ``` 29// ```
30 30
31pub(crate) fn invert_if(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { 31pub(crate) fn invert_if(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
32 let if_keyword = ctx.find_token_at_offset(T![if])?; 32 let if_keyword = ctx.find_token_syntax_at_offset(T![if])?;
33 let expr = ast::IfExpr::cast(if_keyword.parent())?; 33 let expr = ast::IfExpr::cast(if_keyword.parent())?;
34 let if_range = if_keyword.text_range(); 34 let if_range = if_keyword.text_range();
35 let cursor_in_range = if_range.contains_range(ctx.frange.range); 35 let cursor_in_range = if_range.contains_range(ctx.frange.range);