bart2
1
How to check during runtime for that?
I've tried:
#[cfg(features = "feature_A")]
{
println!("Feature A enabled");
}
And:
if cfg!(features = "feature_A")
{
println!("Feature A enabled");
}
But those don't work...
What is the correct way to achieve the result?
Thank you
bart2
2
OK, I just got it. It needs to be feature not features...
Somewhat confusing when during build the features flag is used...
system
Closed
3
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.