Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 19bdfa4

Browse files
committed
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.
1 parent b5b4df5 commit 19bdfa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/quark.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl Quark {
1717
}
1818

1919
#[allow(clippy::trivially_copy_pass_by_ref)]
20-
pub fn to_string(&self) -> &'static str {
20+
pub fn to_string<'a>(&self) -> &'a str {
2121
unsafe {
2222
CStr::from_ptr(glib_sys::g_quark_to_string(self.to_glib()))
2323
.to_str()

0 commit comments

Comments
 (0)