chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -298,7 +298,7 @@ impl Vim {
return None;
}
let mut query = action.query.clone();
if query == "" {
if query.is_empty() {
query = search_bar.query(cx);
};
@ -365,7 +365,7 @@ impl Vim {
if replacement.is_case_sensitive {
options.set(SearchOptions::CASE_SENSITIVE, true)
}
let search = if replacement.search == "" {
let search = if replacement.search.is_empty() {
search_bar.query(cx)
} else {
replacement.search
@ -442,7 +442,7 @@ impl Replacement {
for c in chars {
if escaped {
escaped = false;
if phase == 1 && c.is_digit(10) {
if phase == 1 && c.is_ascii_digit() {
buffer.push('$')
// unescape escaped parens
} else if phase == 0 && c == '(' || c == ')' {