-
Notifications
You must be signed in to change notification settings - Fork 31
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
Return the environment variables currently known to shell #78
Conversation
Yes, this makes sense to me! I paused a bit on the allocating API, but I think that's fine --- the std forces an allocation as well, and, while it has a separate itearator, I don't think that's going to be much of a win over returning a vector. However, let's sort the vector before returning, to increase determinism, like we do in |
@matklad I usually use |
unstable sort is fine --- the keys are guaranteed to be unique. We might actually go and pass a custom comparison function, which only compares first elements of the tuples, to reduce the code bloat in a minor way, as we know that comparing the second element will never be necessary. |
This is now ready for final review, I think! |
This now exists on master, thanks for the pull request! |
Addresses #77
TO DETERMINE:
vars
andvars_os
?vars
/vars_os
be? For now, I defaulted to a "minimal iterable which does not retain references to the actual data" (aVec
) (resolved)