]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/bytecount.rs
Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoerister
[rust.git] / src / tools / clippy / clippy_lints / src / bytecount.rs
index 4f7ffdcdfb499ac972c9dbd9eeced0153b492ddc..c444984bc133a47ab0fb5450055bed06fb80d14c 100644 (file)
 use rustc_span::sym;
 
 declare_clippy_lint! {
-    /// **What it does:** Checks for naive byte counts
+    /// ### What it does
+    /// Checks for naive byte counts
     ///
-    /// **Why is this bad?** The [`bytecount`](https://crates.io/crates/bytecount)
+    /// ### Why is this bad?
+    /// The [`bytecount`](https://crates.io/crates/bytecount)
     /// crate has methods to count your bytes faster, especially for large slices.
     ///
-    /// **Known problems:** If you have predominantly small slices, the
+    /// ### Known problems
+    /// If you have predominantly small slices, the
     /// `bytecount::count(..)` method may actually be slower. However, if you can
     /// ensure that less than 2³²-1 matches arise, the `naive_count_32(..)` can be
     /// faster in those cases.
     ///
-    /// **Example:**
-    ///
+    /// ### Example
     /// ```rust
     /// # let vec = vec![1_u8];
     /// &vec.iter().filter(|x| **x == 0u8).count(); // use bytecount::count instead