One-line preview of a body (first 160 chars, newlines collapsed).
(body: &str)
| 831 | |
| 832 | /// One-line preview of a body (first 160 chars, newlines collapsed). |
| 833 | fn preview(body: &str) -> String { |
| 834 | let flat: String = body.split_whitespace().collect::<Vec<_>>().join(" "); |
| 835 | truncate_chars(&flat, 160) |
| 836 | } |
| 837 | |
| 838 | // Tests |
| 839 |