One-line preview of a body (first 160 chars, newlines collapsed).
(body: &str)
| 989 | |
| 990 | /// One-line preview of a body (first 160 chars, newlines collapsed). |
| 991 | fn preview(body: &str) -> String { |
| 992 | let flat: String = body.split_whitespace().collect::<Vec<_>>().join(" "); |
| 993 | truncate_chars(&flat, 160) |
| 994 | } |
| 995 | |
| 996 | // Tests |
| 997 |