Skip to content

Commit fa7bf8a

Browse files
committed
Fix clippy warnings
1 parent ba8674b commit fa7bf8a

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

crates/edit/src/tui.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -973,16 +973,15 @@ impl Tui {
973973
}
974974

975975
match &mut node.content {
976-
NodeContent::Modal(title) => {
977-
if !title.is_empty() {
976+
NodeContent::Modal(title)
977+
if !title.is_empty() => {
978978
self.framebuffer.replace_text(
979979
node.outer.top,
980980
node.outer.left + 2,
981981
node.outer.right - 1,
982982
title,
983983
);
984984
}
985-
}
986985
NodeContent::Text(content) => self.render_styled_text(
987986
inner,
988987
node.intrinsic_size.width,
@@ -2864,8 +2863,8 @@ impl<'a> Context<'a, '_> {
28642863
self.set_input_consumed();
28652864
} else if self.tui.mouse_state != InputMouseState::None {
28662865
match self.tui.mouse_state {
2867-
InputMouseState::Left => {
2868-
if self.tui.mouse_is_drag {
2866+
InputMouseState::Left
2867+
if self.tui.mouse_is_drag => {
28692868
// We don't need to look up the previous track node,
28702869
// since it has a fixed size based on the container size.
28712870
let track_rect = Rect {
@@ -2898,7 +2897,6 @@ impl<'a> Context<'a, '_> {
28982897
self.set_input_consumed();
28992898
}
29002899
}
2901-
}
29022900
InputMouseState::Release => {
29032901
sc.scroll_offset_y_drag_start = CoordType::MIN;
29042902
}

0 commit comments

Comments
 (0)