mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-28 07:30:57 +00:00
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:
commit
5c97b27825
1 changed files with 5 additions and 6 deletions
|
@ -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()?;
|
||||
|
|
Loading…
Reference in a new issue