Bring manual_split_once
docs in line with other lint docs
This commit is contained in:
parent
77dda9c6b1
commit
5adf17cb43
@ -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…
x
Reference in New Issue
Block a user