Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Use str::from_utf8_lossy() for os::env() and friends
Parse the environment by default with from_utf8_lossy. Also provide byte-vector equivalents (e.g. os::env_as_bytes()). Unfortunately, setenv() can't have a byte-vector equivalent because of Windows support, unless we want to define a setenv_bytes() that fails under Windows for non-UTF8 (or non-UTF16).
- Loading branch information
Showing
1 changed file
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from erickt
at lilyball@d22b164
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging kballard/rust/env-args-bytes = d22b164 into auto
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kballard/rust/env-args-bytes = d22b164 merged ok, testing candidate = 4c3cde60
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4258
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4242
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/2086
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4241
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/3341
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3347
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4256
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3350
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3349
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1196
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4249
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3350
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3356
exception: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4018
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from erickt
at lilyball@d22b164
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging kballard/rust/env-args-bytes = d22b164 into auto
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kballard/rust/env-args-bytes = d22b164 merged ok, testing candidate = fba32ea
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4248
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/2090
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/2092
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4247
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/3347
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3353
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4262
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/3350
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3356
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4264
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/3350
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3355
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/3424
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1202
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4255
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3356
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3362
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4024
d22b164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = fba32ea