Skip to content

Commit

Permalink
Work around dead_code warning in tests
Browse files Browse the repository at this point in the history
    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)] ()),
        |                               ~~
  • Loading branch information
dtolnay committed Jan 6, 2024
1 parent 961fa59 commit d883c94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_suite/tests/test_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>),
}
Expand Down

0 comments on commit d883c94

Please sign in to comment.