From cd06fbecc859dfcf0b37fc803cbf5f94ca1d0901 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 10 Feb 2021 13:06:57 +0100 Subject: [PATCH] Guarantee known size of the output iterator --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0ac9b27..c9a4c76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "instant-segment" -version = "0.6.0" +version = "0.6.1" authors = ["Dirkjan Ochtman "] edition = "2018" license = "Apache-2.0" diff --git a/src/lib.rs b/src/lib.rs index f61d026..e0d6b45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -214,7 +214,7 @@ impl Search { } /// Get the segmentation result - pub fn split(&self) -> impl Iterator { + pub fn split(&self) -> impl Iterator + ExactSizeIterator { self.result.iter().map(|v| v.as_str()) } }