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

add #[must_use] to generate function #41

Closed
wants to merge 1 commit into from

Conversation

enaut
Copy link

@enaut enaut commented Mar 7, 2021

The clippy lint https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate suggest that this function should have a must use flag - it does seem sensible to me. - but please verify this does not break anything.

The clippy lint https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate suggest that this function should have a must use flag - it does seem sensible to me.
@kilork kilork added this to the v3.1.0 milestone Mar 7, 2021
@kilork
Copy link
Owner

kilork commented Mar 7, 2021

Hey, this sounds reasonable.

I need to check, how it would play with the scenario, which I personally use a lot: a crate which serves only one target - to collect resources and export single function, which would be later used in another crate.

If it goes well, I think it is good idea to add it, but probably I would just add it without merging this PR, because I already reworked this part of code.

@kilork kilork added the enhancement New feature or request label Mar 7, 2021
@enaut
Copy link
Author

enaut commented Mar 8, 2021

No problem... if you choose to not make it must_use please add an #[allow(clippy::must_use_candidate)] so that the generated code produces no warnings on strict clippy settings like -Wclippy::pedantic -Wclippy::nursery -Wclippy::cargo -Wclippy::all.

@stale
Copy link

stale bot commented May 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label May 7, 2021
@kilork kilork removed the wontfix This will not be worked on label May 9, 2021
@stale
Copy link

stale bot commented Jul 8, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 8, 2021
@enaut
Copy link
Author

enaut commented Jul 8, 2021

Do you still need anything or should I close the PR?

@stale stale bot removed the wontfix This will not be worked on label Jul 8, 2021
@kilork
Copy link
Owner

kilork commented Jul 8, 2021

I created a separate issue #44 to track this for 3.1.0. Really have almost no time last months, sorry for this :( You can close this PR as we have tracking issue instead and 3.1.0 is very different to current version.

@enaut
Copy link
Author

enaut commented Jul 9, 2021

Ok thanks no worries

@enaut enaut closed this Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants