Skip to content

Commit

Permalink
Resolve manual_string_new pedantic clippy lint
Browse files Browse the repository at this point in the history
    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`
  • Loading branch information
dtolnay committed Jul 26, 2023
1 parent 7255e19 commit b0f7b00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_suite/tests/test_annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b0f7b00

Please sign in to comment.