diff options
| author | Evan Jones <ej@evanjones.ca> | 2024-08-18 10:43:36 -0400 |
|---|---|---|
| committer | Evan Jones <ej@evanjones.ca> | 2024-08-18 10:43:36 -0400 |
| commit | b0023f5a417374aad980422b3f437f133676d4ef (patch) | |
| tree | 658245d636e92a285787536efb6c1c8b1d7461ef /library/std/src/env.rs | |
| parent | d5a7c459662a4868f4a38cbafb72dce7885e027d (diff) | |
| download | rust-b0023f5a417374aad980422b3f437f133676d4ef.tar.gz rust-b0023f5a417374aad980422b3f437f133676d4ef.zip | |
code review improvements
Diffstat (limited to 'library/std/src/env.rs')
| -rw-r--r-- | library/std/src/env.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/library/std/src/env.rs b/library/std/src/env.rs index 215b7b03f04..bbe191181c5 100644 --- a/library/std/src/env.rs +++ b/library/std/src/env.rs @@ -198,16 +198,12 @@ impl fmt::Debug for VarsOs { /// /// # Errors /// -/// This function returns [`VarError::NotPresent`] if the environment variable -/// isn't set. +/// Returns [`VarError::NotPresent`] if: +/// - The variable is not set. +/// - The variable's name contains an equal sign or NUL (`'='` or `'\0'`). /// -/// This function may return [`VarError::NotPresent`] if the -/// environment variable's name contains the equal sign character (`=`) or the -/// NUL character. -/// -/// This function will return [`VarError::NotUnicode`] if the environment -/// variable's value is not valid Unicode. If this is not desired, consider -/// using [`var_os`]. +/// Returns [`VarError::NotUnicode`] if the variable's value is not valid +/// Unicode. If this is not desired, consider using [`var_os`]. /// /// # Examples /// |
