diff options
Diffstat (limited to 'native')
-rw-r--r-- | native/src/widget/image.rs | 15 |
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()) } } |