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