Guarantee known size of the output iterator
This commit is contained in:
parent
d190aa5240
commit
cd06fbecc8
|
@ -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"
|
||||||
|
|
|
@ -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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue