Skip to content

Commit cf8bd18

Browse files
committed
Format + clippy
1 parent 6562a7e commit cf8bd18

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/render/clip_path.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ fn collect_clip_rules(group: &Group) -> Vec<FillRule> {
8484
}
8585
}
8686
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+
}
9090
}
9191
Node::Group(ref group) => {
9292
clip_rules.extend(collect_clip_rules(group));

src/render/filter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ pub fn render(
2323
// dummy values in the beginning and then set the proper values afterwards.
2424
let (mut tree, bbox, scaled_bbox) = {
2525
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+
2828
sub_root.children.push(Node::Group(Box::from(group.clone())));
2929
root.children.push(Node::Group(Box::from(sub_root)));
3030
let mut tree = usvg::Tree {

0 commit comments

Comments
 (0)