(&self)
| 254 | } |
| 255 | |
| 256 | fn size_hint(&self) -> (usize, Option<usize>) { |
| 257 | if self.finished { |
| 258 | (0, Some(0)) |
| 259 | } else { |
| 260 | // At least 1 item, at most content.len() / separator.len() + 1 |
| 261 | let max_lines = self.content.len() / self.separator.len().max(1) + 1; |
| 262 | (1, Some(max_lines)) |
| 263 | } |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | /// Split content into lines using the default newline separator. |