]> git.lizzy.rs Git - rust.git/commitdiff
Fix parameter names in std::env documentation.
authorÉrico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
Fri, 23 Jul 2021 05:32:55 +0000 (02:32 -0300)
committerÉrico Nogueira <erico.erc@gmail.com>
Fri, 23 Jul 2021 20:20:45 +0000 (17:20 -0300)
The function parameters were renamed, but the documentation wasn't.

library/std/src/env.rs

index 64f88c1aba68e602e336408d95d1a5aed18ac7bb..5709d97d6430f6209e154c1f78ad564cc2338dd2 100644 (file)
@@ -294,7 +294,7 @@ fn description(&self) -> &str {
     }
 }
 
-/// Sets the environment variable `k` to the value `v` for the currently running
+/// Sets the environment variable `key` to the value `value` for the currently running
 /// process.
 ///
 /// Note that while concurrent access to environment variables is safe in Rust,
@@ -310,9 +310,8 @@ fn description(&self) -> &str {
 ///
 /// # 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.
+/// This function may panic if `key` is empty, contains an ASCII equals sign `'='`
+/// or the NUL character `'\0'`, or when `value` contains the NUL character.
 ///
 /// # Examples
 ///