]> git.lizzy.rs Git - rust.git/commitdiff
Document possible panics for `std::env::{set_var, unset_var}`
authorTobias Bucher <tobiasbucher5991@gmail.com>
Sun, 25 Oct 2015 12:04:29 +0000 (12:04 +0000)
committerTobias Bucher <tobiasbucher5991@gmail.com>
Sun, 25 Oct 2015 12:04:29 +0000 (12:04 +0000)
src/libstd/env.rs

index 518c67bbe7f5858ff36d26fe3c7d409c5b8ee452..685139a7fc1214545a89cd87fc2a42c877d476c8 100644 (file)
@@ -260,6 +260,11 @@ fn description(&self) -> &str {
 ///  - [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
 ///
 /// ```