From 284b1b390494466feaf100abdf08cc5614723fd3 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Mar 2023 13:02:42 -0600 Subject: [PATCH] Clippy cleanup Quiet the new redundant_async_block lint. Also, ensure that the mock function actually gets called in the automock_generic_future test. --- mockall/tests/automock_generic_future.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mockall/tests/automock_generic_future.rs b/mockall/tests/automock_generic_future.rs index ea5d1117..6f2d8671 100644 --- a/mockall/tests/automock_generic_future.rs +++ b/mockall/tests/automock_generic_future.rs @@ -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, @@ -29,8 +30,7 @@ impl Future for Foo { fn ready() { let mut mock = MockFoo::::new(); mock.expect_poll() + .once() .return_const(Poll::Ready(())); - let _r = async { - mock.await - }; + block_on(mock); }