Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add array_windows to as opposed to tuple_windows #688

Open
jamespharaoh opened this issue Mar 27, 2023 · 1 comment
Open

Add array_windows to as opposed to tuple_windows #688

jamespharaoh opened this issue Mar 27, 2023 · 1 comment
Labels
const-generics Require Rust 1.51 or newer

Comments

@jamespharaoh
Copy link

Implementing array_windows as opposed to tuple_windows makes things more ergonomic. It would also allow a function to be generic over the number of items, for example:

fn <const LEN: usize> some_function () {
  some_iter.array_windows ().map (|arr: [u8; LEN]| do_something (arr));
}

Unless someone knows a reason why tuple_windows might be preferred over array_windows, the former could possibly be deprecated to keep the API simpler.

@phimuemue phimuemue added the const-generics Require Rust 1.51 or newer label Mar 27, 2023
@phimuemue
Copy link
Member

Hi there, we do not have const generics in our minimum supported Rust version.

See #547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
const-generics Require Rust 1.51 or newer
Projects
None yet
Development

No branches or pull requests

2 participants