aboutsummaryrefslogtreecommitdiff
path: root/crates/assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists')
-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