mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-01 00:49:30 +00:00
Bring manual_split_once
docs in line with other lint docs
This commit is contained in:
parent
77dda9c6b1
commit
5adf17cb43
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