Skip to content

Commit c4da8eb

Browse files
committed
style: Silence dead_code warning for PartialRead struct
The PartialRead struct in reader_test.rs intentionally leaves some fields unread to test serde::de::IgnoredAny. This commit adds #[allow(dead_code)] to the struct to silence the associated compiler warning, indicating that the unused fields are intentional for testing purposes.
1 parent e19d443 commit c4da8eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/reader_test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,7 @@ fn test_ignored_any() {
12121212
let _ = env_logger::try_init();
12131213

12141214
// Struct that only reads some fields, ignoring others via IgnoredAny
1215+
#[allow(dead_code)]
12151216
#[derive(Deserialize, Debug)]
12161217
struct PartialRead {
12171218
utf8_string: String,

0 commit comments

Comments
 (0)