aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src
diff options
context:
space:
mode:
authorCoenen Benjamin <[email protected]>2020-10-20 19:07:39 +0100
committerGitHub <[email protected]>2020-10-20 19:07:39 +0100
commit9883435e4e7f96a3e33ef3e38665189339db71eb (patch)
tree36ab31f381968175a4ed5636551dc9ea9f8e7cdd /crates/assists/src
parentc22c0395780c548d7b7fb557b1879e998921b01d (diff)
Update crates/assists/src/handlers/replace_string_with_char.rs
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists/src')
-rw-r--r--crates/assists/src/handlers/replace_string_with_char.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/replace_string_with_char.rs b/crates/assists/src/handlers/replace_string_with_char.rs
index 8408e4463..4ca87a8ec 100644
--- a/crates/assists/src/handlers/replace_string_with_char.rs
+++ b/crates/assists/src/handlers/replace_string_with_char.rs
@@ -26,7 +26,7 @@ pub(crate) fn replace_string_with_char(acc: &mut Assists, ctx: &AssistContext) -
26 let value = token.value()?; 26 let value = token.value()?;
27 let target = token.syntax().text_range(); 27 let target = token.syntax().text_range();
28 28
29 if value.is_empty() || value.chars().count() > 1 { 29 if value.chars().take(2).count() != 1 {
30 return None; 30 return None;
31 } 31 }
32 32