@@ -16,7 +16,7 @@ use graphene_core::raster::{
1616 BlendMode , CellularDistanceFunction , CellularReturnType , Color , DomainWarpType , FractalType , LuminanceCalculation , NoiseType , RedGreenBlue , RedGreenBlueAlpha , RelativeAbsolute ,
1717 SelectiveColorChoice ,
1818} ;
19- use graphene_core:: registry:: VariantMetadata ;
19+ use graphene_core:: registry:: { ChoiceTypeStatic , ChoiceWidgetHint , VariantMetadata } ;
2020use graphene_core:: text:: Font ;
2121use graphene_core:: vector:: misc:: CentroidType ;
2222use graphene_core:: vector:: style:: { GradientType , LineCap , LineJoin } ;
@@ -95,13 +95,13 @@ trait ChoiceSource {
9595 fn into_tagged_value ( v : Self :: Value ) -> TaggedValue ;
9696 fn from_tagged_value ( tv : Option < & TaggedValue > ) -> Option < Self :: Value > ;
9797 fn enumerate ( ) -> impl Iterator < Item = impl Iterator < Item = & ' static ( Self :: Value , VariantMetadata ) > > ;
98- fn widget_hint ( ) -> graphene_core :: vector :: misc :: ChoiceWidgetHint ;
98+ fn widget_hint ( ) -> ChoiceWidgetHint ;
9999}
100100
101- struct ChoiceSourceStatic < T : graphene_core :: vector :: misc :: ChoiceTypeStatic > ( std:: marker:: PhantomData < T > ) ;
101+ struct ChoiceSourceStatic < T : ChoiceTypeStatic > ( std:: marker:: PhantomData < T > ) ;
102102impl < T > ChoiceSource for ChoiceSourceStatic < T >
103103where
104- T : graphene_core :: vector :: misc :: ChoiceTypeStatic + ' static ,
104+ T : ChoiceTypeStatic + ' static ,
105105 for < ' a > & ' a T : TryFrom < & ' a TaggedValue > ,
106106 TaggedValue : From < T > ,
107107{
@@ -120,12 +120,12 @@ where
120120 fn enumerate ( ) -> impl Iterator < Item = impl Iterator < Item = & ' static ( Self :: Value , VariantMetadata ) > > {
121121 T :: list ( ) . into_iter ( ) . map ( |i| i. into_iter ( ) )
122122 }
123- fn widget_hint ( ) -> graphene_core :: vector :: misc :: ChoiceWidgetHint {
123+ fn widget_hint ( ) -> ChoiceWidgetHint {
124124 T :: WIDGET_HINT
125125 }
126126}
127127
128- fn enum_source < E : graphene_core :: vector :: misc :: ChoiceTypeStatic > ( ) -> ChoiceSourceStatic < E > {
128+ fn enum_source < E : ChoiceTypeStatic > ( ) -> ChoiceSourceStatic < E > {
129129 ChoiceSourceStatic ( std:: marker:: PhantomData )
130130}
131131
@@ -139,8 +139,8 @@ fn choice_widget<E: ChoiceSource>(list: E, document_node: &DocumentNode, node_id
139139
140140 if let Some ( current) = E :: from_tagged_value ( input. as_non_exposed_value ( ) ) {
141141 let widget = match E :: widget_hint ( ) {
142- graphene_std :: vector :: misc :: ChoiceWidgetHint :: Dropdown => dropdown ( list, node_id, index, current) ,
143- graphene_std :: vector :: misc :: ChoiceWidgetHint :: RadioButtons => radio_buttons ( list, node_id, index, current) ,
142+ ChoiceWidgetHint :: Dropdown => dropdown ( list, node_id, index, current) ,
143+ ChoiceWidgetHint :: RadioButtons => radio_buttons ( list, node_id, index, current) ,
144144 } ;
145145 widgets. extend_from_slice ( & [ Separator :: new ( SeparatorType :: Unrelated ) . widget_holder ( ) , widget] ) ;
146146 }
0 commit comments