chore: Another round of style lints fixes (#17519)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
cfd43572c1
commit
095a08d9c8
33 changed files with 67 additions and 82 deletions
|
@ -202,9 +202,7 @@ impl VimCommand {
|
|||
query = &query[..query.len() - 1];
|
||||
}
|
||||
|
||||
let Some(suffix) = query.strip_prefix(self.prefix) else {
|
||||
return None;
|
||||
};
|
||||
let suffix = query.strip_prefix(self.prefix)?;
|
||||
if !self.suffix.starts_with(suffix) {
|
||||
return None;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -875,9 +875,7 @@ fn surrounding_markers(
|
|||
}
|
||||
}
|
||||
|
||||
let Some(mut opening) = opening else {
|
||||
return None;
|
||||
};
|
||||
let mut opening = opening?;
|
||||
|
||||
let mut matched_opens = 0;
|
||||
let mut closing = None;
|
||||
|
@ -905,9 +903,7 @@ fn surrounding_markers(
|
|||
before_ch = ch;
|
||||
}
|
||||
|
||||
let Some(mut closing) = closing else {
|
||||
return None;
|
||||
};
|
||||
let mut closing = closing?;
|
||||
|
||||
if around && !search_across_lines {
|
||||
let mut found = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue