@@ -50,11 +50,9 @@ pub fn assertion_message_cmpstr(domain: &str, file: &str, line: i32, func: &str,
50
50
51
51
pub fn assertion_message_expr < ' a , ' b , P : Into < Option < & ' a str > > , Q : Into < Option < & ' b str > > > ( domain : P , file : & str , line : i32 , func : & str , expr : Q ) {
52
52
let domain = domain. into ( ) ;
53
- let domain = domain. to_glib_none ( ) ;
54
53
let expr = expr. into ( ) ;
55
- let expr = expr. to_glib_none ( ) ;
56
54
unsafe {
57
- ffi:: g_assertion_message_expr ( domain. 0 , file. to_glib_none ( ) . 0 , line, func. to_glib_none ( ) . 0 , expr. 0 ) ;
55
+ ffi:: g_assertion_message_expr ( domain. to_glib_none ( ) . 0 , file. to_glib_none ( ) . 0 , line, func. to_glib_none ( ) . 0 , expr. to_glib_none ( ) . 0 ) ;
58
56
}
59
57
}
60
58
@@ -302,17 +300,15 @@ pub fn compute_hmac_for_string(digest_type: ChecksumType, key: &[u8], str: &str)
302
300
303
301
pub fn dcgettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgid : & str , category : i32 ) -> Option < GString > {
304
302
let domain = domain. into ( ) ;
305
- let domain = domain. to_glib_none ( ) ;
306
303
unsafe {
307
- from_glib_none ( ffi:: g_dcgettext ( domain. 0 , msgid. to_glib_none ( ) . 0 , category) )
304
+ from_glib_none ( ffi:: g_dcgettext ( domain. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 , category) )
308
305
}
309
306
}
310
307
311
308
pub fn dgettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgid : & str ) -> Option < GString > {
312
309
let domain = domain. into ( ) ;
313
- let domain = domain. to_glib_none ( ) ;
314
310
unsafe {
315
- from_glib_none ( ffi:: g_dgettext ( domain. 0 , msgid. to_glib_none ( ) . 0 ) )
311
+ from_glib_none ( ffi:: g_dgettext ( domain. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 ) )
316
312
}
317
313
}
318
314
@@ -326,9 +322,8 @@ pub fn dgettext<'a, P: Into<Option<&'a str>>>(domain: P, msgid: &str) -> Option<
326
322
327
323
pub fn dngettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgid : & str , msgid_plural : & str , n : libc:: c_ulong ) -> Option < GString > {
328
324
let domain = domain. into ( ) ;
329
- let domain = domain. to_glib_none ( ) ;
330
325
unsafe {
331
- from_glib_none ( ffi:: g_dngettext ( domain. 0 , msgid. to_glib_none ( ) . 0 , msgid_plural. to_glib_none ( ) . 0 , n) )
326
+ from_glib_none ( ffi:: g_dngettext ( domain. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 , msgid_plural. to_glib_none ( ) . 0 , n) )
332
327
}
333
328
}
334
329
@@ -342,17 +337,15 @@ pub fn dngettext<'a, P: Into<Option<&'a str>>>(domain: P, msgid: &str, msgid_plu
342
337
343
338
pub fn dpgettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgctxtid : & str , msgidoffset : usize ) -> Option < GString > {
344
339
let domain = domain. into ( ) ;
345
- let domain = domain. to_glib_none ( ) ;
346
340
unsafe {
347
- from_glib_none ( ffi:: g_dpgettext ( domain. 0 , msgctxtid. to_glib_none ( ) . 0 , msgidoffset) )
341
+ from_glib_none ( ffi:: g_dpgettext ( domain. to_glib_none ( ) . 0 , msgctxtid. to_glib_none ( ) . 0 , msgidoffset) )
348
342
}
349
343
}
350
344
351
345
pub fn dpgettext2 < ' a , P : Into < Option < & ' a str > > > ( domain : P , context : & str , msgid : & str ) -> Option < GString > {
352
346
let domain = domain. into ( ) ;
353
- let domain = domain. to_glib_none ( ) ;
354
347
unsafe {
355
- from_glib_none ( ffi:: g_dpgettext2 ( domain. 0 , context. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 ) )
348
+ from_glib_none ( ffi:: g_dpgettext2 ( domain. to_glib_none ( ) . 0 , context. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 ) )
356
349
}
357
350
}
358
351
@@ -955,11 +948,9 @@ pub fn reload_user_special_dirs_cache() {
955
948
956
949
pub fn return_if_fail_warning < ' a , ' b , P : Into < Option < & ' a str > > , Q : Into < Option < & ' b str > > > ( log_domain : P , pretty_function : & str , expression : Q ) {
957
950
let log_domain = log_domain. into ( ) ;
958
- let log_domain = log_domain. to_glib_none ( ) ;
959
951
let expression = expression. into ( ) ;
960
- let expression = expression. to_glib_none ( ) ;
961
952
unsafe {
962
- ffi:: g_return_if_fail_warning ( log_domain. 0 , pretty_function. to_glib_none ( ) . 0 , expression. 0 ) ;
953
+ ffi:: g_return_if_fail_warning ( log_domain. to_glib_none ( ) . 0 , pretty_function. to_glib_none ( ) . 0 , expression. to_glib_none ( ) . 0 ) ;
963
954
}
964
955
}
965
956
@@ -1180,9 +1171,8 @@ pub fn test_failed() -> bool {
1180
1171
#[ cfg( any( feature = "v2_38" , feature = "dox" ) ) ]
1181
1172
pub fn test_incomplete < ' a , P : Into < Option < & ' a str > > > ( msg : P ) {
1182
1173
let msg = msg. into ( ) ;
1183
- let msg = msg. to_glib_none ( ) ;
1184
1174
unsafe {
1185
- ffi:: g_test_incomplete ( msg. 0 ) ;
1175
+ ffi:: g_test_incomplete ( msg. to_glib_none ( ) . 0 ) ;
1186
1176
}
1187
1177
}
1188
1178
@@ -1262,9 +1252,8 @@ pub fn test_set_nonfatal_assertions() {
1262
1252
#[ cfg( any( feature = "v2_38" , feature = "dox" ) ) ]
1263
1253
pub fn test_skip < ' a , P : Into < Option < & ' a str > > > ( msg : P ) {
1264
1254
let msg = msg. into ( ) ;
1265
- let msg = msg. to_glib_none ( ) ;
1266
1255
unsafe {
1267
- ffi:: g_test_skip ( msg. 0 ) ;
1256
+ ffi:: g_test_skip ( msg. to_glib_none ( ) . 0 ) ;
1268
1257
}
1269
1258
}
1270
1259
@@ -1386,9 +1375,8 @@ pub fn unlink<P: AsRef<std::path::Path>>(filename: P) -> i32 {
1386
1375
1387
1376
pub fn uri_escape_string < ' a , P : Into < Option < & ' a str > > > ( unescaped : & str , reserved_chars_allowed : P , allow_utf8 : bool ) -> Option < GString > {
1388
1377
let reserved_chars_allowed = reserved_chars_allowed. into ( ) ;
1389
- let reserved_chars_allowed = reserved_chars_allowed. to_glib_none ( ) ;
1390
1378
unsafe {
1391
- from_glib_full ( ffi:: g_uri_escape_string ( unescaped. to_glib_none ( ) . 0 , reserved_chars_allowed. 0 , allow_utf8. to_glib ( ) ) )
1379
+ from_glib_full ( ffi:: g_uri_escape_string ( unescaped. to_glib_none ( ) . 0 , reserved_chars_allowed. to_glib_none ( ) . 0 , allow_utf8. to_glib ( ) ) )
1392
1380
}
1393
1381
}
1394
1382
@@ -1406,21 +1394,17 @@ pub fn uri_parse_scheme(uri: &str) -> Option<GString> {
1406
1394
1407
1395
pub fn uri_unescape_segment < ' a , ' b , ' c , P : Into < Option < & ' a str > > , Q : Into < Option < & ' b str > > , R : Into < Option < & ' c str > > > ( escaped_string : P , escaped_string_end : Q , illegal_characters : R ) -> Option < GString > {
1408
1396
let escaped_string = escaped_string. into ( ) ;
1409
- let escaped_string = escaped_string. to_glib_none ( ) ;
1410
1397
let escaped_string_end = escaped_string_end. into ( ) ;
1411
- let escaped_string_end = escaped_string_end. to_glib_none ( ) ;
1412
1398
let illegal_characters = illegal_characters. into ( ) ;
1413
- let illegal_characters = illegal_characters. to_glib_none ( ) ;
1414
1399
unsafe {
1415
- from_glib_full ( ffi:: g_uri_unescape_segment ( escaped_string. 0 , escaped_string_end. 0 , illegal_characters. 0 ) )
1400
+ from_glib_full ( ffi:: g_uri_unescape_segment ( escaped_string. to_glib_none ( ) . 0 , escaped_string_end. to_glib_none ( ) . 0 , illegal_characters. to_glib_none ( ) . 0 ) )
1416
1401
}
1417
1402
}
1418
1403
1419
1404
pub fn uri_unescape_string < ' a , P : Into < Option < & ' a str > > > ( escaped_string : & str , illegal_characters : P ) -> Option < GString > {
1420
1405
let illegal_characters = illegal_characters. into ( ) ;
1421
- let illegal_characters = illegal_characters. to_glib_none ( ) ;
1422
1406
unsafe {
1423
- from_glib_full ( ffi:: g_uri_unescape_string ( escaped_string. to_glib_none ( ) . 0 , illegal_characters. 0 ) )
1407
+ from_glib_full ( ffi:: g_uri_unescape_string ( escaped_string. to_glib_none ( ) . 0 , illegal_characters. to_glib_none ( ) . 0 ) )
1424
1408
}
1425
1409
}
1426
1410
@@ -1472,10 +1456,8 @@ pub fn variant_get_gtype() -> types::Type {
1472
1456
1473
1457
pub fn warn_message < ' a , ' b , P : Into < Option < & ' a str > > , Q : Into < Option < & ' b str > > > ( domain : P , file : & str , line : i32 , func : & str , warnexpr : Q ) {
1474
1458
let domain = domain. into ( ) ;
1475
- let domain = domain. to_glib_none ( ) ;
1476
1459
let warnexpr = warnexpr. into ( ) ;
1477
- let warnexpr = warnexpr. to_glib_none ( ) ;
1478
1460
unsafe {
1479
- ffi:: g_warn_message ( domain. 0 , file. to_glib_none ( ) . 0 , line, func. to_glib_none ( ) . 0 , warnexpr. 0 ) ;
1461
+ ffi:: g_warn_message ( domain. to_glib_none ( ) . 0 , file. to_glib_none ( ) . 0 , line, func. to_glib_none ( ) . 0 , warnexpr. to_glib_none ( ) . 0 ) ;
1480
1462
}
1481
1463
}
0 commit comments