chore: Another round of style lints fixes (#17519)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-07 02:36:55 +02:00 committed by GitHub
parent cfd43572c1
commit 095a08d9c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 67 additions and 82 deletions

View file

@ -135,9 +135,7 @@ impl Vim {
self.store_visual_marks(cx);
let Some(pane) = self.pane(cx) else { return };
let result = pane.update(cx, |pane, cx| {
let Some(search_bar) = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>() else {
return None;
};
let search_bar = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>()?;
search_bar.update(cx, |search_bar, cx| {
let mut count = self.search.count;
let direction = self.search.direction;
@ -420,12 +418,9 @@ impl Replacement {
// but we do flip \( and \) to ( and ) (and vice-versa) in the pattern,
// and convert \0..\9 to $0..$9 in the replacement so that common idioms work.
pub(crate) fn parse(mut chars: Peekable<Chars>) -> Option<Replacement> {
let Some(delimiter) = chars
let delimiter = chars
.next()
.filter(|c| !c.is_alphanumeric() && *c != '"' && *c != '|' && *c != '\'')
else {
return None;
};
.filter(|c| !c.is_alphanumeric() && *c != '"' && *c != '|' && *c != '\'')?;
let mut search = String::new();
let mut replacement = String::new();