@@ -121,7 +121,7 @@ use rustc_span::{sym, Span};
121
121
122
122
declare_clippy_lint ! {
123
123
/// ### What it does
124
- /// Checks for usages of `cloned()` on an `Iterator` or `Option` where
124
+ /// Checks for usage of `cloned()` on an `Iterator` or `Option` where
125
125
/// `copied()` could be used instead.
126
126
///
127
127
/// ### Why is this bad?
@@ -201,7 +201,7 @@ declare_clippy_lint! {
201
201
202
202
declare_clippy_lint ! {
203
203
/// ### What it does
204
- /// Checks for usages of `Iterator::flat_map()` where `filter_map()` could be
204
+ /// Checks for usage of `Iterator::flat_map()` where `filter_map()` could be
205
205
/// used instead.
206
206
///
207
207
/// ### Why is this bad?
@@ -441,7 +441,7 @@ declare_clippy_lint! {
441
441
442
442
declare_clippy_lint ! {
443
443
/// ### What it does
444
- /// Checks for usages of `_.unwrap_or_else(Default::default)` on `Option` and
444
+ /// Checks for usage of `_.unwrap_or_else(Default::default)` on `Option` and
445
445
/// `Result` values.
446
446
///
447
447
/// ### Why is this bad?
@@ -1194,7 +1194,7 @@ declare_clippy_lint! {
1194
1194
1195
1195
declare_clippy_lint ! {
1196
1196
/// ### What it does
1197
- /// Checks for use of `.iter().nth()` (and the related
1197
+ /// Checks for usage of `.iter().nth()` (and the related
1198
1198
/// `.iter_mut().nth()`) on standard library types with *O*(1) element access.
1199
1199
///
1200
1200
/// ### Why is this bad?
@@ -1221,7 +1221,7 @@ declare_clippy_lint! {
1221
1221
1222
1222
declare_clippy_lint ! {
1223
1223
/// ### What it does
1224
- /// Checks for use of `.skip(x).next()` on iterators.
1224
+ /// Checks for usage of `.skip(x).next()` on iterators.
1225
1225
///
1226
1226
/// ### Why is this bad?
1227
1227
/// `.nth(x)` is cleaner
@@ -1246,7 +1246,7 @@ declare_clippy_lint! {
1246
1246
1247
1247
declare_clippy_lint ! {
1248
1248
/// ### What it does
1249
- /// Checks for use of `.drain(..)` on `Vec` and `VecDeque` for iteration.
1249
+ /// Checks for usage of `.drain(..)` on `Vec` and `VecDeque` for iteration.
1250
1250
///
1251
1251
/// ### Why is this bad?
1252
1252
/// `.into_iter()` is simpler with better performance.
@@ -1271,7 +1271,7 @@ declare_clippy_lint! {
1271
1271
1272
1272
declare_clippy_lint ! {
1273
1273
/// ### What it does
1274
- /// Checks for using `x.get(x.len() - 1)` instead of
1274
+ /// Checks for usage of `x.get(x.len() - 1)` instead of
1275
1275
/// `x.last()`.
1276
1276
///
1277
1277
/// ### Why is this bad?
@@ -1304,7 +1304,7 @@ declare_clippy_lint! {
1304
1304
1305
1305
declare_clippy_lint ! {
1306
1306
/// ### What it does
1307
- /// Checks for use of `.get().unwrap()` (or
1307
+ /// Checks for usage of `.get().unwrap()` (or
1308
1308
/// `.get_mut().unwrap`) on a standard library type which implements `Index`
1309
1309
///
1310
1310
/// ### Why is this bad?
@@ -1475,7 +1475,7 @@ declare_clippy_lint! {
1475
1475
1476
1476
declare_clippy_lint ! {
1477
1477
/// ### What it does
1478
- /// Checks for using `fold` when a more succinct alternative exists.
1478
+ /// Checks for usage of `fold` when a more succinct alternative exists.
1479
1479
/// Specifically, this checks for `fold`s which could be replaced by `any`, `all`,
1480
1480
/// `sum` or `product`.
1481
1481
///
@@ -2161,7 +2161,7 @@ declare_clippy_lint! {
2161
2161
2162
2162
declare_clippy_lint ! {
2163
2163
/// ### What it does
2164
- /// Checks for usages of `str::splitn(2, _)`
2164
+ /// Checks for usage of `str::splitn(2, _)`
2165
2165
///
2166
2166
/// ### Why is this bad?
2167
2167
/// `split_once` is both clearer in intent and slightly more efficient.
@@ -2197,7 +2197,7 @@ declare_clippy_lint! {
2197
2197
2198
2198
declare_clippy_lint ! {
2199
2199
/// ### What it does
2200
- /// Checks for usages of `str::splitn` (or `str::rsplitn`) where using `str::split` would be the same.
2200
+ /// Checks for usage of `str::splitn` (or `str::rsplitn`) where using `str::split` would be the same.
2201
2201
/// ### Why is this bad?
2202
2202
/// The function `split` is simpler and there is no performance difference in these cases, considering
2203
2203
/// that both functions return a lazy iterator.
@@ -2251,7 +2251,7 @@ declare_clippy_lint! {
2251
2251
2252
2252
declare_clippy_lint ! {
2253
2253
/// ### What it does
2254
- /// Checks for use of `.collect::<Vec<String>>().join("")` on iterators.
2254
+ /// Checks for usage of `.collect::<Vec<String>>().join("")` on iterators.
2255
2255
///
2256
2256
/// ### Why is this bad?
2257
2257
/// `.collect::<String>()` is more concise and might be more performant
@@ -2377,7 +2377,7 @@ declare_clippy_lint! {
2377
2377
2378
2378
declare_clippy_lint ! {
2379
2379
/// ### What it does
2380
- /// Checks for usages of `.then_some(..).unwrap_or(..)`
2380
+ /// Checks for usage of `.then_some(..).unwrap_or(..)`
2381
2381
///
2382
2382
/// ### Why is this bad?
2383
2383
/// This can be written more clearly with `if .. else ..`
@@ -2553,7 +2553,7 @@ declare_clippy_lint! {
2553
2553
2554
2554
declare_clippy_lint ! {
2555
2555
/// ### What it does
2556
- /// Checks for using `x.get(0)` instead of
2556
+ /// Checks for usage of `x.get(0)` instead of
2557
2557
/// `x.first()`.
2558
2558
///
2559
2559
/// ### Why is this bad?
@@ -2957,7 +2957,7 @@ declare_clippy_lint! {
2957
2957
2958
2958
declare_clippy_lint ! {
2959
2959
/// ### What it does
2960
- /// Detects uses of `Vec::sort_by` passing in a closure
2960
+ /// Checks for usage of `Vec::sort_by` passing in a closure
2961
2961
/// which compares the two arguments, either directly or indirectly.
2962
2962
///
2963
2963
/// ### Why is this bad?
@@ -3013,7 +3013,7 @@ declare_clippy_lint! {
3013
3013
3014
3014
declare_clippy_lint ! {
3015
3015
/// ### What it does
3016
- /// Checks for use of File::read_to_end and File::read_to_string.
3016
+ /// Checks for usage of File::read_to_end and File::read_to_string.
3017
3017
///
3018
3018
/// ### Why is this bad?
3019
3019
/// `fs::{read, read_to_string}` provide the same functionality when `buf` is empty with fewer imports and no intermediate values.
0 commit comments