Guarantee known size of the output iterator

This commit is contained in:
Dirkjan Ochtman 2021-02-10 13:06:57 +01:00
parent d190aa5240
commit cd06fbecc8
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "instant-segment" name = "instant-segment"
version = "0.6.0" version = "0.6.1"
authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"] authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"

View File

@ -214,7 +214,7 @@ impl Search {
} }
/// Get the segmentation result /// Get the segmentation result
pub fn split(&self) -> impl Iterator<Item = &str> { pub fn split(&self) -> impl Iterator<Item = &str> + ExactSizeIterator {
self.result.iter().map(|v| v.as_str()) self.result.iter().map(|v| v.as_str())
} }
} }