File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,9 @@ fn collect_clip_rules(group: &Group) -> Vec<FillRule> {
84
84
}
85
85
}
86
86
Node :: Text ( ref text) => {
87
- text. flattened
88
- . as_deref ( )
89
- . map ( |group| clip_rules . extend ( collect_clip_rules ( group ) ) ) ;
87
+ if let Some ( group ) = text. flattened . as_deref ( ) {
88
+ clip_rules . extend ( collect_clip_rules ( group ) )
89
+ }
90
90
}
91
91
Node :: Group ( ref group) => {
92
92
clip_rules. extend ( collect_clip_rules ( group) ) ;
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ pub fn render(
23
23
// dummy values in the beginning and then set the proper values afterwards.
24
24
let ( mut tree, bbox, scaled_bbox) = {
25
25
let mut root = Group :: default ( ) ;
26
- let mut sub_root = Group :: default ( ) ;
27
- sub_root . transform = ts ;
26
+ let mut sub_root = Group { transform : ts , .. Default :: default ( ) } ;
27
+
28
28
sub_root. children . push ( Node :: Group ( Box :: from ( group. clone ( ) ) ) ) ;
29
29
root. children . push ( Node :: Group ( Box :: from ( sub_root) ) ) ;
30
30
let mut tree = usvg:: Tree {
You can’t perform that action at this time.
0 commit comments