Skip to content

Commit 181cf20

Browse files
committed
fix: doctest
1 parent 6277d9e commit 181cf20

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libs/@local/hashql/core/src/id/array.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,13 @@ impl<I: Id, T, const N: usize> IdArray<I, T, N> {
242242
/// # use hashql_core::{id::{IdArray, Id as _}, newtype};
243243
/// # newtype!(struct SlotId(u32 is 0..=2));
244244
/// let array = IdArray::<SlotId, &str, 3>::from_raw(["a", "b", "c"]);
245-
/// let pairs: Vec<_> = array.into_iter_enumerated().into_iter().collect();
245+
/// let pairs: Vec<_> = array.into_iter_enumerated().collect();
246246
///
247247
/// assert_eq!(pairs[0], (SlotId::new(0), "a"));
248248
/// assert_eq!(pairs[2], (SlotId::new(2), "c"));
249249
/// ```
250250
#[inline]
251-
pub fn into_iter_enumerated(
252-
self,
253-
) -> impl IntoIterator<Item = (I, T), IntoIter: ExactSizeIterator> {
251+
pub fn into_iter_enumerated(self) -> impl ExactSizeIterator<Item = (I, T)> {
254252
// Elide bound checks from subsequent calls to `I::from_usize`
255253
let _: I = I::from_usize(self.len().saturating_sub(1));
256254

0 commit comments

Comments
 (0)