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()));
|
.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
|
where
|
||||||
S: ToString,
|
O: Into<Option<&'a str>>,
|
||||||
O: Into<Option<S>>,
|
|
||||||
{
|
{
|
||||||
let description = description.into();
|
let description = description.into();
|
||||||
self._sender
|
self._sender
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,9 @@ impl LabeledItem {
|
||||||
self.inner().model.set_title(title)
|
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
|
where
|
||||||
S: ToString,
|
O: Into<Option<&'a str>>,
|
||||||
O: Into<Option<S>>,
|
|
||||||
{
|
{
|
||||||
self.inner().model.set_description(description)
|
self.inner().model.set_description(description)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue