File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,21 @@ fn main() {
1616 if blockchain_features. len ( ) > 1 {
1717 panic ! ( "At most one blockchain client feature can be enabled but these features were enabled: {:?}" , blockchain_features)
1818 }
19+
20+ let key_value_db =
21+ env:: var_os ( "CARGO_FEATURE_KEY_VALUE_DB" ) . map ( |_| "key-value-db" . to_string ( ) ) ;
22+ let sqlite_db = env:: var_os ( "CARGO_FEATURE_SQLITE_DB" ) . map ( |_| "sqlite-db" . to_string ( ) ) ;
23+
24+ let database_features: Vec < String > = vec ! [ key_value_db, sqlite_db]
25+ . iter ( )
26+ . map ( |f| f. to_owned ( ) )
27+ . flatten ( )
28+ . collect ( ) ;
29+
30+ if database_features. len ( ) > 1 {
31+ panic ! (
32+ "At most one database feature can be enabled but these features were enabled: {:?}" ,
33+ database_features
34+ )
35+ }
1936}
You can’t perform that action at this time.
0 commit comments