]> git.lizzy.rs Git - rust.git/blobdiff - src/liballoc/vec.rs
Auto merge of #68625 - JohnTitor:rollup-20pfcru, r=JohnTitor
[rust.git] / src / liballoc / vec.rs
index a27a13847d6a2a61a4428d001c2fd472c36d3ba5..26a7812f58e01033d72ce933c1e0e353e926c58c 100644 (file)
 /// ```
 ///
 /// In Rust, it's more common to pass slices as arguments rather than vectors
-/// when you just want to provide read access. The same goes for [`String`] and
+/// when you just want to provide read access. The same goes for [`String`] and
 /// [`&str`].
 ///
 /// # Capacity and reallocation
@@ -1054,7 +1054,7 @@ pub fn remove(&mut self, index: usize) -> T {
     ///
     /// ```
     /// let mut vec = vec![1, 2, 3, 4];
-    /// vec.retain(|&x| x%2 == 0);
+    /// vec.retain(|&x| x % 2 == 0);
     /// assert_eq!(vec, [2, 4]);
     /// ```
     ///