File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,12 @@ impl fmt::Debug for VarsOs {
182
182
/// * Environment variable is not present
183
183
/// * Environment variable is not valid unicode
184
184
///
185
+ /// # Panics
186
+ ///
187
+ /// This function may panic if `key` is empty, contains an ASCII equals sign
188
+ /// `'='` or the NUL character `'\0'`, or when the value contains the NUL
189
+ /// character.
190
+ ///
185
191
/// # Examples
186
192
///
187
193
/// ```
@@ -210,6 +216,12 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
210
216
///
211
217
/// [`None`]: ../option/enum.Option.html#variant.None
212
218
///
219
+ /// # Panics
220
+ ///
221
+ /// This function may panic if `key` is empty, contains an ASCII equals sign
222
+ /// `'='` or the NUL character `'\0'`, or when the value contains the NUL
223
+ /// character.
224
+ ///
213
225
/// # Examples
214
226
///
215
227
/// ```
You can’t perform that action at this time.
0 commit comments