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

Explictly drop instead of relying on RAII. #2144

Merged
merged 1 commit into from
May 18, 2020
Merged

Explictly drop instead of relying on RAII. #2144

merged 1 commit into from
May 18, 2020

Conversation

TannerRogalsky
Copy link
Contributor

This is functionally identical to the previous implementation but it subverts a linter warning on structs annotated with #[must_use].

An alternative solution might be to add an annotation to the generated function to #[allow(unused)] but this seems more focused and explicit.

@alexcrichton alexcrichton merged commit 047b420 into rustwasm:master May 18, 2020
@alexcrichton
Copy link
Contributor

Thanks!

Although on second though now a few moments after merging, mind adding a test for this?

@TannerRogalsky
Copy link
Contributor Author

Yep! I will open a separate PR for it.

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 this pull request may close these issues.

2 participants