]> git.lizzy.rs Git - rust.git/commitdiff
Fix for 7e13679.
authorTomasz Różański <rosto@tlen.pl>
Thu, 22 Aug 2019 17:27:16 +0000 (19:27 +0200)
committerTomasz Różański <rosto@tlen.pl>
Thu, 22 Aug 2019 17:27:16 +0000 (19:27 +0200)
src/libstd/ffi/os_str.rs

index d0e35cce6411b13855c10a92cce87fd222ca682a..6cf062d4f30c0f5a24e70c4507ad0db39ad03856 100644 (file)
@@ -191,7 +191,7 @@ pub fn push<T: AsRef<OsStr>>(&mut self, s: T) {
     /// ```
     /// use std::ffi::OsString;
     ///
-    /// let os_string = OsString::with_capacity(10);
+    /// let mut os_string = OsString::with_capacity(10);
     /// let capacity = os_string.capacity();
     ///
     /// // This push is done without reallocating
@@ -233,7 +233,7 @@ pub fn clear(&mut self) {
     /// ```
     /// use std::ffi::OsString;
     ///
-    /// let mut os_string = OsString::with_capacity(10);
+    /// let os_string = OsString::with_capacity(10);
     /// assert!(os_string.capacity() >= 10);
     /// ```
     #[stable(feature = "osstring_simple_functions", since = "1.9.0")]