(cell: &str, width: usize, align: Align)
| 356 | } |
| 357 | |
| 358 | fn pad_cell(cell: &str, width: usize, align: Align) -> String { |
| 359 | let visible = visible_width(cell); |
| 360 | if visible >= width { |
| 361 | return cell.to_string(); |
| 362 | } |
| 363 | let padding = width - visible; |
| 364 | match align { |
| 365 | Align::Left => format!("{cell}{}", " ".repeat(padding)), |
| 366 | Align::Right => format!("{}{cell}", " ".repeat(padding)), |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | fn border(left: char, middle: char, right: char, widths: &[usize]) -> String { |
| 371 | let mut line = String::new(); |
no test coverage detected