improv(segmented-button): set icons with impl Into<Icon>
This commit is contained in:
parent
31ea71deef
commit
16c1265535
2 changed files with 4 additions and 4 deletions
|
|
@ -103,8 +103,8 @@ where
|
||||||
/// .build()
|
/// .build()
|
||||||
/// ```
|
/// ```
|
||||||
#[allow(clippy::must_use_candidate, clippy::return_self_not_must_use)]
|
#[allow(clippy::must_use_candidate, clippy::return_self_not_must_use)]
|
||||||
pub fn icon(mut self, icon: Icon) -> Self {
|
pub fn icon(mut self, icon: impl Into<Icon>) -> Self {
|
||||||
self.model.0.icon_set(self.id, icon);
|
self.model.0.icon_set(self.id, icon.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,8 @@ where
|
||||||
/// model.insert().text("Item A").icon(IconSource::from("icon-a"));
|
/// model.insert().text("Item A").icon(IconSource::from("icon-a"));
|
||||||
/// ```
|
/// ```
|
||||||
#[allow(clippy::must_use_candidate, clippy::return_self_not_must_use)]
|
#[allow(clippy::must_use_candidate, clippy::return_self_not_must_use)]
|
||||||
pub fn icon(self, icon: Icon) -> Self {
|
pub fn icon(self, icon: impl Into<Icon>) -> Self {
|
||||||
self.model.icon_set(self.id, icon);
|
self.model.icon_set(self.id, icon.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue