3 ms·
You'd write it as a type parameter with a type bound. There's a couple of different ways to write it, but one example: fn foo<I>(it: I) where I : Iterator<It
by AlotOfReading 2y ago
You'd write it as a type parameter with a type bound. There's a couple of different ways to write it, but one example:
fn foo<I>(it: I)
where
I : Iterator<Item = i32> {}