Skip to content

Commit 1774794

Browse files
committed
Resolve needless_raw_string_hashes clippy lint in test
warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2722:9 | 2722 | r#"invalid type: unit value, expected variant identifier"#, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes = note: `-W clippy::needless-raw-string-hashes` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_raw_string_hashes)]` help: remove all the hashes around the literal | 2722 - r#"invalid type: unit value, expected variant identifier"#, 2722 + r"invalid type: unit value, expected variant identifier", | warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2743:9 | 2743 | r#"invalid type: unit value, expected variant identifier"#, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes help: remove all the hashes around the literal | 2743 - r#"invalid type: unit value, expected variant identifier"#, 2743 + r"invalid type: unit value, expected variant identifier", | warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2769:9 | 2769 | r#"invalid type: unit value, expected variant of enum Enum"#, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes help: remove all the hashes around the literal | 2769 - r#"invalid type: unit value, expected variant of enum Enum"#, 2769 + r"invalid type: unit value, expected variant of enum Enum", | warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2782:63 | 2782 | assert_de_tokens_error::<Enum>(&[Token::Str("Untagged")], r#"something strange..."#); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes help: remove all the hashes around the literal | 2782 - assert_de_tokens_error::<Enum>(&[Token::Str("Untagged")], r#"something strange..."#); 2782 + assert_de_tokens_error::<Enum>(&[Token::Str("Untagged")], r"something strange..."); | warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2803:9 | 2803 | r#"invalid type: unit value, expected something strange..."#, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes help: remove all the hashes around the literal | 2803 - r#"invalid type: unit value, expected something strange..."#, 2803 + r"invalid type: unit value, expected something strange...", | warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2812:9 | 2812 | r#"invalid type: map, expected something strange..."#, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes help: remove all the hashes around the literal | 2812 - r#"invalid type: map, expected something strange..."#, 2812 + r"invalid type: map, expected something strange...", | warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2817:9 | 2817 | r#"invalid type: unit value, expected something strange..."#, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes help: remove all the hashes around the literal | 2817 - r#"invalid type: unit value, expected something strange..."#, 2817 + r"invalid type: unit value, expected something strange...", | warning: unnecessary hashes around raw string literal --> test_suite/tests/test_annotations.rs:2828:9 | 2828 | r#"invalid type: map, expected something strange..."#, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes help: remove all the hashes around the literal | 2828 - r#"invalid type: map, expected something strange..."#, 2828 + r"invalid type: map, expected something strange...", |
1 parent 1af23f1 commit 1774794

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

test_suite/tests/test_annotations.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2719,7 +2719,7 @@ fn test_expecting_message_externally_tagged_enum() {
27192719
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
27202720
assert_de_tokens_error::<Enum>(
27212721
&[Token::Enum { name: "Enum" }, Token::Unit],
2722-
r#"invalid type: unit value, expected variant identifier"#,
2722+
r"invalid type: unit value, expected variant identifier",
27232723
);
27242724
}
27252725

@@ -2740,7 +2740,7 @@ fn test_expecting_message_internally_tagged_enum() {
27402740
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
27412741
assert_de_tokens_error::<Enum>(
27422742
&[Token::Map { len: None }, Token::Str("tag"), Token::Unit],
2743-
r#"invalid type: unit value, expected variant identifier"#,
2743+
r"invalid type: unit value, expected variant identifier",
27442744
);
27452745
}
27462746

@@ -2766,7 +2766,7 @@ fn test_expecting_message_adjacently_tagged_enum() {
27662766
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
27672767
assert_de_tokens_error::<Enum>(
27682768
&[Token::Map { len: None }, Token::Str("tag"), Token::Unit],
2769-
r#"invalid type: unit value, expected variant of enum Enum"#,
2769+
r"invalid type: unit value, expected variant of enum Enum",
27702770
);
27712771
}
27722772

@@ -2779,7 +2779,7 @@ fn test_expecting_message_untagged_tagged_enum() {
27792779
Untagged,
27802780
}
27812781

2782-
assert_de_tokens_error::<Enum>(&[Token::Str("Untagged")], r#"something strange..."#);
2782+
assert_de_tokens_error::<Enum>(&[Token::Str("Untagged")], r"something strange...");
27832783
}
27842784

27852785
#[test]
@@ -2800,7 +2800,7 @@ fn test_expecting_message_identifier_enum() {
28002800

28012801
assert_de_tokens_error::<FieldEnum>(
28022802
&[Token::Unit],
2803-
r#"invalid type: unit value, expected something strange..."#,
2803+
r"invalid type: unit value, expected something strange...",
28042804
);
28052805

28062806
assert_de_tokens_error::<FieldEnum>(
@@ -2809,12 +2809,12 @@ fn test_expecting_message_identifier_enum() {
28092809
Token::Str("Unknown"),
28102810
Token::None,
28112811
],
2812-
r#"invalid type: map, expected something strange..."#,
2812+
r"invalid type: map, expected something strange...",
28132813
);
28142814

28152815
assert_de_tokens_error::<VariantEnum>(
28162816
&[Token::Unit],
2817-
r#"invalid type: unit value, expected something strange..."#,
2817+
r"invalid type: unit value, expected something strange...",
28182818
);
28192819

28202820
assert_de_tokens_error::<VariantEnum>(
@@ -2825,7 +2825,7 @@ fn test_expecting_message_identifier_enum() {
28252825
Token::Str("Unknown"),
28262826
Token::None,
28272827
],
2828-
r#"invalid type: map, expected something strange..."#,
2828+
r"invalid type: map, expected something strange...",
28292829
);
28302830
}
28312831

0 commit comments

Comments
 (0)