Skip to content

Commit

Permalink
svg: clippy: Fix useless format warnings.
Browse files Browse the repository at this point in the history
Since `to_svg` returns a `String`, we don't need to format it
to a string.
  • Loading branch information
waywardmonkeys committed Jul 8, 2023
1 parent bb0ae86 commit 98de6a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/xilem_svg/src/kurbo_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl<T> View<T> for BezPath {
.document()
.create_element_ns(Some("http://www.w3.org/2000/svg"), "path")
.unwrap();
el.set_attribute("d", &format!("{}", self.to_svg()))
el.set_attribute("d", &self.to_svg())
.unwrap();
let id = Id::next();
(id, (), el)
Expand All @@ -261,7 +261,7 @@ impl<T> View<T> for BezPath {
let mut is_changed = ChangeFlags::default();
if self != prev {
element
.set_attribute("d", &format!("{}", self.to_svg()))
.set_attribute("d", &self.to_svg())
.unwrap();
is_changed |= ChangeFlags::OTHER_CHANGE;
}
Expand Down

0 comments on commit 98de6a0

Please sign in to comment.