Skip to content

load[_unchecked] and store[_unchecked] take an unnecessary offset parameter #272

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

Closed
eira-fransham opened this issue Jan 10, 2018 · 2 comments

Comments

@eira-fransham
Copy link
Contributor

eira-fransham commented Jan 10, 2018

Currently load, load_unchecked, store and store_unchecked essentially reimplement slicing logic with their offset parameter. They could instead take only one parameter (the slice) and have the user replace:

u32s::load(my_slice, n)

with

u32s::load(&my_slice[n..])

I believe there is no downside to doing this other than the fact that it would require a major version bump (although every version bump is major right now).

@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 1, 2018

I ran into this while reworking the portable vector types API and decided to drop the offset parameter.

@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 7, 2018

This was fixed in #338 .

@gnzlbg gnzlbg closed this as completed Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants