diff options
author | 2024-02-03 21:28:25 +0100 | |
---|---|---|
committer | 2024-02-05 23:52:04 +0100 | |
commit | 7bd849199cdd88157aa8f681d7aea83dfc955ccf (patch) | |
tree | d4b8503e54b5047bcacb113f998bd7cf461f2d40 /core | |
parent | 8e76d53803631ed581c6214f9c3abe02424c8272 (diff) | |
download | iced-7bd849199cdd88157aa8f681d7aea83dfc955ccf.tar.gz iced-7bd849199cdd88157aa8f681d7aea83dfc955ccf.tar.bz2 iced-7bd849199cdd88157aa8f681d7aea83dfc955ccf.zip |
Add From<PathBuf> to Svg Handle
Diffstat (limited to 'core')
-rw-r--r-- | core/src/svg.rs | 9 |
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); |