@@ -2503,7 +2503,7 @@ impl<T, A: Allocator> Vec<T, A> {
2503
2503
Ok ( ( ) )
2504
2504
}
2505
2505
2506
- /// Appends an element to the back of a collection, returning a reference to it.
2506
+ /// Appends an element to the back of a collection, returning a reference to it.
2507
2507
///
2508
2508
/// # Panics
2509
2509
///
@@ -2517,7 +2517,7 @@ impl<T, A: Allocator> Vec<T, A> {
2517
2517
/// # #[allow(unused)]
2518
2518
/// #[derive(PartialEq, Eq, Debug)]
2519
2519
/// struct Item { identifier: &'static str, count: usize }
2520
- ///
2520
+ ///
2521
2521
/// impl Default for Item {
2522
2522
/// fn default() -> Self {
2523
2523
/// return Self { identifier: "stone", count: 64 }
@@ -2579,13 +2579,14 @@ impl<T, A: Allocator> Vec<T, A> {
2579
2579
/// # Time complexity
2580
2580
///
2581
2581
/// Takes *O*(1) time.
2582
- #[ inline]
2583
-
2582
+ //
2584
2583
// Since there's currently no way to have multiple unstable attributes on the same item, I compromised.
2585
2584
// Uncomment/delete the respective attribute when its respective issue stabilizes, since this falls under both.
2585
+ //
2586
2586
#[ unstable( feature = "push_mut" , issue = "135974" ) ]
2587
2587
// #[unstable(feature = "vec_push_within_capacity", issue = "100486")]
2588
-
2588
+ //
2589
+ #[ inline]
2589
2590
#[ must_use = "if you don't need a reference to the value, use Vec::push_within_capacity instead" ]
2590
2591
pub fn push_mut_within_capacity ( & mut self , value : T ) -> Result < & mut T , T > {
2591
2592
if self . len == self . buf . capacity ( ) {
0 commit comments