about summary refs log tree commit diff
path: root/library/alloc/src/vec
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-09-25 18:22:20 -0700
committerGitHub <noreply@github.com>2021-09-25 18:22:20 -0700
commit653dcaac2b9b647ebcf417dbc1e55341c10160b9 (patch)
treebad03149285ff2b553f5dafb85379089fb2bba9d /library/alloc/src/vec
parentc118d8b79b2e10d6922423ecb6162ffe8f5d07fb (diff)
parent956f87fb04f589ac2fbe262a043c9f3cad6b2ac0 (diff)
downloadrust-653dcaac2b9b647ebcf417dbc1e55341c10160b9.tar.gz
rust-653dcaac2b9b647ebcf417dbc1e55341c10160b9.zip
Rollup merge of #89216 - r00ster91:bigo, r=dtolnay
Consistent big O notation

This makes the big O time complexity notation in places with markdown support more consistent.
Inspired by #89210
Diffstat (limited to 'library/alloc/src/vec')
-rw-r--r--library/alloc/src/vec/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 2ee91f88d3c..4440b1f599f 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -1,8 +1,8 @@
 //! A contiguous growable array type with heap-allocated contents, written
 //! `Vec<T>`.
 //!
-//! Vectors have `O(1)` indexing, amortized `O(1)` push (to the end) and
-//! `O(1)` pop (from the end).
+//! Vectors have *O*(1) indexing, amortized *O*(1) push (to the end) and
+//! *O*(1) pop (from the end).
 //!
 //! Vectors ensure they never allocate more than `isize::MAX` bytes.
 //!
@@ -1270,7 +1270,7 @@ impl<T, A: Allocator> Vec<T, A> {
     ///
     /// The removed element is replaced by the last element of the vector.
     ///
-    /// This does not preserve ordering, but is O(1).
+    /// This does not preserve ordering, but is *O*(1).
     ///
     /// # Panics
     ///