commit 02ff0cdd695a58bd0c9e62c6224b67f75a9fe625
parent 59de3bbba65ae334aa66229356d12d980e5d0936
Author: William Casarin <jb55@jb55.com>
Date: Wed, 4 Feb 2026 20:52:29 -0800
clippy: fixes
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/crates/notedeck_columns/src/ui/side_panel.rs b/crates/notedeck_columns/src/ui/side_panel.rs
@@ -71,6 +71,7 @@ impl SidePanelResponse {
}
impl<'a> DesktopSidePanel<'a> {
+ #[allow(clippy::too_many_arguments)]
pub fn new(
selected_account: &'a UserAccount,
decks_cache: &'a DecksCache,
@@ -252,7 +253,7 @@ impl<'a> DesktopSidePanel<'a> {
// Draw border if Accounts route is active
let is_accounts_active = self
.current_route
- .map_or(false, |r| matches!(r, Route::Accounts(_)));
+ .is_some_and(|r| matches!(r, Route::Accounts(_)));
if is_accounts_active {
let rect = resp.rect;
let radius = avatar_size / 2.0;
diff --git a/crates/notedeck_dashboard/src/sparkline.rs b/crates/notedeck_dashboard/src/sparkline.rs
@@ -3,16 +3,16 @@ use egui::{Color32, Pos2, Response, Sense, Stroke, Ui, Vec2};
#[derive(Clone, Copy)]
pub struct SparkStyle {
pub stroke: Stroke,
- pub fill_alpha: u8,
- pub rounding: f32,
+ //pub fill_alpha: u8,
+ //pub rounding: f32,
}
impl Default for SparkStyle {
fn default() -> Self {
Self {
stroke: Stroke::new(1.5, Color32::WHITE),
- fill_alpha: 40,
- rounding: 3.0,
+ //fill_alpha: 40,
+ //rounding: 3.0,
}
}
}
diff --git a/crates/notedeck_messages/src/ui/convo.rs b/crates/notedeck_messages/src/ui/convo.rs
@@ -56,7 +56,7 @@ impl<'a> ConversationUi<'a> {
Frame::new().fill(ui.visuals().panel_fill).show(ui, |ui| {
ui.with_layout(Layout::bottom_up(Align::Min), |ui| {
// Calculate height based on number of lines (min 1, max 8)
- let line_count = self.state.composer.lines().count().max(1).min(8);
+ let line_count = self.state.composer.lines().count().clamp(1, 8);
let line_height = 20.0; // approximate line height
let base_height = 44.0; // padding + margin
let composer_height = base_height + (line_count as f32 * line_height);