Conversation
Mange
left a comment
There was a problem hiding this comment.
This looks cool and all, but is_f64 changing to is_f_64 is a breaking change.
Strum does not offer custom naming in their derive macro, so I think the play here is to manually add all the is_xn methods and delegate to the is_x_n version.
Perhaps even mark the old names as deprecated or something.
I think I should open a feature request on strum to ask for
#[derive(EnumIs)]
pub enum Foo {
Baz, // is_baz
#[strum(name = "pub")]
Bar, // is_pub
}You could also do that, if you wish. I don't have time for it right now, sadly.
|
Eh, I added a PR to Let's wait for this before progressing on this PR. |
|
@Mange how if we provide
|
I am fine with this, but I really want to make sure we can mark the generated
No, if we add new methods ( I don't want duplicated methods like this. Note that this is for all the number types, not just
Yeah, it's really unfortunate… I suspect that maintainer has a lot going on right now. Maybe the best way forward is to remove I could do it if you don't feel motivated to do it yourself. :-) |
derive_is_variant
derive_is_variant has not been update for several years, while
strumis under active developementclose #76
btw my script to check dependencies imported in multiple versions: