File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -341,12 +341,11 @@ impl crate::value::ToValueOptional for GStr {
341341
342342#[ doc( hidden) ]
343343impl < ' a > ToGlibPtr < ' a , * const c_char > for GStr {
344- type Storage = GString ;
344+ type Storage = PhantomData < & ' a Self > ;
345345
346346 #[ inline]
347347 fn to_glib_none ( & ' a self ) -> Stash < ' a , * const c_char , Self > {
348- let tmp = self . to_owned ( ) ;
349- Stash ( self . as_ptr ( ) , tmp)
348+ Stash ( self . as_ptr ( ) , PhantomData )
350349 }
351350
352351 #[ inline]
@@ -357,12 +356,11 @@ impl<'a> ToGlibPtr<'a, *const c_char> for GStr {
357356
358357#[ doc( hidden) ]
359358impl < ' a > ToGlibPtr < ' a , * mut c_char > for GStr {
360- type Storage = GString ;
359+ type Storage = PhantomData < & ' a Self > ;
361360
362361 #[ inline]
363362 fn to_glib_none ( & ' a self ) -> Stash < ' a , * mut c_char , Self > {
364- let tmp = self . to_owned ( ) ;
365- Stash ( tmp. as_ptr ( ) as * mut c_char , tmp)
363+ Stash ( self . as_ptr ( ) as * mut c_char , PhantomData )
366364 }
367365
368366 #[ inline]
You can’t perform that action at this time.
0 commit comments