Improve Icon::new to support impl Into<IconName>
This commit is contained in:
parent
1eb44c4f1a
commit
8609968ac2
1 changed files with 2 additions and 1 deletions
|
|
@ -117,7 +117,8 @@ impl Clone for Icon {
|
|||
}
|
||||
|
||||
impl Icon {
|
||||
pub fn new(name: IconName) -> Self {
|
||||
pub fn new(name: impl Into<IconName>) -> Self {
|
||||
let name: IconName = name.into();
|
||||
Self::default().path(name.path())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue