diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:35:12 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:42:47 +0530 |
| commit | ed583994493d9828533e0875fe6b143cd61efac8 (patch) | |
| tree | 9171cf560e704d8f61697fd83f4ba67675f21ffd /src/libstd/sync | |
| parent | bc1900f0d0ce09e26c5b0693d83516a4d0cf505f (diff) | |
| parent | 220bf41d252048310632bc357eb2de2cc2e62e8c (diff) | |
| download | rust-ed583994493d9828533e0875fe6b143cd61efac8.tar.gz rust-ed583994493d9828533e0875fe6b143cd61efac8.zip | |
Rollup merge of #22297 - nagisa:spring-cleanup, r=alexcrichton
This PR replaces uses of `os::getenv` with newly introduced `env::var{,_os}`.
Mostly did this as a background activity to procrastinate from procrastinating.
Tests appear to build and run fine. This includes benchmarks from test/bench directory.
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 2e60d684d68..d783acd57ac 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -1024,14 +1024,14 @@ impl fmt::Display for TryRecvError { mod test { use prelude::v1::*; - use os; + use std::env; use super::*; use thread::Thread; pub fn stress_factor() -> uint { - match os::getenv("RUST_TEST_STRESS") { - Some(val) => val.parse().unwrap(), - None => 1, + match env::var("RUST_TEST_STRESS") { + Ok(val) => val.parse().unwrap(), + Err(..) => 1, } } @@ -1546,14 +1546,14 @@ mod test { mod sync_tests { use prelude::v1::*; - use os; + use std::env; use thread::Thread; use super::*; pub fn stress_factor() -> uint { - match os::getenv("RUST_TEST_STRESS") { - Some(val) => val.parse().unwrap(), - None => 1, + match env::var("RUST_TEST_STRESS") { + Ok(val) => val.parse().unwrap(), + Err(..) => 1, } } |
