Skip to content

Commit

Permalink
Resolve manual_string_new pedantic clippy lint in test
Browse files Browse the repository at this point in the history
    error: empty String is being created manually
        --> tests/test.rs:1110:18
         |
    1110 |         ("\"\"", "".to_string()),
         |                  ^^^^^^^^^^^^^^ help: consider using: `String::new()`
         |
         = note: `-D clippy::manual-string-new` implied by `-D clippy::pedantic`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new
  • Loading branch information
dtolnay committed Sep 2, 2022
1 parent 7af05a9 commit 9af8517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ fn test_parse_string() {
]);

test_parse_ok(vec![
("\"\"", "".to_string()),
("\"\"", String::new()),
("\"foo\"", "foo".to_string()),
(" \"foo\" ", "foo".to_string()),
("\"\\\"\"", "\"".to_string()),
Expand Down

0 comments on commit 9af8517

Please sign in to comment.