-
Notifications
You must be signed in to change notification settings - Fork 4
Expose iterators in API #6
Copy link
Copy link
Open
Description
Instead of taking/returning slice/Vec<...> the functions could take impl Iterator<Item=[u8; 2]>/return impl Iterator<Item=...> so that callers that don't need Vec do not need to allocate at all. (E.g. this is the case if the user wants to just write out the passphrase.) Requiring Item=[u8; 2] also side steps the evenness check completely.
I think with these adjustments it should be possible to make whole crate allocation-free. The current methods can be kept for backwards compatibility or as helpers for people who don't want to mess with iterators
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels