Genericize From
implementation for svg::Handle
This commit is contained in:
parent
643fa18cae
commit
893841bfbd
@ -147,14 +147,11 @@ 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 {
|
||||||
|
|
||||||
impl From<&str> for Handle {
|
|
||||||
fn from(path: &str) -> Handle {
|
|
||||||
Handle::from_path(path)
|
Handle::from_path(path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user