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

Escape braces in assert expressions. #272

Merged
merged 1 commit into from
Nov 25, 2020
Merged

Conversation

Dirbaio
Copy link
Contributor

@Dirbaio Dirbaio commented Nov 24, 2020

Without this, defmt attempts to interpret the braces as format args, resulting in errors like

    defmt::assert!({1 + 1} == { 2 });
error: malformed format string (missing `:`)
  --> firmware/qemu/src/bin/assert.rs:10:5
   |
10 |     defmt::assert!({1 + 1} == { 2 });
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@japaric japaric merged commit 0e353d8 into knurling-rs:main Nov 25, 2020
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