From 0703f22ad731c33c641322c3a084e5284927af93 Mon Sep 17 00:00:00 2001 From: Michel de Graaf Date: Thu, 10 Sep 2026 09:23:18 +0200 Subject: [PATCH] refactor: drop the per-row String behind the browse marker's gap Span::raw takes a &'static str; the to_string allocated for every unmarked row of every frame. Points the doc comment at the Downloads pane, which is what actually marks downloads. --- soulseek-rs/src/ui/panes/browse_pane.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soulseek-rs/src/ui/panes/browse_pane.rs b/soulseek-rs/src/ui/panes/browse_pane.rs index fde39b9..ab9fbd6 100644 --- a/soulseek-rs/src/ui/panes/browse_pane.rs +++ b/soulseek-rs/src/ui/panes/browse_pane.rs @@ -19,7 +19,7 @@ use std::collections::HashMap; /// open) above the active user's collapsible shared-file tree. /// /// `downloads` is the window's transfer list; a file row whose download is -/// there shows its status glyph, the way the results pane marks its own. +/// there shows the same status glyph the Downloads pane gives it. pub fn render_browse_pane( frame: &mut Frame, area: Rect, @@ -175,7 +175,7 @@ fn render_browse_one( // transfer's glyph while its download lives in the // list: ⋯ queued, ↯ active, ⏸ paused, ✓ done. let marker = status.map_or_else( - || Span::raw(" ".to_string()), + || Span::raw(" "), |status| { let (glyph, style) = download_status_glyph(status);