Skip to content

Commit

Permalink
Say that std::env::{set_var, unset_var} *may* panic
Browse files Browse the repository at this point in the history
Previously the documentation suggested that the documentation about the
panics are guarantees.
  • Loading branch information
tbu- committed Oct 25, 2015
1 parent 5794950 commit fe2a47b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/libstd/env.rs
Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down

0 comments on commit fe2a47b

Please sign in to comment.