(area: Option<Rect>, col: u16, row: u16)
| 600 | } |
| 601 | |
| 602 | fn contains_point(area: Option<Rect>, col: u16, row: u16) -> bool { |
| 603 | let Some(area) = area else { |
| 604 | return false; |
| 605 | }; |
| 606 | let max_x = area.x.saturating_add(area.width); |
| 607 | let max_y = area.y.saturating_add(area.height); |
| 608 | col >= area.x && col < max_x && row >= area.y && row < max_y |
| 609 | } |
| 610 | |
| 611 | fn truncate_text(text: &str, max_chars: usize) -> String { |
| 612 | if max_chars == 0 { |
no outgoing calls
no test coverage detected