Make the set_description API a bit nicer.

This commit is contained in:
Lucy 2022-03-01 15:32:52 -05:00
parent feee2bacc3
commit f7f87104f6
No known key found for this signature in database
GPG key ID: EBC517FAD666BBF1
2 changed files with 6 additions and 3 deletions

View file

@ -45,9 +45,10 @@ impl LabeledItem {
self.inner().model.set_title(title)
}
pub fn set_description<S>(&self, description: Option<S>)
pub fn set_description<S, O>(&self, description: O)
where
S: ToString,
O: Into<Option<S>>,
{
self.inner().model.set_description(description)
}