Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Any public traits that takes a &[T] as argument should be rewriten to accept an Iterator instead #2104

Open
tdelabro opened this issue Jul 24, 2024 · 0 comments

Comments

@tdelabro
Copy link
Contributor

tdelabro commented Jul 24, 2024

This is important for performance reasons.
It avoids needless .collect on the caller side.

It's also perfectly backward-compatible.

[ExactSizeIterator](https://doc.rust-lang.org/std/iter/trait.ExactSizeIterator.html] can be used instead for the cases where the method was using the size of the array (input.len())

Eg.:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant