From b0f7b00e1f63937c75c2863b10e89faa7610ea9c Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 26 Jul 2023 13:46:22 -0700 Subject: [PATCH] Resolve manual_string_new pedantic clippy lint warning: empty String is being created manually --> test_suite/tests/test_annotations.rs:2280:29 | 2280 | let data = Data::C { t: "".to_string() }; | ^^^^^^^^^^^^^^ help: consider using: `String::new()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new = note: `-W clippy::manual-string-new` implied by `-W clippy::pedantic` --- test_suite/tests/test_annotations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_suite/tests/test_annotations.rs b/test_suite/tests/test_annotations.rs index d14dc5fd..d4145b2b 100644 --- a/test_suite/tests/test_annotations.rs +++ b/test_suite/tests/test_annotations.rs @@ -2277,7 +2277,7 @@ fn test_internally_tagged_enum_with_skipped_conflict() { }, } - let data = Data::C { t: "".to_string() }; + let data = Data::C { t: String::new() }; assert_tokens( &data,