@@ -57,8 +57,9 @@ enum PluginType<'a> {
57
57
Optional ( fn ( Option < & Value > , & ' a TailwindTheme ) -> PluginResult < ' a > ) ,
58
58
/// This plugin requires a value, or arbitrary css.
59
59
RequiredArbitrary ( fn ( & SubjectValue , & ' a TailwindTheme ) -> PluginResult < ' a > ) ,
60
+ RequiredArbitraryBox ( Box < dyn Fn ( & SubjectValue , & ' a TailwindTheme ) -> PluginResult < ' a > > ) ,
60
61
/// This plugin takes an optional value, or arbitrary css.
61
- OptionalArbitrary ( fn ( & Option < SubjectValue > , & ' a TailwindTheme ) -> PluginResult < ' a > ) ,
62
+ OptionalArbitrary ( fn ( Option < & SubjectValue > , & ' a TailwindTheme ) -> PluginResult < ' a > ) ,
62
63
}
63
64
64
65
impl < ' a > Literal < ' a > {
@@ -107,7 +108,7 @@ impl<'a> Literal<'a> {
107
108
Translate ( tr) => {
108
109
OptionalAbitraryBox ( StdBox :: new ( move |v, t| plugin:: translate ( tr, v, t) ) )
109
110
}
110
- Col ( c) => RequiredBox ( StdBox :: new ( move |v, t| plugin:: col ( c, v, t) ) ) ,
111
+ Col ( c) => RequiredArbitraryBox ( StdBox :: new ( move |v, t| plugin:: col ( c, v, t) ) ) ,
111
112
Row ( r) => RequiredBox ( StdBox :: new ( move |v, t| plugin:: row ( r, v, t) ) ) ,
112
113
Overflow ( o) => RequiredBox ( StdBox :: new ( move |v, t| plugin:: overflow ( o, v, t) ) ) ,
113
114
Not ( _) => todo ! ( ) ,
@@ -213,6 +214,7 @@ impl<'a> Literal<'a> {
213
214
( Optional ( p) , Some ( SubjectValue :: Value ( s) ) ) => p ( Some ( s) , theme) ,
214
215
( Optional ( p) , None ) => p ( None , theme) ,
215
216
( RequiredArbitrary ( p) , Some ( value) ) => p ( value, theme) ,
217
+ ( RequiredArbitraryBox ( p) , Some ( value) ) => p ( value, theme) ,
216
218
( Singular ( p) , None ) => Ok ( p ( ) ) ,
217
219
( RequiredBox ( p) , Some ( SubjectValue :: Value ( value) ) ) => p ( value, theme) ,
218
220
( OptionalAbitraryBox ( p) , value) => p ( value, theme) ,
0 commit comments