File tree 1 file changed +5
-8
lines changed
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 {
185
185
///
186
186
/// # Errors
187
187
///
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`].
193
191
///
194
192
/// # Examples
195
193
///
@@ -223,9 +221,8 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
223
221
///
224
222
/// # Errors
225
223
///
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.
229
226
///
230
227
/// # Examples
231
228
///
You can’t perform that action at this time.
0 commit comments