Skip to content

Commit bb6dca0

Browse files
committed
time complexity for push_within_capacity
1 parent cb8ce9d commit bb6dca0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/alloc/src/vec/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,10 @@ impl<T, A: Allocator> Vec<T, A> {
19661966
/// }
19671967
/// assert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
19681968
/// ```
1969+
///
1970+
/// # Time complexity
1971+
///
1972+
/// Takes *O*(1) time.
19691973
#[inline]
19701974
#[unstable(feature = "vec_push_within_capacity", issue = "100486")]
19711975
pub fn push_within_capacity(&mut self, value: T) -> Result<(), T> {

0 commit comments

Comments
 (0)