notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit e21e5516121399a43c284d13b321236746c219ca
parent 892c4dcc3c09ea5442f790f973dccd2cede241b2
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 23 Feb 2026 15:03:11 -0800

diff: fix clippy collapsible_if warnings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/ui/diff.rs | 32++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/crates/notedeck_dave/src/ui/diff.rs b/crates/notedeck_dave/src/ui/diff.rs @@ -37,15 +37,13 @@ pub fn file_update_ui(update: &FileUpdate, is_local: bool, ui: &mut Ui) { egui::ScrollArea::horizontal().show(ui, |ui| { if let Some(ctx) = &expanded { // "Expand above" button - if ctx.has_more_above { - if expand_button(ui, true) { - ui.data_mut(|d| { - d.insert_temp( - expand_id, - (extra_above + EXPAND_LINES_PER_CLICK, extra_below), - ); - }); - } + if ctx.has_more_above && expand_button(ui, true) { + ui.data_mut(|d| { + d.insert_temp( + expand_id, + (extra_above + EXPAND_LINES_PER_CLICK, extra_below), + ); + }); } // Build combined lines: above + core diff + below @@ -59,15 +57,13 @@ pub fn file_update_ui(update: &FileUpdate, is_local: bool, ui: &mut Ui) { render_diff_lines(&combined, &update.update_type, ctx.start_line, ui); // "Expand below" button - if ctx.has_more_below { - if expand_button(ui, false) { - ui.data_mut(|d| { - d.insert_temp( - expand_id, - (extra_above, extra_below + EXPAND_LINES_PER_CLICK), - ); - }); - } + if ctx.has_more_below && expand_button(ui, false) { + ui.data_mut(|d| { + d.insert_temp( + expand_id, + (extra_above, extra_below + EXPAND_LINES_PER_CLICK), + ); + }); } } else { // No expansion available: render as before (line numbers from 1)