mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
104 lines
3.5 KiB
Text
104 lines
3.5 KiB
Text
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:5:13
|
|
|
|
|
5 | x.split("x");
|
|
| --------^^^- help: try using a char instead: `x.split('x')`
|
|
|
|
|
= note: `-D single-char-pattern` implied by `-D warnings`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:22:16
|
|
|
|
|
22 | x.contains("x");
|
|
| -----------^^^- help: try using a char instead: `x.contains('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:23:19
|
|
|
|
|
23 | x.starts_with("x");
|
|
| --------------^^^- help: try using a char instead: `x.starts_with('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:24:17
|
|
|
|
|
24 | x.ends_with("x");
|
|
| ------------^^^- help: try using a char instead: `x.ends_with('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:25:12
|
|
|
|
|
25 | x.find("x");
|
|
| -------^^^- help: try using a char instead: `x.find('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:26:13
|
|
|
|
|
26 | x.rfind("x");
|
|
| --------^^^- help: try using a char instead: `x.rfind('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:27:14
|
|
|
|
|
27 | x.rsplit("x");
|
|
| ---------^^^- help: try using a char instead: `x.rsplit('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:28:24
|
|
|
|
|
28 | x.split_terminator("x");
|
|
| -------------------^^^- help: try using a char instead: `x.split_terminator('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:29:25
|
|
|
|
|
29 | x.rsplit_terminator("x");
|
|
| --------------------^^^- help: try using a char instead: `x.rsplit_terminator('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:30:17
|
|
|
|
|
30 | x.splitn(0, "x");
|
|
| ------------^^^- help: try using a char instead: `x.splitn(0, 'x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:31:18
|
|
|
|
|
31 | x.rsplitn(0, "x");
|
|
| -------------^^^- help: try using a char instead: `x.rsplitn(0, 'x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:32:15
|
|
|
|
|
32 | x.matches("x");
|
|
| ----------^^^- help: try using a char instead: `x.matches('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:33:16
|
|
|
|
|
33 | x.rmatches("x");
|
|
| -----------^^^- help: try using a char instead: `x.rmatches('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:34:21
|
|
|
|
|
34 | x.match_indices("x");
|
|
| ----------------^^^- help: try using a char instead: `x.match_indices('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:35:22
|
|
|
|
|
35 | x.rmatch_indices("x");
|
|
| -----------------^^^- help: try using a char instead: `x.rmatch_indices('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:36:25
|
|
|
|
|
36 | x.trim_left_matches("x");
|
|
| --------------------^^^- help: try using a char instead: `x.trim_left_matches('x')`
|
|
|
|
error: single-character string constant used as pattern
|
|
--> $DIR/single_char_pattern.rs:37:26
|
|
|
|
|
37 | x.trim_right_matches("x");
|
|
| ---------------------^^^- help: try using a char instead: `x.trim_right_matches('x')`
|
|
|