diff options
| author | pierwill <pierwill@users.noreply.github.com> | 2020-07-03 12:13:01 -0700 |
|---|---|---|
| committer | pierwill <pierwill@users.noreply.github.com> | 2020-07-19 21:43:39 -0700 |
| commit | 76b8420168a2e14abf025a07ee4e32d87956d940 (patch) | |
| tree | 500fee25de4a4ed043b54865dd364beab3cb6c2c /src/librustc_data_structures | |
| parent | 3503f565e1fb7296983757d2716346f48a4a262b (diff) | |
| download | rust-76b8420168a2e14abf025a07ee4e32d87956d940.tar.gz rust-76b8420168a2e14abf025a07ee4e32d87956d940.zip | |
Use italics for O notation
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/sorted_map/index_map.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_data_structures/sorted_map/index_map.rs b/src/librustc_data_structures/sorted_map/index_map.rs index b7005ccdc99..2bb421a47ef 100644 --- a/src/librustc_data_structures/sorted_map/index_map.rs +++ b/src/librustc_data_structures/sorted_map/index_map.rs @@ -7,8 +7,8 @@ use std::iter::FromIterator; use crate::stable_hasher::{HashStable, StableHasher}; use rustc_index::vec::{Idx, IndexVec}; -/// An indexed multi-map that preserves insertion order while permitting both `O(log n)` lookup of -/// an item by key and `O(1)` lookup by index. +/// An indexed multi-map that preserves insertion order while permitting both *O*(log *n*) lookup of +/// an item by key and *O*(1) lookup by index. /// /// This data structure is a hybrid of an [`IndexVec`] and a [`SortedMap`]. Like `IndexVec`, /// `SortedIndexMultiMap` assigns a typed index to each item while preserving insertion order. @@ -20,7 +20,7 @@ use rustc_index::vec::{Idx, IndexVec}; /// items will be yielded in insertion order. /// /// Unlike a general-purpose map like `BTreeSet` or `HashSet`, `SortedMap` and -/// `SortedIndexMultiMap` require `O(n)` time to insert a single item. This is because we may need +/// `SortedIndexMultiMap` require *O*(*n*) time to insert a single item. This is because we may need /// to insert into the middle of the sorted array. Users should avoid mutating this data structure /// in-place. /// |
