diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-11 11:47:53 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-11 13:46:35 -0800 |
| commit | a828e7948069f310dc5b33be8edb65e5e8e0cf9a (patch) | |
| tree | 9806752d95d3ddeb06276eae62fe7b97fe0b1e4e /src/libstd/rt/backtrace.rs | |
| parent | 446bc899b28e988f4252beca0d1858e7f7d866b1 (diff) | |
std: Tweak the std::env OsString/String interface
This commit tweaks the interface of the `std::env` module to make it more ergonomic for common usage: * `env::var` was renamed to `env::var_os` * `env::var_string` was renamed to `env::var` * `env::args` was renamed to `env::args_os` * `env::args` was re-added as a panicking iterator over string values * `env::vars` was renamed to `env::vars_os` * `env::vars` was re-added as a panicking iterator over string values. This should make common usage (e.g. unicode values everywhere) more ergonomic as well as "the default". This is also a breaking change due to the differences of what's yielded from each of these functions, but migration should be fairly easy as the defaults operate over `String` which is a common type to use. [breaking-change]
Diffstat (limited to 'src/libstd/rt/backtrace.rs')
| -rw-r--r-- | src/libstd/rt/backtrace.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index 2af5a486d0d..ced84d7551e 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -29,7 +29,7 @@ pub fn log_enabled() -> bool { _ => {} } - let val = match env::var("RUST_BACKTRACE") { + let val = match env::var_os("RUST_BACKTRACE") { Some(..) => 2, None => 1, }; |
