Skip to content

Commit

Permalink
Work around dead_code warning in test
Browse files Browse the repository at this point in the history
    warning: field `0` is never read
       --> tests/test.rs:678:22
        |
    678 |     pub struct Tuple(u8);
        |                ----- ^^
        |                |
        |                field in this struct
        |
        = note: `#[warn(dead_code)]` on by default
    help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
        |
    678 |     pub struct Tuple(());
        |                      ~~
  • Loading branch information
dtolnay committed Jan 6, 2024
1 parent 7084226 commit 9a8b050
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 @@ -675,7 +675,7 @@ pub mod issue53 {
use async_trait::async_trait;

pub struct Unit;
pub struct Tuple(u8);
pub struct Tuple(pub u8);
pub struct Struct {
pub x: u8,
}
Expand Down

0 comments on commit 9a8b050

Please sign in to comment.