Add From<PathBuf> to Svg Handle
This commit is contained in:
parent
8e76d53803
commit
7bd849199c
1 changed files with 9 additions and 0 deletions
|
|
@ -50,6 +50,15 @@ impl Handle {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> From<T> for Handle
|
||||
where
|
||||
T: Into<PathBuf>,
|
||||
{
|
||||
fn from(path: T) -> Handle {
|
||||
Handle::from_path(path.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl Hash for Handle {
|
||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
||||
self.id.hash(state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue