The tree prefix for a line at the given depth. Roots start at column 0 (`dev`, or `* dev` when current); children are indented two spaces per level with a `- ` bullet (` - baby-bird-123`).
(entry: &ViewEntry, depth: usize)
| 351 | /// Roots start at column 0 (`dev`, or `* dev` when current); children are |
| 352 | /// indented two spaces per level with a `- ` bullet (` - baby-bird-123`). |
| 353 | fn tree_prefix(entry: &ViewEntry, depth: usize) -> String { |
| 354 | match depth { |
| 355 | 0 if entry.is_current => "* ".to_string(), |
| 356 | 0 => String::new(), |
| 357 | _ => format!( |
| 358 | "{}- {}", |
| 359 | " ".repeat(depth), |
| 360 | if entry.is_current { "* " } else { "" } |
| 361 | ), |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | /// Render one view line for the default (metadata) mode. |
| 366 | pub(crate) fn render_line(entry: &ViewEntry, depth: usize, width: usize) -> String { |