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

Fix the unconditional usage of string interpolation in strum #360

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

Peternator7
Copy link
Owner

fixes #359

tronical added a commit to slint-ui/slint that referenced this pull request Jun 3, 2024
Patch in Peternator7/strum#360 until it is
merged and released on crates.io.
@Peternator7 Peternator7 merged commit a663c60 into master Jun 5, 2024
0 of 2 checks passed
@@ -124,7 +124,17 @@ pub fn display_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
}
}
}
Fields::Unit => quote! { #name::#ident #params => ::core::fmt::Display::fmt(&format!(#output), f) }
Fields::Unit => {

Choose a reason for hiding this comment

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

Related to #363
Since format! is no longer used for Unit, please do not check the curly brackets on it.
This will cause the use of a single curly bracket to fail to compile, and two curly brackets cannot be escaped.
Or continue to use format! for Unit, and release it as a breaking change.

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.

strum-macros 0.26.3 breaks no_std build
2 participants