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.
This commit is contained in:
Michel de Graaf
2026-09-10 09:23:18 +02:00
parent 3a49c551ea
commit 0703f22ad7
+2 -2
View File
@@ -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);