Function
truncate_column
(value: &str, width: usize)
Source from the content-addressed store, hash-verified
| 400 | } |
| 401 | |
| 402 | fn truncate_column(value: &str, width: usize) -> String { |
| 403 | let count = value.chars().count(); |
| 404 | if count <= width { |
| 405 | value.to_string() |
| 406 | } else if width <= 1 { |
| 407 | "…".to_string() |
| 408 | } else { |
| 409 | format!("{}…", value.chars().take(width - 1).collect::<String>()) |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | fn todo_status_marker(status: &str) -> (&'static str, Option<&str>) { |
| 414 | match status.to_ascii_lowercase().as_str() { |
Callers
nothing calls this directly
Tested by
no test coverage detected