Skip to content

Commit

Permalink
Suppress a new clippy::unnecessary-map-or warning (#629)
Browse files Browse the repository at this point in the history
Clippy's suggested fix requires a 1.82.0 MSRV.  So for now, merely
suppress it.

Issue #628
  • Loading branch information
asomers authored Dec 2, 2024
1 parent 62f92cb commit 9d6e632
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mockall_derive/src/mock_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 9d6e632

Please sign in to comment.