Genericize From implementation for image::Handle
This commit is contained in:
parent
ae009158cc
commit
f4776a46bb
1 changed files with 6 additions and 9 deletions
|
|
@ -177,15 +177,12 @@ impl Handle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<String> for Handle {
|
impl<T> From<T> for Handle
|
||||||
fn from(path: String) -> Handle {
|
where
|
||||||
Handle::from_path(path)
|
T: Into<PathBuf>,
|
||||||
}
|
{
|
||||||
}
|
fn from(path: T) -> Handle {
|
||||||
|
Handle::from_path(path.into())
|
||||||
impl From<&str> for Handle {
|
|
||||||
fn from(path: &str) -> Handle {
|
|
||||||
Handle::from_path(path)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue