This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -185,9 +185,13 @@ impl fmt::Debug for VarsOs {
185185///
186186/// # Errors
187187///
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`].
188+ /// This function will return an error if the environment variable isn't set.
189+ ///
190+ /// This function may return an error if the environment variable's name contains
191+ /// the equal sign character (`=`) or the NUL character.
192+ ///
193+ /// This function will return an error if the environment variable's value is
194+ /// not valid Unicode. If this is not desired, consider using [`var_os`].
191195///
192196/// # Examples
193197///
@@ -221,8 +225,13 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
221225///
222226/// # Errors
223227///
224- /// Returns `[None]` if the variable isn't set.
225- /// May return `[None]` if the variable value contains the NUL character.
228+ /// This function returns an error if the environment variable isn't set.
229+ ///
230+ /// This function may return an error if the environment variable's name contains
231+ /// the equal sign character (`=`) or the NUL character.
232+ ///
233+ /// This function may return an error if the environment variable's value contains
234+ /// the NUL character.
226235///
227236/// # Examples
228237///
You can’t perform that action at this time.
0 commit comments