diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2015-10-25 12:04:29 +0000 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2015-10-25 12:04:29 +0000 |
| commit | 5794950c2d81097935a2430a8a06ba43fe3c4049 (patch) | |
| tree | 54bd52135357b955c93a7518ec77150212412185 | |
| parent | 92dd81ab51bc3db89d1b4d8ec21768b3353b49e3 (diff) | |
| download | rust-5794950c2d81097935a2430a8a06ba43fe3c4049.tar.gz rust-5794950c2d81097935a2430a8a06ba43fe3c4049.zip | |
Document possible panics for `std::env::{set_var, unset_var}`
| -rw-r--r-- | src/libstd/env.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 518c67bbe7f..685139a7fc1 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -260,6 +260,11 @@ impl Error for VarError { /// - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188) /// - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2) /// +/// # Panics +/// +/// This function panics if the `key` string is empty or contains an ASCII +/// equals sign. +/// /// # Examples /// /// ``` @@ -292,6 +297,11 @@ fn _set_var(k: &OsStr, v: &OsStr) { /// - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188) /// - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2) /// +/// # Panics +/// +/// This function panics if the `key` string is empty or contains an ASCII +/// equals sign. +/// /// # Examples /// /// ``` |
