We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
map()
1 parent bffb664 commit b3f4a90Copy full SHA for b3f4a90
clippy_lints/src/unnecessary_map_on_constructor.rs
@@ -10,11 +10,11 @@ use rustc_span::sym;
10
declare_clippy_lint! {
11
/// ### What it does
12
/// Suggests removing the use of a `map()` (or `map_err()`) method when an `Option` or `Result`
13
- /// is being constructed.
+ /// is being constructed.
14
///
15
/// ### Why is this bad?
16
- /// It introduces unnecessary complexity. In this case the function can be used directly and
17
- /// construct the `Option` or `Result` from the output.
+ /// It introduces unnecessary complexity. Instead, the function can be called before
+ /// constructing the `Option` or `Result` from its return value.
18
19
/// ### Example
20
/// ```no_run
0 commit comments