Merge pull request #236 from hecrj/improvement/svg-handle-from
Genericize `From` implementation for `svg::Handle`
This commit is contained in:
commit
4d3afe2f0c
1 changed files with 5 additions and 8 deletions
|
|
@ -147,14 +147,11 @@ 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 {
|
||||
impl<T> From<T> for Handle
|
||||
where
|
||||
T: Into<PathBuf>,
|
||||
{
|
||||
fn from(path: T) -> Handle {
|
||||
Handle::from_path(path)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue