We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c22c039 commit 9883435Copy full SHA for 9883435
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()?;
27
let target = token.syntax().text_range();
28
29
- if value.is_empty() || value.chars().count() > 1 {
+ if value.chars().take(2).count() != 1 {
30
return None;
31
}
32
0 commit comments