Work around dead_code warning in tests

error: field `0` is never read
       --> test_suite/tests/test_gen.rs:690:33
        |
    690 |         Single(#[serde(borrow)] RelObject<'a>),
        |         ------                  ^^^^^^^^^^^^^
        |         |
        |         field in this variant
        |
    help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
        |
    690 |         Single(#[serde(borrow)] ()),
        |                                 ~~

    error: field `0` is never read
       --> test_suite/tests/test_gen.rs:691:31
        |
    691 |         Many(#[serde(borrow)] Vec<RelObject<'a>>),
        |         ----                  ^^^^^^^^^^^^^^^^^^
        |         |
        |         field in this variant
        |
    help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
        |
    691 |         Many(#[serde(borrow)] ()),
        |                               ~~
This commit is contained in:
David Tolnay 2024-01-05 18:06:04 -08:00
parent 961fa59a74
commit d883c94cc9
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -686,7 +686,7 @@ fn test_gen() {
#[derive(Deserialize)]
#[serde(untagged)]
enum UntaggedWithBorrow<'a> {
pub enum UntaggedWithBorrow<'a> {
Single(#[serde(borrow)] RelObject<'a>),
Many(#[serde(borrow)] Vec<RelObject<'a>>),
}