mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
presence: Simplify Presence::set_status with Into<String>.
This commit is contained in:
parent
dd80f55c5f
commit
ab28824b1a
1 changed files with 5 additions and 2 deletions
|
@ -245,8 +245,11 @@ impl Presence {
|
|||
}
|
||||
|
||||
/// Set the availability information of this presence.
|
||||
pub fn set_status(&mut self, lang: Lang, status: Status) {
|
||||
self.statuses.insert(lang, status);
|
||||
pub fn set_status<L, S>(&mut self, lang: L, status: S)
|
||||
where L: Into<Lang>,
|
||||
S: Into<Status>,
|
||||
{
|
||||
self.statuses.insert(lang.into(), status.into());
|
||||
}
|
||||
|
||||
/// Add a payload to this presence.
|
||||
|
|
Loading…
Reference in a new issue