From 32bfa84551e6f5577a0e0bc9a046507ed1e7112a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 28 May 2017 16:33:43 +0100 Subject: [PATCH] =?UTF-8?q?presence:=20Rename=20Available=20to=20None,=20s?= =?UTF-8?q?ince=20that=E2=80=99s=20what=20it=20is.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/presence.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/presence.rs b/src/presence.rs index 4d0391f..1d4ff35 100644 --- a/src/presence.rs +++ b/src/presence.rs @@ -117,7 +117,7 @@ impl Into for PresencePayload { pub enum PresenceType { /// This value is not an acceptable 'type' attribute, it is only used /// internally to signal the absence of 'type'. - Available, + None, Error, Probe, Subscribe, @@ -129,7 +129,7 @@ pub enum PresenceType { impl Default for PresenceType { fn default() -> PresenceType { - PresenceType::Available + PresenceType::None } } @@ -154,7 +154,7 @@ impl FromStr for PresenceType { impl IntoAttributeValue for PresenceType { fn into_attribute_value(self) -> Option { Some(match self { - PresenceType::Available => return None, + PresenceType::None => return None, PresenceType::Error => "error", PresenceType::Probe => "probe", @@ -283,7 +283,7 @@ mod tests { assert_eq!(presence.from, None); assert_eq!(presence.to, None); assert_eq!(presence.id, None); - assert_eq!(presence.type_, PresenceType::Available); + assert_eq!(presence.type_, PresenceType::None); assert!(presence.payloads.is_empty()); }