One-line preview of a body (first 160 chars, newlines collapsed).
(body: &str)
| 939 | |
| 940 | /// One-line preview of a body (first 160 chars, newlines collapsed). |
| 941 | fn preview(body: &str) -> String { |
| 942 | let flat: String = body.split_whitespace().collect::<Vec<_>>().join(" "); |
| 943 | truncate_chars(&flat, 160) |
| 944 | } |
| 945 | |
| 946 | // Tests |
| 947 |