From 0f6922d6272a4d864223de2bce643bd9eb0156b1 Mon Sep 17 00:00:00 2001 From: Lukas Bergdoll Date: Thu, 20 Jun 2024 18:07:04 +0200 Subject: [PATCH] Fix wrong big O star bracing in the doc comments --- alloc/src/slice.rs | 6 +++--- core/src/slice/mod.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/alloc/src/slice.rs b/alloc/src/slice.rs index 846f8ba6c6e40..c7960b3fb49c3 100644 --- a/alloc/src/slice.rs +++ b/alloc/src/slice.rs @@ -193,7 +193,7 @@ impl [T] { /// The current implementation is based on [driftsort] by Orson Peters and Lukas Bergdoll, which /// combines the fast average case of quicksort with the fast worst case and partial run /// detection of mergesort, achieving linear time on fully sorted and reversed inputs. On inputs - /// with k distinct elements, the expected time to sort the data is *O(*n* \* log(*k*))*. + /// with k distinct elements, the expected time to sort the data is *O*(*n* \* log(*k*)). /// /// The auxiliary memory allocation behavior depends on the input length. Short slices are /// handled without allocation, medium sized slices allocate `self.len()` and beyond that it @@ -252,7 +252,7 @@ impl [T] { /// The current implementation is based on [driftsort] by Orson Peters and Lukas Bergdoll, which /// combines the fast average case of quicksort with the fast worst case and partial run /// detection of mergesort, achieving linear time on fully sorted and reversed inputs. On inputs - /// with k distinct elements, the expected time to sort the data is *O(*n* \* log(*k*))*. + /// with k distinct elements, the expected time to sort the data is *O*(*n* \* log(*k*)). /// /// The auxiliary memory allocation behavior depends on the input length. Short slices are /// handled without allocation, medium sized slices allocate `self.len()` and beyond that it @@ -298,7 +298,7 @@ impl [T] { /// The current implementation is based on [driftsort] by Orson Peters and Lukas Bergdoll, which /// combines the fast average case of quicksort with the fast worst case and partial run /// detection of mergesort, achieving linear time on fully sorted and reversed inputs. On inputs - /// with k distinct elements, the expected time to sort the data is *O(*n* \* log(*k*))*. + /// with k distinct elements, the expected time to sort the data is *O*(*n* \* log(*k*)). /// /// The auxiliary memory allocation behavior depends on the input length. Short slices are /// handled without allocation, medium sized slices allocate `self.len()` and beyond that it diff --git a/core/src/slice/mod.rs b/core/src/slice/mod.rs index 3c818eacca318..d68dde823541a 100644 --- a/core/src/slice/mod.rs +++ b/core/src/slice/mod.rs @@ -2893,7 +2893,7 @@ impl [T] { /// The current implementation is based on [ipnsort] by Lukas Bergdoll and Orson Peters, which /// combines the fast average case of quicksort with the fast worst case of heapsort, achieving /// linear time on fully sorted and reversed inputs. On inputs with k distinct elements, the - /// expected time to sort the data is *O(*n* \* log(*k*))*. + /// expected time to sort the data is *O*(*n* \* log(*k*)). /// /// It is typically faster than stable sorting, except in a few special cases, e.g., when the /// slice is partially sorted. @@ -2950,7 +2950,7 @@ impl [T] { /// The current implementation is based on [ipnsort] by Lukas Bergdoll and Orson Peters, which /// combines the fast average case of quicksort with the fast worst case of heapsort, achieving /// linear time on fully sorted and reversed inputs. On inputs with k distinct elements, the - /// expected time to sort the data is *O(*n* \* log(*k*))*. + /// expected time to sort the data is *O*(*n* \* log(*k*)). /// /// It is typically faster than stable sorting, except in a few special cases, e.g., when the /// slice is partially sorted. @@ -2994,7 +2994,7 @@ impl [T] { /// The current implementation is based on [ipnsort] by Lukas Bergdoll and Orson Peters, which /// combines the fast average case of quicksort with the fast worst case of heapsort, achieving /// linear time on fully sorted and reversed inputs. On inputs with k distinct elements, the - /// expected time to sort the data is *O(*n* \* log(*k*))*. + /// expected time to sort the data is *O*(*n* \* log(*k*)). /// /// It is typically faster than stable sorting, except in a few special cases, e.g., when the /// slice is partially sorted.