Skip to content

Commit 7d26963

Browse files
Break up long first paragraph
Further referring to `var_os` as a "function" (like in `var`), rather than "method".
1 parent 4cb73cc commit 7d26963

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

library/std/src/env.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,12 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
236236
}
237237

238238
/// Fetches the environment variable `key` from the current process, returning
239-
/// [`None`] if the environment variable isn't set. It may return `None` also
240-
/// if the environment variable's name contains
239+
/// [`None`] if the variable isn't set or if there is another error.
240+
///
241+
/// It may return `None` if the environment variable's name contains
241242
/// the equal sign character (`=`) or the NUL character.
242243
///
243-
/// Note that the method will not check if the environment variable
244+
/// Note that this function will not check if the environment variable
244245
/// is valid Unicode. If you want to have an error on invalid UTF-8,
245246
/// use the [`var`] function instead.
246247
///

0 commit comments

Comments
 (0)