Skip to content

Commit

Permalink
Clippy cleanup
Browse files Browse the repository at this point in the history
Quiet the new redundant_async_block lint.  Also, ensure that the mock
function actually gets called in the automock_generic_future test.
  • Loading branch information
asomers committed Mar 26, 2023
1 parent 2fdfc10 commit 284b1b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mockall/tests/automock_generic_future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! poll method must not be treated as a generic method.
#![deny(warnings)]

use futures::executor::block_on;
use mockall::*;
use std::{
future::Future,
Expand All @@ -29,8 +30,7 @@ impl<T: 'static> Future for Foo<T> {
fn ready() {
let mut mock = MockFoo::<u32>::new();
mock.expect_poll()
.once()
.return_const(Poll::Ready(()));
let _r = async {
mock.await
};
block_on(mock);
}

0 comments on commit 284b1b3

Please sign in to comment.