@@ -3,7 +3,7 @@ use clap::Parser;
3
3
use itertools:: Itertools ;
4
4
use log:: * ;
5
5
use std:: { collections:: HashMap , ffi:: OsStr , path:: Path , process:: Command , str:: FromStr } ;
6
- use strum:: VariantNames ;
6
+ use strum:: { IntoEnumIterator , VariantNames } ;
7
7
8
8
#[ derive(
9
9
Clone ,
@@ -33,19 +33,18 @@ enum Feature {
33
33
MluaSerialize ,
34
34
MluaMacros ,
35
35
MluaAsync ,
36
-
37
36
// Rhai
38
- Rhai ,
37
+ // Rhai,
39
38
40
39
// Rune
41
- Rune ,
40
+ // Rune,
42
41
}
43
42
44
- #[ derive( Debug , Clone , Copy , Hash , PartialEq , Eq ) ]
43
+ #[ derive( Debug , Clone , Copy , Hash , PartialEq , Eq , strum :: EnumIter ) ]
45
44
enum FeatureGroup {
46
45
LuaExclusive ,
47
- RhaiExclusive ,
48
- RuneExclusive ,
46
+ // RhaiExclusive,
47
+ // RuneExclusive,
49
48
ForExternalCrate ,
50
49
BMSFeature ,
51
50
}
@@ -54,16 +53,16 @@ impl FeatureGroup {
54
53
fn default_feature ( self ) -> Feature {
55
54
match self {
56
55
FeatureGroup :: LuaExclusive => Feature :: Lua54 ,
57
- FeatureGroup :: RhaiExclusive => Feature :: Rhai ,
58
- FeatureGroup :: RuneExclusive => Feature :: Rune ,
56
+ // FeatureGroup::RhaiExclusive => Feature::Rhai,
57
+ // FeatureGroup::RuneExclusive => Feature::Rune,
59
58
_ => panic ! ( "No default feature for non-exclusive group" ) ,
60
59
}
61
60
}
62
61
63
62
fn is_exclusive ( self ) -> bool {
64
63
matches ! (
65
64
self ,
66
- FeatureGroup :: LuaExclusive | FeatureGroup :: RhaiExclusive | FeatureGroup :: RuneExclusive
65
+ FeatureGroup :: LuaExclusive // | FeatureGroup::RhaiExclusive | FeatureGroup::RuneExclusive
67
66
)
68
67
}
69
68
}
@@ -82,8 +81,8 @@ impl IntoFeatureGroup for Feature {
82
81
| Feature :: Luajit
83
82
| Feature :: Luajit52
84
83
| Feature :: Luau => FeatureGroup :: LuaExclusive ,
85
- Feature :: Rhai => FeatureGroup :: RhaiExclusive ,
86
- Feature :: Rune => FeatureGroup :: RuneExclusive ,
84
+ // Feature::Rhai => FeatureGroup::RhaiExclusive,
85
+ // Feature::Rune => FeatureGroup::RuneExclusive,
87
86
Feature :: MluaAsync
88
87
| Feature :: MluaMacros
89
88
| Feature :: MluaSerialize
@@ -695,12 +694,8 @@ impl Xtasks {
695
694
) ;
696
695
697
696
// choose language features
698
- for category in [
699
- FeatureGroup :: LuaExclusive ,
700
- FeatureGroup :: RhaiExclusive ,
701
- FeatureGroup :: RuneExclusive ,
702
- ] {
703
- feature_set. 0 . push ( category. default_feature ( ) ) ;
697
+ for exclusive_category in FeatureGroup :: iter ( ) . filter ( |g| g. is_exclusive ( ) ) {
698
+ feature_set. 0 . push ( exclusive_category. default_feature ( ) ) ;
704
699
}
705
700
706
701
// include all non-bms features
0 commit comments