From 0ce33ca0d79622908e17127a7ee04cb3055fbae5 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sat, 13 Jul 2024 13:15:25 -0600 Subject: [PATCH] Clippy cleanup in the tests * unused_must_use from format! * dead_code on a non-pub struct --- mockall/tests/automock_generic_future.rs | 2 +- mockall/tests/automock_impl_trait.rs | 2 +- mockall/tests/automock_module.rs | 2 +- mockall/tests/mock_impl_trait.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mockall/tests/automock_generic_future.rs b/mockall/tests/automock_generic_future.rs index de26d925..f78bdcee 100644 --- a/mockall/tests/automock_generic_future.rs +++ b/mockall/tests/automock_generic_future.rs @@ -13,7 +13,7 @@ use std::{ task::{Context, Poll}, }; -struct Foo(T); +pub struct Foo(T); #[automock] impl Future for Foo { diff --git a/mockall/tests/automock_impl_trait.rs b/mockall/tests/automock_impl_trait.rs index eb14a134..1662a6af 100644 --- a/mockall/tests/automock_impl_trait.rs +++ b/mockall/tests/automock_impl_trait.rs @@ -16,5 +16,5 @@ impl Foo { fn returning() { let mut mock = MockFoo::new(); mock.expect_foo().returning(|| Box::new(4)); - format!("{:?}", mock.foo()); + let _ = format!("{:?}", mock.foo()); } diff --git a/mockall/tests/automock_module.rs b/mockall/tests/automock_module.rs index ddfe53e1..3686d1a8 100644 --- a/mockall/tests/automock_module.rs +++ b/mockall/tests/automock_module.rs @@ -45,6 +45,6 @@ pub mod m { let ctx = mock_foo::baz_context(); ctx.expect() .returning(|| Box::new(4)); - format!("{:?}", mock_foo::baz()); + let _ = format!("{:?}", mock_foo::baz()); } } diff --git a/mockall/tests/mock_impl_trait.rs b/mockall/tests/mock_impl_trait.rs index fb1bb7a7..495cb946 100644 --- a/mockall/tests/mock_impl_trait.rs +++ b/mockall/tests/mock_impl_trait.rs @@ -15,5 +15,5 @@ mock!{ fn returning() { let mut mock = MockFoo::new(); mock.expect_foo().returning(|| Box::new(4)); - format!("{:?}", mock.foo()); + let _ = format!("{:?}", mock.foo()); }