summaryrefslogtreecommitdiffstats
path: root/core/src/svg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/svg.rs')
-rw-r--r--core/src/svg.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/svg.rs b/core/src/svg.rs
index 54e9434e..d63e3c95 100644
--- a/core/src/svg.rs
+++ b/core/src/svg.rs
@@ -50,6 +50,15 @@ impl Handle {
}
}
+impl<T> From<T> for Handle
+where
+ T: Into<PathBuf>,
+{
+ fn from(path: T) -> Handle {
+ Handle::from_path(path.into())
+ }
+}
+
impl Hash for Handle {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.id.hash(state);