diff --git a/src/params.rs b/src/params.rs index 2440591..464fb4d 100644 --- a/src/params.rs +++ b/src/params.rs @@ -201,6 +201,15 @@ impl<'ps, 'k, 'v> Iterator for ParamsIter<'ps, 'k, 'v> { } } } +impl ExactSizeIterator for ParamsIter<'_, '_, '_> { + fn len(&self) -> usize { + match self.kind { + ParamsIterKind::None => 0, + ParamsIterKind::Small(ref iter) => iter.len(), + ParamsIterKind::Large(ref iter) => iter.len(), + } + } +} #[cfg(test)] mod tests {