summaryrefslogtreecommitdiffstats
path: root/native/src/widget/image.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-31 17:11:58 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-31 17:11:58 +0200
commit990b4aa0b75d069c08e5f4018f9430a70a394eb7 (patch)
tree3100782d2dfb19dea456402d6615ec340e97d9b7 /native/src/widget/image.rs
parent749a9588d738de9c3ae734e6f026768c77eb3cce (diff)
parent291dc728a42c6e888ca6d97eea0f3308591b15a5 (diff)
downloadiced-990b4aa0b75d069c08e5f4018f9430a70a394eb7.tar.gz
iced-990b4aa0b75d069c08e5f4018f9430a70a394eb7.tar.bz2
iced-990b4aa0b75d069c08e5f4018f9430a70a394eb7.zip
Merge branch 'master' into feature/container-padding
Diffstat (limited to 'native/src/widget/image.rs')
-rw-r--r--native/src/widget/image.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs
index 9dc13fa9..0f38a90e 100644
--- a/native/src/widget/image.rs
+++ b/native/src/widget/image.rs
@@ -177,15 +177,12 @@ impl Handle {
}
}
-impl From<String> for Handle {
- fn from(path: String) -> Handle {
- Handle::from_path(path)
- }
-}
-
-impl From<&str> for Handle {
- fn from(path: &str) -> Handle {
- Handle::from_path(path)
+impl<T> From<T> for Handle
+where
+ T: Into<PathBuf>,
+{
+ fn from(path: T) -> Handle {
+ Handle::from_path(path.into())
}
}