Skip to content

Commit

Permalink
Update std::os deprecation warnings
Browse files Browse the repository at this point in the history
They now point to the correct locations in std::env
  • Loading branch information
aturon committed Feb 16, 2015
1 parent 39b463f commit 4115931
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libstd/os.rs
Expand Up @@ -132,7 +132,7 @@ pub fn env() -> Vec<(String,String)> {

/// Returns a vector of (variable, value) byte-vector pairs for all the
/// environment variables of the current process.
#[deprecated(since = "1.0.0", reason = "use env::vars instead")]
#[deprecated(since = "1.0.0", reason = "use env::vars_os instead")]
#[unstable(feature = "os")]
pub fn env_as_bytes() -> Vec<(Vec<u8>, Vec<u8>)> {
env::vars_os().map(|(k, v)| (byteify(k), byteify(v))).collect()
Expand All @@ -159,7 +159,7 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>, Vec<u8>)> {
/// None => println!("{} is not defined in the environment.", key)
/// }
/// ```
#[deprecated(since = "1.0.0", reason = "use env::var or env::var_os instead")]
#[deprecated(since = "1.0.0", reason = "use env::var instead")]
#[unstable(feature = "os")]
pub fn getenv(n: &str) -> Option<String> {
env::var(n).ok()
Expand All @@ -171,7 +171,7 @@ pub fn getenv(n: &str) -> Option<String> {
/// # Panics
///
/// Panics if `n` has any interior NULs.
#[deprecated(since = "1.0.0", reason = "use env::var instead")]
#[deprecated(since = "1.0.0", reason = "use env::var_os instead")]
#[unstable(feature = "os")]
pub fn getenv_as_bytes(n: &str) -> Option<Vec<u8>> {
env::var_os(n).map(byteify)
Expand Down Expand Up @@ -732,7 +732,7 @@ pub fn args() -> Vec<String> {

/// Returns the arguments which this program was started with (normally passed
/// via the command line) as byte vectors.
#[deprecated(since = "1.0.0", reason = "use env::args_raw instead")]
#[deprecated(since = "1.0.0", reason = "use env::args_os instead")]
#[unstable(feature = "os")]
pub fn args_as_bytes() -> Vec<Vec<u8>> {
real_args_as_bytes()
Expand Down

0 comments on commit 4115931

Please sign in to comment.