mirror of
https://github.com/instant-labs/instant-segment.git
synced 2025-01-31 13:12:12 +00:00
Guarantee known size of the output iterator
This commit is contained in:
parent
d190aa5240
commit
cd06fbecc8
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "instant-segment"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"]
|
||||
edition = "2018"
|
||||
license = "Apache-2.0"
|
||||
|
@ -214,7 +214,7 @@ impl Search {
|
||||
}
|
||||
|
||||
/// 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())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user