diff --git a/mockall_derive/src/mock_function.rs b/mockall_derive/src/mock_function.rs index cc1b1040..6fbf9a7d 100644 --- a/mockall_derive/src/mock_function.rs +++ b/mockall_derive/src/mock_function.rs @@ -266,6 +266,7 @@ impl<'a> Builder<'a> { let mut return_ref = false; let mut return_refmut = false; if let Type::Reference(ref tr) = &output { + #[allow(clippy::unnecessary_map_or)] if tr.lifetime.as_ref().map_or(true, |lt| lt.ident != "static") { if tr.mutability.is_none() {