Say that std::env::{set_var, unset_var}
*may* panic
Previously the documentation suggested that the documentation about the panics are guarantees.
This commit is contained in:
parent
5794950c2d
commit
fe2a47b88a
1 changed files with 6 additions and 4 deletions
|
@ -262,8 +262,9 @@ impl Error for VarError {
|
|||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if the `key` string is empty or contains an ASCII
|
||||
/// equals sign.
|
||||
/// 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
|
||||
///
|
||||
|
@ -299,8 +300,9 @@ fn _set_var(k: &OsStr, v: &OsStr) {
|
|||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if the `key` string is empty or contains an ASCII
|
||||
/// equals sign.
|
||||
/// 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…
Add table
Add a link
Reference in a new issue