Skip to content

Commit 4115931

Browse files
committed
Update std::os deprecation warnings
They now point to the correct locations in std::env
1 parent 39b463f commit 4115931

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/os.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub fn env() -> Vec<(String,String)> {
132132

133133
/// Returns a vector of (variable, value) byte-vector pairs for all the
134134
/// environment variables of the current process.
135-
#[deprecated(since = "1.0.0", reason = "use env::vars instead")]
135+
#[deprecated(since = "1.0.0", reason = "use env::vars_os instead")]
136136
#[unstable(feature = "os")]
137137
pub fn env_as_bytes() -> Vec<(Vec<u8>, Vec<u8>)> {
138138
env::vars_os().map(|(k, v)| (byteify(k), byteify(v))).collect()
@@ -159,7 +159,7 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>, Vec<u8>)> {
159159
/// None => println!("{} is not defined in the environment.", key)
160160
/// }
161161
/// ```
162-
#[deprecated(since = "1.0.0", reason = "use env::var or env::var_os instead")]
162+
#[deprecated(since = "1.0.0", reason = "use env::var instead")]
163163
#[unstable(feature = "os")]
164164
pub fn getenv(n: &str) -> Option<String> {
165165
env::var(n).ok()
@@ -171,7 +171,7 @@ pub fn getenv(n: &str) -> Option<String> {
171171
/// # Panics
172172
///
173173
/// Panics if `n` has any interior NULs.
174-
#[deprecated(since = "1.0.0", reason = "use env::var instead")]
174+
#[deprecated(since = "1.0.0", reason = "use env::var_os instead")]
175175
#[unstable(feature = "os")]
176176
pub fn getenv_as_bytes(n: &str) -> Option<Vec<u8>> {
177177
env::var_os(n).map(byteify)
@@ -732,7 +732,7 @@ pub fn args() -> Vec<String> {
732732

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

0 commit comments

Comments
 (0)