File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -185,11 +185,9 @@ impl fmt::Debug for VarsOs {
185185///
186186/// # Errors
187187///
188- /// Errors if the environment variable is not present.
189- /// Errors if the environment variable is not valid Unicode. If this is not desired, consider using
190- /// [`var_os`].
191- /// May error if the `key` is empty, contains an ASCII equals sign `'='`, or contains the NUL character `'\0'`.
192- /// May error when the value contains the NUL character.
188+ /// Returns `[None]` if the environment variable isn't set.
189+ /// Returns `[None]` if the environment variable is not valid Unicode. If this is not
190+ /// desired, consider using [`var_os`].
193191///
194192/// # Examples
195193///
@@ -223,9 +221,8 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
223221///
224222/// # Errors
225223///
226- /// Errors if the variable isn't set.
227- /// May error if the `key` is empty, contains an ASCII equals sign `'='`, or contains the NUL character `'\0'`.
228- /// May error when the value contains the NUL character.
224+ /// Returns `[None]` if the variable isn't set.
225+ /// May return `[None]` if the variable value contains the NUL character.
229226///
230227/// # Examples
231228///
You can’t perform that action at this time.
0 commit comments