Closed tronical closed 5 months ago
This was unintentional. Thank you for pointing it out, I've put out a candidate fix that I'll merge later today if everything seems correct.
Thank you!
This was unintentional. Thank you for pointing it out, I've put out a candidate fix that I'll merge later today if everything seems correct.
Another breaking change is that format!
will affect serialize
. I have an enum like this:
#[derive(Display)]
enum SyntaxKind {
#[strum(serialize = "`{`")]
LCurly,
}
Any serialize
containing {}
characters will be broken.
@tronical, 0.26.4
is available that should fix your issue. @gmryuuko, in your case, you can mitigate by escaping the curly brace.
#[derive(Display)]
enum SyntaxKind {
#[strum(serialize = "`{{`")]
LCurly,
}
Thanks a lot!
With 0.26.3, the emitted code when using
derive(strum::Display)
usesformat!
unconditionally. This requires the surrounding code touse format::alloc;
, which seems like an unfortunate breaking change to me.Example
main.rs
:Sample
Cargo.toml
:If you downgrade to
=0.26.2
the build works, otherwise it aborts with:I think it's okay to require the surrounding
no_std
code touse alloc::format;
when usingstrum
, but it would be great if this requirement could come with a new major version (0.27) instead.