Skip to content

Commit

Permalink
Format + clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV committed Jan 21, 2024
1 parent 6562a7e commit cf8bd18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/render/clip_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ fn collect_clip_rules(group: &Group) -> Vec<FillRule> {
}
}
Node::Text(ref text) => {
text.flattened
.as_deref()
.map(|group| clip_rules.extend(collect_clip_rules(group)));
if let Some(group) = text.flattened.as_deref() {
clip_rules.extend(collect_clip_rules(group))
}
}
Node::Group(ref group) => {
clip_rules.extend(collect_clip_rules(group));
Expand Down
4 changes: 2 additions & 2 deletions src/render/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pub fn render(
// dummy values in the beginning and then set the proper values afterwards.
let (mut tree, bbox, scaled_bbox) = {
let mut root = Group::default();
let mut sub_root = Group::default();
sub_root.transform = ts;
let mut sub_root = Group { transform: ts, ..Default::default() };

sub_root.children.push(Node::Group(Box::from(group.clone())));
root.children.push(Node::Group(Box::from(sub_root)));
let mut tree = usvg::Tree {
Expand Down

0 comments on commit cf8bd18

Please sign in to comment.