Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.
This repository was 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

Description

@tdelabro

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.:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions