Skip to content

Commit 0a5d684

Browse files
committed
time complexity for pop
1 parent bb6dca0 commit 0a5d684

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/alloc/src/vec/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1999,6 +1999,10 @@ impl<T, A: Allocator> Vec<T, A> {
19991999
/// assert_eq!(vec.pop(), Some(3));
20002000
/// assert_eq!(vec, [1, 2]);
20012001
/// ```
2002+
///
2003+
/// # Time complexity
2004+
///
2005+
/// Takes *O*(1) time.
20022006
#[inline]
20032007
#[stable(feature = "rust1", since = "1.0.0")]
20042008
pub fn pop(&mut self) -> Option<T> {

0 commit comments

Comments
 (0)