Skip to content

Commit 25da37d

Browse files
jf2048sdroege
authored andcommitted
glib: avoid copying in GStr::to_glib_none
1 parent 55e7db2 commit 25da37d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glib/src/gstring.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ impl<'a> ToGlibPtr<'a, *const c_char> for GStr {
345345

346346
#[inline]
347347
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self> {
348-
Stash(self.as_ptr(), PhantomData)
348+
Stash(self.as_ptr() as *const _, PhantomData)
349349
}
350350

351351
#[inline]
@@ -360,7 +360,7 @@ impl<'a> ToGlibPtr<'a, *mut c_char> for GStr {
360360

361361
#[inline]
362362
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self> {
363-
Stash(self.as_ptr() as *mut c_char, PhantomData)
363+
Stash(self.as_ptr() as *mut _, PhantomData)
364364
}
365365

366366
#[inline]

0 commit comments

Comments
 (0)