From 6fc3a46bd2d4a31148ac84196e47cc9fe068da83 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 6 Aug 2023 10:08:24 +0200 Subject: [PATCH] jid: Fix tests --- jid/src/lib.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/jid/src/lib.rs b/jid/src/lib.rs index 2369322..92f5a52 100644 --- a/jid/src/lib.rs +++ b/jid/src/lib.rs @@ -383,9 +383,9 @@ impl FullJid { /// # fn main() -> Result<(), Error> { /// let jid = FullJid::new("node@domain/resource")?; /// - /// assert_eq!(jid.node(), Some("node")); - /// assert_eq!(jid.domain(), "domain"); - /// assert_eq!(jid.resource(), "resource"); + /// assert_eq!(jid.node_str(), Some("node")); + /// assert_eq!(jid.domain_str(), "domain"); + /// assert_eq!(jid.resource_str(), "resource"); /// # Ok(()) /// # } /// ``` @@ -510,8 +510,8 @@ impl BareJid { /// # fn main() -> Result<(), Error> { /// let jid = BareJid::new("node@domain")?; /// - /// assert_eq!(jid.node(), Some("node")); - /// assert_eq!(jid.domain(), "domain"); + /// assert_eq!(jid.node_str(), Some("node")); + /// assert_eq!(jid.domain_str(), "domain"); /// # Ok(()) /// # } /// ``` @@ -584,9 +584,9 @@ impl BareJid { /// let bare = BareJid::new("node@domain").unwrap(); /// let full = bare.with_resource(&resource); /// - /// assert_eq!(full.node(), Some("node")); - /// assert_eq!(full.domain(), "domain"); - /// assert_eq!(full.resource(), "resource"); + /// assert_eq!(full.node_str(), Some("node")); + /// assert_eq!(full.domain_str(), "domain"); + /// assert_eq!(full.resource_str(), "resource"); /// ``` pub fn with_resource(&self, resource: &ResourcePart) -> FullJid { let slash = NonZeroU16::new(self.inner.normalized.len() as u16); @@ -611,9 +611,9 @@ impl BareJid { /// let bare = BareJid::new("node@domain").unwrap(); /// let full = bare.with_resource_str("resource").unwrap(); /// - /// assert_eq!(full.node(), Some("node")); - /// assert_eq!(full.domain(), "domain"); - /// assert_eq!(full.resource(), "resource"); + /// assert_eq!(full.node_str(), Some("node")); + /// assert_eq!(full.domain_str(), "domain"); + /// assert_eq!(full.resource_str(), "resource"); /// ``` pub fn with_resource_str(&self, resource: &str) -> Result { let resource = ResourcePart::new(resource)?;