From 2e5fceb2b5c4fde141c8f5d96011c096c3640860 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 26 Jul 2020 14:44:37 +0200 Subject: [PATCH] identifiers: Simplify generated as_str implementations --- ruma-identifiers/src/macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruma-identifiers/src/macros.rs b/ruma-identifiers/src/macros.rs index 08c79a7d..a4badd35 100644 --- a/ruma-identifiers/src/macros.rs +++ b/ruma-identifiers/src/macros.rs @@ -30,7 +30,7 @@ macro_rules! common_impls { doc_concat! { #[doc = concat!("Creates a string slice from this `", stringify!($id), "`")] pub fn as_str(&self) -> &str { - self.full_id.as_ref() + &self.full_id } } }