@@ -94,7 +94,6 @@ mod seek_from_current;
94
94
mod seek_to_start_instead_of_rewind;
95
95
mod single_char_add_str;
96
96
mod single_char_insert_string;
97
- mod single_char_pattern;
98
97
mod single_char_push_string;
99
98
mod skip_while_next;
100
99
mod stable_sort_primitive;
@@ -1141,38 +1140,6 @@ declare_clippy_lint! {
1141
1140
"not returning type containing `Self` in a `new` method"
1142
1141
}
1143
1142
1144
- declare_clippy_lint ! {
1145
- /// ### What it does
1146
- /// Checks for string methods that receive a single-character
1147
- /// `str` as an argument, e.g., `_.split("x")`.
1148
- ///
1149
- /// ### Why is this bad?
1150
- /// While this can make a perf difference on some systems,
1151
- /// benchmarks have proven inconclusive. But at least using a
1152
- /// char literal makes it clear that we are looking at a single
1153
- /// character.
1154
- ///
1155
- /// ### Known problems
1156
- /// Does not catch multi-byte unicode characters. This is by
1157
- /// design, on many machines, splitting by a non-ascii char is
1158
- /// actually slower. Please do your own measurements instead of
1159
- /// relying solely on the results of this lint.
1160
- ///
1161
- /// ### Example
1162
- /// ```rust,ignore
1163
- /// _.split("x");
1164
- /// ```
1165
- ///
1166
- /// Use instead:
1167
- /// ```rust,ignore
1168
- /// _.split('x');
1169
- /// ```
1170
- #[ clippy:: version = "pre 1.29.0" ]
1171
- pub SINGLE_CHAR_PATTERN ,
1172
- pedantic,
1173
- "using a single-character str where a char could be used, e.g., `_.split(\" x\" )`"
1174
- }
1175
-
1176
1143
declare_clippy_lint ! {
1177
1144
/// ### What it does
1178
1145
/// Checks for calling `.step_by(0)` on iterators which panics.
@@ -4169,7 +4136,6 @@ impl_lint_pass!(Methods => [
4169
4136
FLAT_MAP_OPTION ,
4170
4137
INEFFICIENT_TO_STRING ,
4171
4138
NEW_RET_NO_SELF ,
4172
- SINGLE_CHAR_PATTERN ,
4173
4139
SINGLE_CHAR_ADD_STR ,
4174
4140
SEARCH_IS_SOME ,
4175
4141
FILTER_NEXT ,
@@ -4324,7 +4290,6 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
4324
4290
inefficient_to_string:: check ( cx, expr, method_call. ident . name , receiver, args) ;
4325
4291
single_char_add_str:: check ( cx, expr, receiver, args) ;
4326
4292
into_iter_on_ref:: check ( cx, expr, method_span, method_call. ident . name , receiver) ;
4327
- single_char_pattern:: check ( cx, expr, method_call. ident . name , receiver, args) ;
4328
4293
unnecessary_to_owned:: check ( cx, expr, method_call. ident . name , receiver, args, & self . msrv ) ;
4329
4294
} ,
4330
4295
ExprKind :: Binary ( op, lhs, rhs) if op. node == hir:: BinOpKind :: Eq || op. node == hir:: BinOpKind :: Ne => {
0 commit comments