mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2026-03-12 20:00:31 +00:00
Update crates/assists/src/handlers/replace_string_with_char.rs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
parent
c22c039578
commit
9883435e4e
@ -26,7 +26,7 @@ pub(crate) fn replace_string_with_char(acc: &mut Assists, ctx: &AssistContext) -
|
||||
let value = token.value()?;
|
||||
let target = token.syntax().text_range();
|
||||
|
||||
if value.is_empty() || value.chars().count() > 1 {
|
||||
if value.chars().take(2).count() != 1 {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user