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

Remove redundant unit expressions to calm clippy #2778

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

crapStone
Copy link
Contributor

closes #2774

After the code generation of the macro wasm_bindgen clippy sees a lot of explicit () at the ends of blocks.

I removed them in codegen.rs, because imho it is clear enough that these blocks don't return anything because of the expressions const #some_name: () = { before these blocks.

@alexcrichton alexcrichton merged commit 232d94e into rustwasm:main Jan 26, 2022
@crapStone crapStone deleted the fix/unused-unit branch January 26, 2022 18:40
egfx-notifications added a commit to egfx-notifications/wasm-minisign-verify that referenced this pull request Mar 4, 2022
wasm-bindgen 0.2.79 introduced a change in code generation that makes clippy complain
A fix has already been merged to main (rustwasm/wasm-bindgen#2778)
but we have to wait for the next official release to make use of it.
Once we update to the new wasm-bindgen with the fix we should remove
this workaround!
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.

Unneeded Unit Expression Warning From Clippy
2 participants