about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-04-15 14:33:45 +0200
committerRalf Jung <post@ralfj.de>2020-04-15 14:33:45 +0200
commit88612e3657ce48f3d8ec25f699f8b9c1e55889bf (patch)
tree036d9588079e295ce5c72a2059314d99ba3a8a16 /src/libstd
parent351eefe93a96f98d37182701590493b6710175c3 (diff)
big-O notation: parenthesis, multiplication and backticks
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/mod.rs8
-rw-r--r--src/libstd/ffi/mod.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs
index e8b9e9cb1f2..cc6663bebd3 100644
--- a/src/libstd/collections/mod.rs
+++ b/src/libstd/collections/mod.rs
@@ -110,10 +110,10 @@
 //!
 //! For Sets, all operations have the cost of the equivalent Map operation.
 //!
-//! |              | get       | insert   | remove   | predecessor | append |
-//! |--------------|-----------|----------|----------|-------------|--------|
-//! | [`HashMap`]  | O(1)~     | O(1)~*   | O(1)~    | N/A         | N/A    |
-//! | [`BTreeMap`] | O(log n)  | O(log n) | O(log n) | O(log n)    | O(n+m) |
+//! |              | get       | insert    | remove    | predecessor | append |
+//! |--------------|-----------|-----------|-----------|-------------|--------|
+//! | [`HashMap`]  | O(1)~     | O(1)~*    | O(1)~     | N/A         | N/A    |
+//! | [`BTreeMap`] | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n))   | O(n+m) |
 //!
 //! # Correct and Efficient Usage of Collections
 //!
diff --git a/src/libstd/ffi/mod.rs b/src/libstd/ffi/mod.rs
index 72f7367c9dc..5aca7b7476a 100644
--- a/src/libstd/ffi/mod.rs
+++ b/src/libstd/ffi/mod.rs
@@ -43,8 +43,8 @@
 //! terminator, so the buffer length is really `len+1` characters.
 //! Rust strings don't have a nul terminator; their length is always
 //! stored and does not need to be calculated. While in Rust
-//! accessing a string's length is a O(1) operation (because the
-//! length is stored); in C it is an O(length) operation because the
+//! accessing a string's length is a `O(1)` operation (because the
+//! length is stored); in C it is an `O(length)` operation because the
 //! length needs to be computed by scanning the string for the nul
 //! terminator.
 //!