]> git.lizzy.rs Git - rust.git/commitdiff
uninit_vec: Vec::spare_capacity_mut is stable
authorAlexander Clausen <a.clausen@fz-juelich.de>
Thu, 25 Aug 2022 12:10:55 +0000 (14:10 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Aug 2022 12:10:55 +0000 (14:10 +0200)
Quick documentation fix: `Vec::spare_capacity_mut` no longer needs nightly.

clippy_lints/src/uninit_vec.rs

index 9f4c5555f11b7c20489ef384432a6e2e0ebc958b..9a41603f2f4ce1068d6dccbc2e61de037b7d3653 100644 (file)
@@ -45,7 +45,7 @@
     ///    let mut vec: Vec<MaybeUninit<T>> = Vec::with_capacity(1000);
     ///    vec.set_len(1000);  // `MaybeUninit` can be uninitialized
     ///    ```
-    /// 3. If you are on nightly, `Vec::spare_capacity_mut()` is available:
+    /// 3. If you are on 1.60.0 or later, `Vec::spare_capacity_mut()` is available:
     ///    ```rust,ignore
     ///    let mut vec: Vec<u8> = Vec::with_capacity(1000);
     ///    let remaining = vec.spare_capacity_mut();  // `&mut [MaybeUninit<u8>]`