Mentioned inspect in lint description of suspicious_map

This commit is contained in:
Matthias Kaak 2021-10-05 19:40:15 +00:00
parent 7c82e78f30
commit 320ecb1f0b

View File

@ -1284,8 +1284,9 @@
///
/// ### Why is this bad?
/// It looks suspicious. Maybe `map` was confused with `filter`.
/// If the `map` call is intentional, this should be rewritten. Or, if you intend to
/// drive the iterator to completion, you can just use `for_each` instead.
/// If the `map` call is intentional, this should be rewritten
/// using `inspect`. Or, if you intend to drive the iterator to
/// completion, you can just use `for_each` instead.
///
/// ### Example
/// ```rust