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

Defmt's dbg! implementation fails clippy::double_parens #642

Open
DusterTheFirst opened this issue Nov 28, 2021 · 1 comment
Open

Defmt's dbg! implementation fails clippy::double_parens #642

DusterTheFirst opened this issue Nov 28, 2021 · 1 comment
Labels
type: bug Something isn't working

Comments

@DusterTheFirst
Copy link

When using the dbg! macro in a function call, the macro expansion seems to flag a clippy lint. clippy::double_parens to be specific.

image

@Urhengulas
Copy link
Member

This is more of a clippy, than a defmt issue. In best case clippy would ignore lints from foreign macros, since as a user you have limited control over the expansion. See rust-lang/rust-clippy#407 for more information.

As a workaround you can silence the warning by adding an allow-statement before the macro call:

#[allow(clippy::double_parens)]
function(defmt::dbg!(a));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants