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 {
341
341
342
342
#[ doc( hidden) ]
343
343
impl < ' a > ToGlibPtr < ' a , * const c_char > for GStr {
344
- type Storage = GString ;
344
+ type Storage = PhantomData < & ' a Self > ;
345
345
346
346
#[ inline]
347
347
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 )
350
349
}
351
350
352
351
#[ inline]
@@ -357,12 +356,11 @@ impl<'a> ToGlibPtr<'a, *const c_char> for GStr {
357
356
358
357
#[ doc( hidden) ]
359
358
impl < ' a > ToGlibPtr < ' a , * mut c_char > for GStr {
360
- type Storage = GString ;
359
+ type Storage = PhantomData < & ' a Self > ;
361
360
362
361
#[ inline]
363
362
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 )
366
364
}
367
365
368
366
#[ inline]
You can’t perform that action at this time.
0 commit comments