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 @@ -316,12 +316,11 @@ impl crate::value::ToValueOptional for GStr {
316
316
317
317
#[ doc( hidden) ]
318
318
impl < ' a > ToGlibPtr < ' a , * const c_char > for GStr {
319
- type Storage = GString ;
319
+ type Storage = & ' a Self ;
320
320
321
321
#[ inline]
322
322
fn to_glib_none ( & ' a self ) -> Stash < ' a , * const c_char , Self > {
323
- let tmp = self . to_owned ( ) ;
324
- Stash ( self . as_ptr ( ) , tmp)
323
+ Stash ( self . as_ptr ( ) as * const _ , self )
325
324
}
326
325
327
326
#[ inline]
@@ -332,12 +331,11 @@ impl<'a> ToGlibPtr<'a, *const c_char> for GStr {
332
331
333
332
#[ doc( hidden) ]
334
333
impl < ' a > ToGlibPtr < ' a , * mut c_char > for GStr {
335
- type Storage = GString ;
334
+ type Storage = & ' a Self ;
336
335
337
336
#[ inline]
338
337
fn to_glib_none ( & ' a self ) -> Stash < ' a , * mut c_char , Self > {
339
- let tmp = self . to_owned ( ) ;
340
- Stash ( tmp. as_ptr ( ) as * mut c_char , tmp)
338
+ Stash ( self . as_ptr ( ) as * mut _ , self )
341
339
}
342
340
343
341
#[ inline]
You can’t perform that action at this time.
0 commit comments