Use a closure when setting State::Active
.
This commit is contained in:
parent
9d4e49b386
commit
81d1f7ea9d
@ -39,12 +39,7 @@ macro_rules! declare_features {
|
|||||||
Feature {
|
Feature {
|
||||||
state: State::Active {
|
state: State::Active {
|
||||||
// Sets this feature's corresponding bool within `features`.
|
// Sets this feature's corresponding bool within `features`.
|
||||||
set: {
|
set: |features| features.$feature = true,
|
||||||
fn f(features: &mut Features) {
|
|
||||||
features.$feature = true;
|
|
||||||
}
|
|
||||||
f as fn(&mut Features)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
name: sym::$feature,
|
name: sym::$feature,
|
||||||
since: $ver,
|
since: $ver,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user