Auto-fix clippy::collapsible_if violations (#36428)
Release Notes: - N/A
This commit is contained in:
parent
9e8ec72bd5
commit
8f567383e4
281 changed files with 6628 additions and 7089 deletions
|
@ -583,15 +583,15 @@ impl TerminalElement {
|
|||
strikethrough,
|
||||
};
|
||||
|
||||
if let Some((style, range)) = hyperlink {
|
||||
if range.contains(&indexed.point) {
|
||||
if let Some(underline) = style.underline {
|
||||
result.underline = Some(underline);
|
||||
}
|
||||
if let Some((style, range)) = hyperlink
|
||||
&& range.contains(&indexed.point)
|
||||
{
|
||||
if let Some(underline) = style.underline {
|
||||
result.underline = Some(underline);
|
||||
}
|
||||
|
||||
if let Some(color) = style.color {
|
||||
result.color = color;
|
||||
}
|
||||
if let Some(color) = style.color {
|
||||
result.color = color;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1275,9 +1275,9 @@ impl Element for TerminalElement {
|
|||
}
|
||||
let text_paint_time = text_paint_start.elapsed();
|
||||
|
||||
if let Some(text_to_mark) = &marked_text_cloned {
|
||||
if !text_to_mark.is_empty() {
|
||||
if let Some(cursor_layout) = &original_cursor {
|
||||
if let Some(text_to_mark) = &marked_text_cloned
|
||||
&& !text_to_mark.is_empty()
|
||||
&& let Some(cursor_layout) = &original_cursor {
|
||||
let ime_position = cursor_layout.bounding_rect(origin).origin;
|
||||
let mut ime_style = layout.base_text_style.clone();
|
||||
ime_style.underline = Some(UnderlineStyle {
|
||||
|
@ -1303,14 +1303,11 @@ impl Element for TerminalElement {
|
|||
.paint(ime_position, layout.dimensions.line_height, window, cx)
|
||||
.log_err();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if self.cursor_visible && marked_text_cloned.is_none() {
|
||||
if let Some(mut cursor) = original_cursor {
|
||||
if self.cursor_visible && marked_text_cloned.is_none()
|
||||
&& let Some(mut cursor) = original_cursor {
|
||||
cursor.paint(origin, window, cx);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(mut element) = block_below_cursor_element {
|
||||
element.paint(window, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue