docs: add stdlib env::var(_os) panic
This commit is contained in:
parent
ee36cfaff9
commit
af5625dc85
@ -182,6 +182,12 @@ impl fmt::Debug for VarsOs {
|
||||
/// * Environment variable is not present
|
||||
/// * Environment variable is not valid unicode
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function may panic if `key` is empty, contains an ASCII equals sign
|
||||
/// `'='` or the NUL character `'\0'`, or when the value contains the NUL
|
||||
/// character.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@ -210,6 +216,12 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
|
||||
///
|
||||
/// [`None`]: ../option/enum.Option.html#variant.None
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function may panic if `key` is empty, contains an ASCII equals sign
|
||||
/// `'='` or the NUL character `'\0'`, or when the value contains the NUL
|
||||
/// character.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
Loading…
x
Reference in New Issue
Block a user