Bring manual_split_once docs in line with other lint docs

This commit is contained in:
Lukas Wirth 2021-10-12 09:42:42 +02:00 committed by GitHub
parent 77dda9c6b1
commit 5adf17cb43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1777,14 +1777,13 @@ declare_clippy_lint! {
}
declare_clippy_lint! {
/// **What it does:** Checks for usages of `str::splitn(2, _)`
/// ### What it does
/// Checks for usages of `str::splitn(2, _)`
///
/// **Why is this bad?** `split_once` is both clearer in intent and slightly more efficient.
///
/// **Known problems:** None.
///
/// **Example:**
/// ### Why is this bad?
/// `split_once` is both clearer in intent and slightly more efficient.
///
/// ### Example
/// ```rust,ignore
/// // Bad
/// let (key, value) = _.splitn(2, '=').next_tuple()?;