-
Notifications
You must be signed in to change notification settings - Fork 14
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 cfg using non-existing feature #5
Conversation
I think we should update the features to suppress implicit features like |
Good idea! |
e5fdd09
to
e2a85e3
Compare
Fixed it. |
rinja_derive/Cargo.toml
Outdated
@@ -14,7 +14,9 @@ rust-version = "1.65" | |||
proc-macro = true | |||
|
|||
[features] | |||
config = ["serde", "basic-toml"] | |||
config = ["serde", "toml"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the use of serde
and basic-toml
are implementation details, so the line should read config = ["dep:serde", "dep:basic-toml"]
, without exposing them as features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's what I did originally but cargo
was unhappy with feature = "basic-toml"
. Hence why I went full in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah. I guess all usages of #[cfg(feature = "toml")]
, #[cfg(feature = "basic-toml")]
, and #[cfg(feature = "serde")]
are wrong in rinja_derive
, and should be #[cfg(feature = "config")]
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that makes more sense. Changing to that then!
e2a85e3
to
3d7083e
Compare
And fixed clippy too. :) |
3d7083e
to
c4f7fed
Compare
I love clippy. :) Those kind of bugs and shortcomings are impossible to find unless to read the whole code base repeatedly. |
It's not clippy but rustc in this case. But yes, it's really awesome! |
Fixes this warning:
It's been a while that this was the case though. Seems like these tests were basically never run?