Auto merge of #7808 - Veykril:patch-1, r=xFrednet

Bring [`manual_split_once`] docs in line with other lint docs

changelog: none
This commit is contained in:
bors 2021-10-12 11:42:23 +00:00
commit 5c97b27825

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()?;