diff --git a/src/lib.rs b/src/lib.rs index c05e28266..0e7e68fb8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2536,10 +2536,10 @@ pub trait Itertools: Iterator { /// /// Moreover, the output of `tree_reduce` is preferable to that of [`Iterator::reduce`] in /// certain cases. For example, building a binary search tree using `tree_reduce` will result in - /// a balanced tree with height O(ln(n)), while [`Iterator::reduce`] will output a tree with - /// height O(n), essentially a linked list. + /// a balanced tree with height `O(ln(n))`, while [`Iterator::reduce`] will output a tree with + /// height `O(n)`, essentially a linked list. /// - /// If 'f' does not benefit from such a reordering, like `u32::wrapping_add`, prefer the + /// If `f` does not benefit from such a reordering, like `u32::wrapping_add`, prefer the /// normal [`Iterator::reduce`] instead since it will most likely result in the generation of /// simpler code because the compiler is able to optimize it. ///