Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy warning on beta channel for optional parameters #617

Closed
ChrisGreenaway opened this issue Nov 5, 2024 · 4 comments · Fixed by #618
Closed

Clippy warning on beta channel for optional parameters #617

ChrisGreenaway opened this issue Nov 5, 2024 · 4 comments · Fixed by #618

Comments

@ChrisGreenaway
Copy link

With the following code:

#![warn(clippy::ref_option)]

#[mockall::automock]
pub trait Store {
    fn find(&self, name: Option<String>) -> bool;
}

Running cargo +beta clippy generates a warning against the generated mock code:

warning: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
@asomers
Copy link
Owner

asomers commented Nov 6, 2024

@ChrisGreenaway can you please try the linked PR?

@ChrisGreenaway
Copy link
Author

Works. 👍

@ChrisGreenaway
Copy link
Author

Thanks for the quick fix. :-)

It would be helpful to get a new release, but appreciate it's a pain to release for every small change.

@asomers
Copy link
Owner

asomers commented Nov 17, 2024

@ChrisGreenaway released in 0.13.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants