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/liballoc/string.rs | |
| 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/liballoc/string.rs')
| -rw-r--r-- | src/liballoc/string.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 13ef94dee23..dfd2084c254 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -1187,7 +1187,7 @@ impl String { /// Removes a [`char`] from this `String` at a byte position and returns it. /// - /// This is an `O(n)` operation, as it requires copying every element in the + /// This is an *O*(*n*) operation, as it requires copying every element in the /// buffer. /// /// # Panics @@ -1289,7 +1289,7 @@ impl String { /// Inserts a character into this `String` at a byte position. /// - /// This is an `O(n)` operation as it requires copying every element in the + /// This is an *O*(*n*) operation as it requires copying every element in the /// buffer. /// /// # Panics @@ -1338,7 +1338,7 @@ impl String { /// Inserts a string slice into this `String` at a byte position. /// - /// This is an `O(n)` operation as it requires copying every element in the + /// This is an *O*(*n*) operation as it requires copying every element in the /// buffer. /// /// # Panics @@ -1996,7 +1996,7 @@ impl hash::Hash for String { /// /// This consumes the `String` on the left-hand side and re-uses its buffer (growing it if /// necessary). This is done to avoid allocating a new `String` and copying the entire contents on -/// every operation, which would lead to `O(n^2)` running time when building an `n`-byte string by +/// every operation, which would lead to *O*(*n*^2) running time when building an *n*-byte string by /// repeated concatenation. /// /// The string on the right-hand side is only borrowed; its contents are copied into the returned |
