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:
@@ -19,7 +19,7 @@ use std::collections::HashMap;
|
|||||||
/// open) above the active user's collapsible shared-file tree.
|
/// open) above the active user's collapsible shared-file tree.
|
||||||
///
|
///
|
||||||
/// `downloads` is the window's transfer list; a file row whose download is
|
/// `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(
|
pub fn render_browse_pane(
|
||||||
frame: &mut Frame,
|
frame: &mut Frame,
|
||||||
area: Rect,
|
area: Rect,
|
||||||
@@ -175,7 +175,7 @@ fn render_browse_one(
|
|||||||
// transfer's glyph while its download lives in the
|
// transfer's glyph while its download lives in the
|
||||||
// list: ⋯ queued, ↯ active, ⏸ paused, ✓ done.
|
// list: ⋯ queued, ↯ active, ⏸ paused, ✓ done.
|
||||||
let marker = status.map_or_else(
|
let marker = status.map_or_else(
|
||||||
|| Span::raw(" ".to_string()),
|
|| Span::raw(" "),
|
||||||
|status| {
|
|status| {
|
||||||
let (glyph, style) =
|
let (glyph, style) =
|
||||||
download_status_glyph(status);
|
download_status_glyph(status);
|
||||||
|
|||||||
Reference in New Issue
Block a user