[librsvg: 5/19] Implement Default where missing




commit 71d87b099f3d073ad0818d4060d1d1740479fe37
Author: Sven Neumann <sven svenfoo org>
Date:   Thu Aug 20 22:06:39 2020 +0200

    Implement Default where missing
    
    https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default

 rsvg_internals/src/path_builder.rs | 6 ++++++
 rsvg_internals/src/text.rs         | 6 ++++++
 2 files changed, 12 insertions(+)
---
diff --git a/rsvg_internals/src/path_builder.rs b/rsvg_internals/src/path_builder.rs
index 27c0a43aa..f53f3dfa8 100644
--- a/rsvg_internals/src/path_builder.rs
+++ b/rsvg_internals/src/path_builder.rs
@@ -544,6 +544,12 @@ impl PathBuilder {
     }
 }
 
+impl Default for PathBuilder {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 /// An iterator over `SubPath` from a Path.
 struct SubPathIter<'a> {
     path: &'a Path,
diff --git a/rsvg_internals/src/text.rs b/rsvg_internals/src/text.rs
index 07d1ababb..6a767cfc8 100644
--- a/rsvg_internals/src/text.rs
+++ b/rsvg_internals/src/text.rs
@@ -562,6 +562,12 @@ impl Chars {
     }
 }
 
+impl Default for Chars {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 #[derive(Default)]
 pub struct Text {
     x: Length<Horizontal>,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]