Skip to content

Commit

Permalink
Resolve ignored_unit_patterns pedantic clippy lint in test suite
Browse files Browse the repository at this point in the history
    warning: matching over `()` is more explicit
       --> tests/test.rs:950:22
        |
    950 |             mac!(let _: <Self as Trait>::Associated2;);
        |                      ^ help: use `()` instead of `_`: `()`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
        = note: `-W clippy::ignored-unit-patterns` implied by `-W clippy::pedantic`

    warning: matching over `()` is more explicit
        --> tests/test.rs:1358:17
         |
    1358 |                 _ = async {
         |                 ^ help: use `()` instead of `_`: `()`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
  • Loading branch information
dtolnay committed Aug 12, 2023
1 parent a71e066 commit f12f371
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ pub mod issue92 {
mac!(let _ = <Self>::associated1(););

// trait items
mac!(let _: <Self as Trait>::Associated2;);
mac!(let (): <Self as Trait>::Associated2;);
mac!(Self::ASSOCIATED2;);
mac!(<Self>::ASSOCIATED2;);
mac!(<Self as Trait>::ASSOCIATED2;);
Expand Down Expand Up @@ -1355,7 +1355,7 @@ pub mod issue161 {
impl Trait for MyStruct {
async fn f(self: Arc<Self>) {
futures::select! {
_ = async {
() = async {
println!("{}", self.0);
}.fuse() => {}
}
Expand Down

0 comments on commit f12f371

Please sign in to comment.