about summary refs log tree commit diff
path: root/library/std/src/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/env.rs')
-rw-r--r--library/std/src/env.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/library/std/src/env.rs b/library/std/src/env.rs
index 6f8ac17f12c..b3428fb23ba 100644
--- a/library/std/src/env.rs
+++ b/library/std/src/env.rs
@@ -120,11 +120,8 @@ pub struct VarsOs {
 /// # Examples
 ///
 /// ```
-/// use std::env;
-///
-/// // We will iterate through the references to the element returned by
-/// // env::vars();
-/// for (key, value) in env::vars() {
+/// // Print all environment variables.
+/// for (key, value) in std::env::vars() {
 ///     println!("{key}: {value}");
 /// }
 /// ```
@@ -150,11 +147,8 @@ pub fn vars() -> Vars {
 /// # Examples
 ///
 /// ```
-/// use std::env;
-///
-/// // We will iterate through the references to the element returned by
-/// // env::vars_os();
-/// for (key, value) in env::vars_os() {
+/// // Print all environment variables.
+/// for (key, value) in std::env::vars_os() {
 ///     println!("{key:?}: {value:?}");
 /// }
 /// ```