diff --git a/crates/resvg/src/main.rs b/crates/resvg/src/main.rs index c4d15283..ef5ac310 100644 --- a/crates/resvg/src/main.rs +++ b/crates/resvg/src/main.rs @@ -424,7 +424,7 @@ impl FitTo { fn list_fonts(args: &CliArgs) { let mut fontdb = fontdb::Database::new(); - load_fonts(&args, &mut fontdb); + load_fonts(args, &mut fontdb); use fontdb::Family; println!("serif: {}", fontdb.family_name(&Family::Serif)); diff --git a/crates/resvg/tests/integration/main.rs b/crates/resvg/tests/integration/main.rs index 02ae6f0b..34725ebe 100644 --- a/crates/resvg/tests/integration/main.rs +++ b/crates/resvg/tests/integration/main.rs @@ -3,7 +3,6 @@ use once_cell::sync::Lazy; use rgb::{FromSlice, RGBA8}; -use std::path::Path; use std::process::Command; use std::sync::Arc; use usvg::fontdb; diff --git a/crates/usvg/src/parser/use_node.rs b/crates/usvg/src/parser/use_node.rs index a980492c..74e540f4 100644 --- a/crates/usvg/src/parser/use_node.rs +++ b/crates/usvg/src/parser/use_node.rs @@ -186,7 +186,7 @@ pub(crate) fn convert_svg( vb } else { // No `viewBox` attribute? Then use `x`, `y`, `width` and `height` instead. - let (mut w, mut h) = use_node_size(node, &state); + let (mut w, mut h) = use_node_size(node, state); // If attributes `width` and/or `height` are provided on the `use` element, // then these values will override the corresponding attributes diff --git a/crates/usvg/src/text/flatten.rs b/crates/usvg/src/text/flatten.rs index 0038da9b..f08fb872 100644 --- a/crates/usvg/src/text/flatten.rs +++ b/crates/usvg/src/text/flatten.rs @@ -317,7 +317,7 @@ impl DatabaseExt for Database { )?; svg.end_element(); - Tree::from_data(&svg.end_document().as_bytes(), &Options::default()).ok() + Tree::from_data(svg.end_document().as_bytes(), &Options::default()).ok() })? } } diff --git a/crates/usvg/src/tree/mod.rs b/crates/usvg/src/tree/mod.rs index 87270ecf..f9203dda 100644 --- a/crates/usvg/src/tree/mod.rs +++ b/crates/usvg/src/tree/mod.rs @@ -1637,7 +1637,7 @@ impl Tree { if !self .linear_gradients .iter() - .any(|other| Arc::ptr_eq(&lg, other)) + .any(|other| Arc::ptr_eq(lg, other)) { self.linear_gradients.push(lg.clone()); } @@ -1646,13 +1646,13 @@ impl Tree { if !self .radial_gradients .iter() - .any(|other| Arc::ptr_eq(&rg, other)) + .any(|other| Arc::ptr_eq(rg, other)) { self.radial_gradients.push(rg.clone()); } } Paint::Pattern(patt) => { - if !self.patterns.iter().any(|other| Arc::ptr_eq(&patt, other)) { + if !self.patterns.iter().any(|other| Arc::ptr_eq(patt, other)) { self.patterns.push(patt.clone()); } } @@ -1730,12 +1730,12 @@ impl Group { for node in self.children() { if let Node::Group(ref g) = node { if let Some(ref clip) = g.clip_path { - if !clip_paths.iter().any(|other| Arc::ptr_eq(&clip, other)) { + if !clip_paths.iter().any(|other| Arc::ptr_eq(clip, other)) { clip_paths.push(clip.clone()); } if let Some(ref sub_clip) = clip.clip_path { - if !clip_paths.iter().any(|other| Arc::ptr_eq(&sub_clip, other)) { + if !clip_paths.iter().any(|other| Arc::ptr_eq(sub_clip, other)) { clip_paths.push(sub_clip.clone()); } } @@ -1754,12 +1754,12 @@ impl Group { for node in self.children() { if let Node::Group(ref g) = node { if let Some(ref mask) = g.mask { - if !masks.iter().any(|other| Arc::ptr_eq(&mask, other)) { + if !masks.iter().any(|other| Arc::ptr_eq(mask, other)) { masks.push(mask.clone()); } if let Some(ref sub_mask) = mask.mask { - if !masks.iter().any(|other| Arc::ptr_eq(&sub_mask, other)) { + if !masks.iter().any(|other| Arc::ptr_eq(sub_mask, other)) { masks.push(sub_mask.clone()); } } @@ -1778,7 +1778,7 @@ impl Group { for node in self.children() { if let Node::Group(ref g) = node { for filter in g.filters() { - if !filters.iter().any(|other| Arc::ptr_eq(&filter, other)) { + if !filters.iter().any(|other| Arc::ptr_eq(filter, other)) { filters.push(filter.clone()); } }