mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-15 12:01:01 +00:00
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`
This commit is contained in:
@@ -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(
|
assert_tokens(
|
||||||
&data,
|
&data,
|
||||||
|
|||||||
Reference in New Issue
Block a user