-
Notifications
You must be signed in to change notification settings - Fork 16
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
Using var_os instead of var? #26
Comments
Hi. Thanks for the report. I do not mind adding this change. I've tried this one with
I works as I expected, but I guess I miss some details. |
It probably would work, except for when the environment variable doesn't contain valid UTF-8 (like on Windows where the OS strings are UTF-16). Unfortunately there doesn't seem to be a way to convert these to/from |
I have prepared an example on the Rust playground which demonstrates how using |
I have noticed that this crate uses
env::var
instead of theenv::var_os
method. For some types, such asPathBuf
there is a need to start withOsStrBuf
, and given that most of this library uses theInto<T>
(orTryInto<T>
) it might be possible to do this change without exposing it to the outside world.The text was updated successfully, but these errors were encountered: