meilisearch / milli

Search engine library for Meilisearch ⚡️
MIT License
464 stars 81 forks source link

Fixing piles of clippy errors. #665

Closed ehiggs closed 2 years ago

ehiggs commented 2 years ago

Related issue

No issue fixed. Simply cleaning up some code for clippy on the march towards a clean build when #659 is merged.

What does this PR do?

Most of these are calling clone when the struct supports Copy.

Many are using & and &mut on self when the function they are called from already has an immutable or mutable borrow so this isn't needed.

I tried to stay away from actual changes or places where I'd have to name fresh variables.

PR checklist

Please check if your PR fulfills the following requirements:

curquiza commented 2 years ago

Hello @ehiggs

thanks for your PR!

bors try

bors[bot] commented 2 years ago

try

Build succeeded:

ehiggs commented 2 years ago

Glad to help! @ManyTheFish let me know if there are any changes or explanations needed.

curquiza commented 2 years ago

@ehiggs thanks for your PR. The team has a lot to do currently because of our sprint + hacktoberfest. We will do our best to review your PR asap 😄

Thanks again for your work, this is really appreciated

curquiza commented 2 years ago

@ManyTheFish what is the best solution then? Which PRs can be problematic?

ehiggs commented 2 years ago

How do I set a label like "no breaking" for the Enforce PR labels?

ehiggs commented 2 years ago

However, it changes a significant amount of files and I'm a bit concerned by the merge conflicts that people will have. thinking

I understand the concern, which is why I only did some of the fixes. If someone needs help with rebasing, let me know and I can help.

ManyTheFish commented 2 years ago

I think we can merge this PR, There is not so much external contribution now, sorry @ehiggs for the time! Thank you for your contribution! 👍

bors merge

bors[bot] commented 2 years ago

Build succeeded:

meili-bot commented 2 years ago

This message is sent automatically

Thank you for contributing to Meilisearch. If you are participating in Hacktoberfest, and you would like to receive some gift from Meilisearch too, please complete this form.