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

Don't pass an owned string to g_quark_from_static_string() #590

Merged
merged 1 commit into from
Feb 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/quark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct Quark(glib_sys::GQuark);

impl Quark {
pub fn from_string(s: &str) -> Quark {
unsafe { from_glib(glib_sys::g_quark_from_static_string(s.to_glib_full())) }
unsafe { from_glib(glib_sys::g_quark_from_string(s.to_glib_none().0)) }
}

#[allow(clippy::trivially_copy_pass_by_ref)]
Expand Down