Skip to content

Commit

Permalink
tests: Fix dead_code warning for tuple struct
Browse files Browse the repository at this point in the history
```
error: field `0` is never read
   --> tests/stream.rs:264:14
    |
264 | pub struct A(i32);
    |            - ^^^
    |            |
    |            field in this struct
    |
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
264 | pub struct A(());
    |              ~~
```
  • Loading branch information
taiki-e committed Jan 6, 2024
1 parent 34ce072 commit 43a7b41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ pub trait Trait {
async fn stream4(&self);
}

pub struct A(i32);
struct A;

impl Trait for A {
#[stream(boxed, item = i32)]
Expand Down Expand Up @@ -325,7 +325,7 @@ fn test_early_exit() {
}
}

#[stream(item=i32)]
#[stream(item = i32)]
async fn early_exit_block() {
let s = {
#[stream]
Expand Down

0 comments on commit 43a7b41

Please sign in to comment.