Less confusing generics
This commit is contained in:
parent
f7f87104f6
commit
0e9375f058
2 changed files with 4 additions and 6 deletions
|
|
@ -47,10 +47,9 @@ impl LabeledItem {
|
|||
.send(LabeledItemMessage::Title(title.to_string()));
|
||||
}
|
||||
|
||||
pub fn set_description<S, O>(&self, description: O)
|
||||
pub fn set_description<'a, O>(&self, description: O)
|
||||
where
|
||||
S: ToString,
|
||||
O: Into<Option<S>>,
|
||||
O: Into<Option<&'a str>>,
|
||||
{
|
||||
let description = description.into();
|
||||
self._sender
|
||||
|
|
|
|||
|
|
@ -45,10 +45,9 @@ impl LabeledItem {
|
|||
self.inner().model.set_title(title)
|
||||
}
|
||||
|
||||
pub fn set_description<S, O>(&self, description: O)
|
||||
pub fn set_description<'a, O>(&self, description: O)
|
||||
where
|
||||
S: ToString,
|
||||
O: Into<Option<S>>,
|
||||
O: Into<Option<&'a str>>,
|
||||
{
|
||||
self.inner().model.set_description(description)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue