@@ -52,6 +52,10 @@ impl TagList {
5252 pub fn is_empty ( & self ) -> bool {
5353 self . 0 . is_empty ( )
5454 }
55+
56+ pub fn contains ( & self , key : & str ) -> bool {
57+ self . 0 . iter ( ) . any ( |s| s == key)
58+ }
5559}
5660
5761impl IntoIterator for TagList {
@@ -74,6 +78,10 @@ impl PluginList {
7478 pub fn is_empty ( & self ) -> bool {
7579 self . 0 . is_empty ( )
7680 }
81+
82+ pub fn contains ( & self , key : & str ) -> bool {
83+ self . 0 . iter ( ) . any ( |s| s == key)
84+ }
7785}
7886
7987impl IntoIterator for PluginList {
@@ -225,6 +233,10 @@ impl NodeList {
225233 pub fn is_empty ( & self ) -> bool {
226234 self . len ( ) == 0
227235 }
236+
237+ pub fn contains ( & self , key : & str ) -> bool {
238+ self . 0 . iter ( ) . any ( |s| s == key)
239+ }
228240}
229241
230242impl IntoIterator for NodeList {
@@ -2297,6 +2309,10 @@ impl FeatureFlagList {
22972309 pub fn is_empty ( & self ) -> bool {
22982310 self . len ( ) == 0
22992311 }
2312+
2313+ pub fn contains ( & self , key : & str ) -> bool {
2314+ self . 0 . iter ( ) . any ( |ff| ff. name == key)
2315+ }
23002316}
23012317
23022318impl IntoIterator for FeatureFlagList {
@@ -2394,6 +2410,10 @@ impl DeprecatedFeatureList {
23942410 pub fn is_empty ( & self ) -> bool {
23952411 self . 0 . is_empty ( )
23962412 }
2413+
2414+ pub fn contains ( & self , key : & str ) -> bool {
2415+ self . 0 . iter ( ) . any ( |df| df. name == key)
2416+ }
23972417}
23982418
23992419impl IntoIterator for DeprecatedFeatureList {
0 commit comments