diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:18:36 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:19:03 +0300 |
| commit | 377b0900aede976b2d37a499bbd7b62c2e39b358 (patch) | |
| tree | b4a5a4431d36ed1a4e0a39c7d2ef2563ecac9bf4 /src/libstd/env.rs | |
| parent | 6e8e4f847c2ea02fec021ea15dfb2de6beac797a (diff) | |
| download | rust-377b0900aede976b2d37a499bbd7b62c2e39b358.tar.gz rust-377b0900aede976b2d37a499bbd7b62c2e39b358.zip | |
Use `const fn` to abstract away the contents of UnsafeCell & friends.
Diffstat (limited to 'src/libstd/env.rs')
| -rw-r--r-- | src/libstd/env.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 126ef38b918..0b9c659ea2e 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -23,8 +23,8 @@ use ffi::{OsStr, OsString}; use fmt; use io; use path::{Path, PathBuf}; -use sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering}; -use sync::{StaticMutex, MUTEX_INIT}; +use sync::atomic::{AtomicIsize, Ordering}; +use sync::StaticMutex; use sys::os as os_imp; /// Returns the current working directory as a `PathBuf`. @@ -70,7 +70,7 @@ pub fn set_current_dir<P: AsRef<Path>>(p: P) -> io::Result<()> { os_imp::chdir(p.as_ref()) } -static ENV_LOCK: StaticMutex = MUTEX_INIT; +static ENV_LOCK: StaticMutex = StaticMutex::new(); /// An iterator over a snapshot of the environment variables of this process. /// @@ -475,7 +475,7 @@ pub fn current_exe() -> io::Result<PathBuf> { os_imp::current_exe() } -static EXIT_STATUS: AtomicIsize = ATOMIC_ISIZE_INIT; +static EXIT_STATUS: AtomicIsize = AtomicIsize::new(0); /// Sets the process exit code /// |
