From 44186980b2124b5a3066f6aa44ad509eec81362a Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Tue, 28 May 2024 14:43:53 +0200 Subject: [PATCH] fix: Relax lifetime bounds in endpoint `as_str` methods (#1058) --- commons/zenoh-protocol/src/core/endpoint.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commons/zenoh-protocol/src/core/endpoint.rs b/commons/zenoh-protocol/src/core/endpoint.rs index 5e921345e4..026fde3097 100644 --- a/commons/zenoh-protocol/src/core/endpoint.rs +++ b/commons/zenoh-protocol/src/core/endpoint.rs @@ -141,7 +141,7 @@ impl Parameters { pub struct Protocol<'a>(pub(super) &'a str); impl<'a> Protocol<'a> { - pub fn as_str(&'a self) -> &'a str { + pub fn as_str(&self) -> &'a str { self.0 } } @@ -205,7 +205,7 @@ impl fmt::Debug for ProtocolMut<'_> { pub struct Address<'a>(pub(super) &'a str); impl<'a> Address<'a> { - pub fn as_str(&'a self) -> &'a str { + pub fn as_str(&self) -> &'a str { self.0 } } @@ -269,7 +269,7 @@ impl fmt::Debug for AddressMut<'_> { pub struct Metadata<'a>(pub(super) &'a str); impl<'a> Metadata<'a> { - pub fn as_str(&'a self) -> &'a str { + pub fn as_str(&self) -> &'a str { self.0 } @@ -386,7 +386,7 @@ impl fmt::Debug for MetadataMut<'_> { pub struct Config<'a>(pub(super) &'a str); impl<'a> Config<'a> { - pub fn as_str(&'a self) -> &'a str { + pub fn as_str(&self) -> &'a str { self.0 }