Skip to content

Commit 6da3b98

Browse files
committed
glib: Have GString deref to GStr
1 parent c0f177b commit 6da3b98

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gio/src/dbus_proxy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ impl<O: IsA<DBusProxy>> DBusProxyExtManual for O {
4545
let f: &F = &*(f as *const F);
4646
f(
4747
DBusProxy::from_glib_borrow(this).unsafe_cast_ref(),
48-
Option::<glib::GString>::from_glib_borrow(sender_name)
48+
(*Option::<glib::GString>::from_glib_borrow(sender_name))
4949
.as_ref()
50-
.as_deref(),
50+
.map(|s| s.as_str()),
5151
&glib::GString::from_glib_borrow(signal_name),
5252
&from_glib_borrow(parameters),
5353
)

glib/src/gstring.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,10 @@ impl AsRef<[u8]> for GString {
617617
}
618618

619619
impl Deref for GString {
620-
type Target = str;
620+
type Target = GStr;
621621

622-
fn deref(&self) -> &str {
623-
self.as_str()
622+
fn deref(&self) -> &GStr {
623+
self.as_gstr()
624624
}
625625
}
626626

0 commit comments

Comments
 (0)