From 19bdfa49d12c8477a9c0c14847427ff55edcca02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 30 Apr 2020 10:25:27 +0300 Subject: [PATCH] Return a string of any lifetime from Quark::to_string() Specifying it as 'static is very specific and instead we can let the caller chose any lifetime they want here. --- src/quark.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quark.rs b/src/quark.rs index b3597b08..3718aab8 100644 --- a/src/quark.rs +++ b/src/quark.rs @@ -17,7 +17,7 @@ impl Quark { } #[allow(clippy::trivially_copy_pass_by_ref)] - pub fn to_string(&self) -> &'static str { + pub fn to_string<'a>(&self) -> &'a str { unsafe { CStr::from_ptr(glib_sys::g_quark_to_string(self.to_glib())) .to_str()