mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Remove space and rephrase map()
advice.
This commit is contained in:
parent
bffb664fbf
commit
b3f4a9015c
1 changed files with 3 additions and 3 deletions
|
@ -10,11 +10,11 @@ use rustc_span::sym;
|
||||||
declare_clippy_lint! {
|
declare_clippy_lint! {
|
||||||
/// ### What it does
|
/// ### What it does
|
||||||
/// Suggests removing the use of a `map()` (or `map_err()`) method when an `Option` or `Result`
|
/// Suggests removing the use of a `map()` (or `map_err()`) method when an `Option` or `Result`
|
||||||
/// is being constructed.
|
/// is being constructed.
|
||||||
///
|
///
|
||||||
/// ### Why is this bad?
|
/// ### Why is this bad?
|
||||||
/// It introduces unnecessary complexity. In this case the function can be used directly and
|
/// It introduces unnecessary complexity. Instead, the function can be called before
|
||||||
/// construct the `Option` or `Result` from the output.
|
/// constructing the `Option` or `Result` from its return value.
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
|
|
Loading…
Add table
Reference in a new issue