1
Fork 0

time complexity for push_within_capacity

This commit is contained in:
Jacob Asper 2024-02-16 09:58:34 -05:00
commit bb6dca0fc8

View file

@ -1966,6 +1966,10 @@ impl<T, A: Allocator> Vec<T, A> {
/// }
/// assert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
/// ```
///
/// # Time complexity
///
/// Takes *O*(1) time.
#[inline]
#[unstable(feature = "vec_push_within_capacity", issue = "100486")]
pub fn push_within_capacity(&mut self, value: T) -> Result<(), T> {