about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNeutron3529 <qweytr_1@163.com>2022-11-28 18:31:55 +0800
committerGitHub <noreply@github.com>2022-11-28 18:31:55 +0800
commit11525e506e2e469d5b13981420cd9702eddeb2e9 (patch)
tree45f7ee6caac4690f7bb1a6a97a265fe8a70d7e6f
parentdd12cd6dc631b5e964d541d370ca863c2242376c (diff)
downloadrust-11525e506e2e469d5b13981420cd9702eddeb2e9.tar.gz
rust-11525e506e2e469d5b13981420cd9702eddeb2e9.zip
fix document
https://users.rust-lang.org/t/is-the-document-in-sortedmap-in-rustc-data-structures-sorted-map-correct/84939

SortedMap have `O(n)` insertions and removal rather than `O(log(n))`
-rw-r--r--compiler/rustc_data_structures/src/sorted_map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/sorted_map.rs b/compiler/rustc_data_structures/src/sorted_map.rs
index fe257e10205..d607a5c8314 100644
--- a/compiler/rustc_data_structures/src/sorted_map.rs
+++ b/compiler/rustc_data_structures/src/sorted_map.rs
@@ -10,8 +10,8 @@ mod index_map;
 pub use index_map::SortedIndexMultiMap;
 
 /// `SortedMap` is a data structure with similar characteristics as BTreeMap but
-/// slightly different trade-offs: lookup, insertion, and removal are *O*(log(*n*))
-/// and elements can be iterated in order cheaply.
+/// slightly different trade-offs: lookup is *O*(log(*n*)), insertion and removal
+/// are *O*(*n*) but elements can be iterated in order cheaply.
 ///
 /// `SortedMap` can be faster than a `BTreeMap` for small sizes (<50) since it
 /// stores data in a more compact way. It also supports accessing contiguous