File tree Expand file tree Collapse file tree 2 files changed +20
-20
lines changed
Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,5 @@ tsconfig.tsbuildinfo
1212codecov
1313codecov. *
1414codecov. * . *
15+ lcov.info
16+ tarpaulin-report.html
Original file line number Diff line number Diff line change @@ -94,39 +94,37 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> {
9494 None ,
9595 ) ) ;
9696 } else if call. arguments . len ( ) == 1 {
97- match extract_style_from_expression (
97+ if let ExtractResult :: ExtractStyle ( styles ) = extract_style_from_expression (
9898 & self . ast ,
9999 None ,
100100 call. arguments [ 0 ] . to_expression_mut ( ) ,
101101 0 ,
102102 None ,
103103 ) {
104- ExtractResult :: ExtractStyle ( styles )
105- | ExtractResult :: ExtractStyleWithChangeTag ( styles, _) => {
106- let class_name = gen_class_names ( & self . ast , & styles) ;
107- let mut styles = styles
108- . into_iter ( )
109- . flat_map ( |ex| ex. extract ( ) )
110- . collect :: < Vec < _ > > ( ) ;
104+ // css can not reachable
105+ // ExtractResult::ExtractStyleWithChangeTag(styles, _)
106+ let class_name = gen_class_names ( & self . ast , & styles) ;
107+ let mut styles = styles
108+ . into_iter ( )
109+ . flat_map ( |ex| ex. extract ( ) )
110+ . collect :: < Vec < _ > > ( ) ;
111111
112- self . styles . append ( & mut styles) ;
113- if let Some ( cls) = class_name {
114- * it = cls;
115- } else {
116- * it = Expression :: StringLiteral ( self . ast . alloc_string_literal (
117- SPAN ,
118- "" . to_string ( ) ,
119- None ,
120- ) ) ;
121- }
122- }
123- _ => {
112+ self . styles . append ( & mut styles) ;
113+ if let Some ( cls) = class_name {
114+ * it = cls;
115+ } else {
124116 * it = Expression :: StringLiteral ( self . ast . alloc_string_literal (
125117 SPAN ,
126118 "" . to_string ( ) ,
127119 None ,
128120 ) ) ;
129121 }
122+ } else {
123+ * it = Expression :: StringLiteral ( self . ast . alloc_string_literal (
124+ SPAN ,
125+ "" . to_string ( ) ,
126+ None ,
127+ ) ) ;
130128 }
131129 }
132130 }
You can’t perform that action at this time.
0 commit comments