@@ -47,9 +47,7 @@ pub fn assertion_message_cmpstr(domain: &str, file: &str, line: i32, func: &str,
47
47
}
48
48
}
49
49
50
- 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 ) {
51
- let domain = domain. into ( ) ;
52
- let expr = expr. into ( ) ;
50
+ pub fn assertion_message_expr ( domain : Option < & str > , file : & str , line : i32 , func : & str , expr : Option < & str > ) {
53
51
unsafe {
54
52
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 ) ;
55
53
}
@@ -280,15 +278,13 @@ pub fn compute_hmac_for_string(digest_type: ChecksumType, key: &[u8], str: &str)
280
278
// unsafe { TODO: call ffi::g_dataset_id_set_data_full() }
281
279
//}
282
280
283
- pub fn dcgettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgid : & str , category : i32 ) -> Option < GString > {
284
- let domain = domain. into ( ) ;
281
+ pub fn dcgettext ( domain : Option < & str > , msgid : & str , category : i32 ) -> Option < GString > {
285
282
unsafe {
286
283
from_glib_none ( ffi:: g_dcgettext ( domain. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 , category) )
287
284
}
288
285
}
289
286
290
- pub fn dgettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgid : & str ) -> Option < GString > {
291
- let domain = domain. into ( ) ;
287
+ pub fn dgettext ( domain : Option < & str > , msgid : & str ) -> Option < GString > {
292
288
unsafe {
293
289
from_glib_none ( ffi:: g_dgettext ( domain. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 ) )
294
290
}
@@ -302,8 +298,7 @@ pub fn dgettext<'a, P: Into<Option<&'a str>>>(domain: P, msgid: &str) -> Option<
302
298
// unsafe { TODO: call ffi::g_direct_hash() }
303
299
//}
304
300
305
- pub fn dngettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgid : & str , msgid_plural : & str , n : libc:: c_ulong ) -> Option < GString > {
306
- let domain = domain. into ( ) ;
301
+ pub fn dngettext ( domain : Option < & str > , msgid : & str , msgid_plural : & str , n : libc:: c_ulong ) -> Option < GString > {
307
302
unsafe {
308
303
from_glib_none ( ffi:: g_dngettext ( domain. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 , msgid_plural. to_glib_none ( ) . 0 , n) )
309
304
}
@@ -317,15 +312,13 @@ pub fn dngettext<'a, P: Into<Option<&'a str>>>(domain: P, msgid: &str, msgid_plu
317
312
// unsafe { TODO: call ffi::g_double_hash() }
318
313
//}
319
314
320
- pub fn dpgettext < ' a , P : Into < Option < & ' a str > > > ( domain : P , msgctxtid : & str , msgidoffset : usize ) -> Option < GString > {
321
- let domain = domain. into ( ) ;
315
+ pub fn dpgettext ( domain : Option < & str > , msgctxtid : & str , msgidoffset : usize ) -> Option < GString > {
322
316
unsafe {
323
317
from_glib_none ( ffi:: g_dpgettext ( domain. to_glib_none ( ) . 0 , msgctxtid. to_glib_none ( ) . 0 , msgidoffset) )
324
318
}
325
319
}
326
320
327
- pub fn dpgettext2 < ' a , P : Into < Option < & ' a str > > > ( domain : P , context : & str , msgid : & str ) -> Option < GString > {
328
- let domain = domain. into ( ) ;
321
+ pub fn dpgettext2 ( domain : Option < & str > , context : & str , msgid : & str ) -> Option < GString > {
329
322
unsafe {
330
323
from_glib_none ( ffi:: g_dpgettext2 ( domain. to_glib_none ( ) . 0 , context. to_glib_none ( ) . 0 , msgid. to_glib_none ( ) . 0 ) )
331
324
}
@@ -596,11 +589,11 @@ pub fn listenv() -> Vec<std::ffi::OsString> {
596
589
}
597
590
}
598
591
599
- //pub fn log<'a, P: Into< Option<&'a str>>>(log_domain: P , log_level: /*Ignored*/LogLevelFlags, format: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
592
+ //pub fn log(log_domain: Option<&str>, log_level: /*Ignored*/LogLevelFlags, format: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
600
593
// unsafe { TODO: call ffi::g_log() }
601
594
//}
602
595
603
- //pub fn log_default_handler<'a, 'b, P: Into< Option<&'a str>>, Q: Into<Option<&'b str>>>(log_domain: P, log_level: /*Ignored*/LogLevelFlags, message: Q , unused_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
596
+ //pub fn log_default_handler(log_domain: Option<&str>, log_level: /*Ignored*/LogLevelFlags, message: Option<&str> , unused_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
604
597
// unsafe { TODO: call ffi::g_log_default_handler() }
605
598
//}
606
599
@@ -622,12 +615,12 @@ pub fn log_remove_handler(log_domain: &str, handler_id: u32) {
622
615
// unsafe { TODO: call ffi::g_log_set_fatal_mask() }
623
616
//}
624
617
625
- //pub fn log_set_handler<'a, P: Into< Option<&'a str>>>(log_domain: P , log_levels: /*Ignored*/LogLevelFlags, log_func: /*Unimplemented*/Fn(&str, /*Ignored*/LogLevelFlags, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
618
+ //pub fn log_set_handler(log_domain: Option<&str>, log_levels: /*Ignored*/LogLevelFlags, log_func: /*Unimplemented*/Fn(&str, /*Ignored*/LogLevelFlags, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
626
619
// unsafe { TODO: call ffi::g_log_set_handler() }
627
620
//}
628
621
629
622
//#[cfg(any(feature = "v2_46", feature = "dox"))]
630
- //pub fn log_set_handler_full<'a, P: Into< Option<&'a str>>>(log_domain: P , log_levels: /*Ignored*/LogLevelFlags, log_func: /*Unimplemented*/Fn(&str, /*Ignored*/LogLevelFlags, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
623
+ //pub fn log_set_handler_full(log_domain: Option<&str>, log_levels: /*Ignored*/LogLevelFlags, log_func: /*Unimplemented*/Fn(&str, /*Ignored*/LogLevelFlags, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
631
624
// unsafe { TODO: call ffi::g_log_set_handler_full() }
632
625
//}
633
626
@@ -651,7 +644,7 @@ pub fn log_remove_handler(log_domain: &str, handler_id: u32) {
651
644
//}
652
645
653
646
//#[cfg(any(feature = "v2_50", feature = "dox"))]
654
- //pub fn log_variant<'a, P: Into< Option<&'a str>>>(log_domain: P , log_level: /*Ignored*/LogLevelFlags, fields: &Variant) {
647
+ //pub fn log_variant(log_domain: Option<&str>, log_level: /*Ignored*/LogLevelFlags, fields: &Variant) {
655
648
// unsafe { TODO: call ffi::g_log_variant() }
656
649
//}
657
650
@@ -675,7 +668,7 @@ pub fn log_remove_handler(log_domain: &str, handler_id: u32) {
675
668
// unsafe { TODO: call ffi::g_log_writer_standard_streams() }
676
669
//}
677
670
678
- //pub fn logv<'a, P: Into< Option<&'a str>>>(log_domain: P , log_level: /*Ignored*/LogLevelFlags, format: &str, args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
671
+ //pub fn logv(log_domain: Option<&str>, log_level: /*Ignored*/LogLevelFlags, format: &str, args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
679
672
// unsafe { TODO: call ffi::g_logv() }
680
673
//}
681
674
@@ -789,7 +782,7 @@ pub fn on_error_stack_trace(prg_name: &str) {
789
782
}
790
783
}
791
784
792
- //pub fn parse_debug_string<'a, P: Into< Option<&'a str>>>(string: P , keys: /*Ignored*/&[&DebugKey]) -> u32 {
785
+ //pub fn parse_debug_string(string: Option<&str>, keys: /*Ignored*/&[&DebugKey]) -> u32 {
793
786
// unsafe { TODO: call ffi::g_parse_debug_string() }
794
787
//}
795
788
@@ -817,7 +810,7 @@ pub fn path_skip_root<P: AsRef<std::path::Path>>(file_name: P) -> Option<std::pa
817
810
}
818
811
}
819
812
820
- //pub fn pattern_match<'a, P: Into<Option<&'a str>>> (pspec: /*Ignored*/&mut PatternSpec, string_length: u32, string: &str, string_reversed: P ) -> bool {
813
+ //pub fn pattern_match(pspec: /*Ignored*/&mut PatternSpec, string_length: u32, string: &str, string_reversed: Option<&str> ) -> bool {
821
814
// unsafe { TODO: call ffi::g_pattern_match() }
822
815
//}
823
816
@@ -847,7 +840,7 @@ pub fn pattern_match_simple(pattern: &str, string: &str) -> bool {
847
840
// unsafe { TODO: call ffi::g_poll() }
848
841
//}
849
842
850
- //pub fn prefix_error<'a, P: Into< Option<&'a Error>>>(err: P , format: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
843
+ //pub fn prefix_error(err: /*Unimplemented*/ Option<Error>, format: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
851
844
// unsafe { TODO: call ffi::g_prefix_error() }
852
845
//}
853
846
@@ -919,9 +912,7 @@ pub fn reload_user_special_dirs_cache() {
919
912
}
920
913
}
921
914
922
- 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 ) {
923
- let log_domain = log_domain. into ( ) ;
924
- let expression = expression. into ( ) ;
915
+ pub fn return_if_fail_warning ( log_domain : Option < & str > , pretty_function : & str , expression : Option < & str > ) {
925
916
unsafe {
926
917
ffi:: g_return_if_fail_warning ( log_domain. to_glib_none ( ) . 0 , pretty_function. to_glib_none ( ) . 0 , expression. to_glib_none ( ) . 0 ) ;
927
918
}
@@ -1111,7 +1102,7 @@ pub fn test_bug_base(uri_pattern: &str) {
1111
1102
// unsafe { TODO: call ffi::g_test_create_suite() }
1112
1103
//}
1113
1104
1114
- //pub fn test_expect_message<'a, P: Into< Option<&'a str>>>(log_domain: P , log_level: /*Ignored*/LogLevelFlags, pattern: &str) {
1105
+ //pub fn test_expect_message(log_domain: Option<&str>, log_level: /*Ignored*/LogLevelFlags, pattern: &str) {
1115
1106
// unsafe { TODO: call ffi::g_test_expect_message() }
1116
1107
//}
1117
1108
@@ -1139,8 +1130,7 @@ pub fn test_failed() -> bool {
1139
1130
// unsafe { TODO: call ffi::g_test_get_root() }
1140
1131
//}
1141
1132
1142
- pub fn test_incomplete < ' a , P : Into < Option < & ' a str > > > ( msg : P ) {
1143
- let msg = msg. into ( ) ;
1133
+ pub fn test_incomplete ( msg : Option < & str > ) {
1144
1134
unsafe {
1145
1135
ffi:: g_test_incomplete ( msg. to_glib_none ( ) . 0 ) ;
1146
1136
}
@@ -1218,8 +1208,7 @@ pub fn test_set_nonfatal_assertions() {
1218
1208
}
1219
1209
}
1220
1210
1221
- pub fn test_skip < ' a , P : Into < Option < & ' a str > > > ( msg : P ) {
1222
- let msg = msg. into ( ) ;
1211
+ pub fn test_skip ( msg : Option < & str > ) {
1223
1212
unsafe {
1224
1213
ffi:: g_test_skip ( msg. to_glib_none ( ) . 0 ) ;
1225
1214
}
@@ -1271,7 +1260,7 @@ pub fn test_trap_reached_timeout() -> bool {
1271
1260
}
1272
1261
}
1273
1262
1274
- //pub fn test_trap_subprocess<'a, P: Into< Option<&'a str>>>(test_path: P , usec_timeout: u64, test_flags: /*Ignored*/TestSubprocessFlags) {
1263
+ //pub fn test_trap_subprocess(test_path: Option<&str>, usec_timeout: u64, test_flags: /*Ignored*/TestSubprocessFlags) {
1275
1264
// unsafe { TODO: call ffi::g_test_trap_subprocess() }
1276
1265
//}
1277
1266
@@ -1313,8 +1302,7 @@ pub fn unlink<P: AsRef<std::path::Path>>(filename: P) -> i32 {
1313
1302
}
1314
1303
}
1315
1304
1316
- pub fn uri_escape_string < ' a , P : Into < Option < & ' a str > > > ( unescaped : & str , reserved_chars_allowed : P , allow_utf8 : bool ) -> Option < GString > {
1317
- let reserved_chars_allowed = reserved_chars_allowed. into ( ) ;
1305
+ pub fn uri_escape_string ( unescaped : & str , reserved_chars_allowed : Option < & str > , allow_utf8 : bool ) -> Option < GString > {
1318
1306
unsafe {
1319
1307
from_glib_full ( ffi:: g_uri_escape_string ( unescaped. to_glib_none ( ) . 0 , reserved_chars_allowed. to_glib_none ( ) . 0 , allow_utf8. to_glib ( ) ) )
1320
1308
}
@@ -1332,17 +1320,13 @@ pub fn uri_parse_scheme(uri: &str) -> Option<GString> {
1332
1320
}
1333
1321
}
1334
1322
1335
- 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 > {
1336
- let escaped_string = escaped_string. into ( ) ;
1337
- let escaped_string_end = escaped_string_end. into ( ) ;
1338
- let illegal_characters = illegal_characters. into ( ) ;
1323
+ pub fn uri_unescape_segment ( escaped_string : Option < & str > , escaped_string_end : Option < & str > , illegal_characters : Option < & str > ) -> Option < GString > {
1339
1324
unsafe {
1340
1325
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 ) )
1341
1326
}
1342
1327
}
1343
1328
1344
- pub fn uri_unescape_string < ' a , P : Into < Option < & ' a str > > > ( escaped_string : & str , illegal_characters : P ) -> Option < GString > {
1345
- let illegal_characters = illegal_characters. into ( ) ;
1329
+ pub fn uri_unescape_string ( escaped_string : & str , illegal_characters : Option < & str > ) -> Option < GString > {
1346
1330
unsafe {
1347
1331
from_glib_full ( ffi:: g_uri_unescape_string ( escaped_string. to_glib_none ( ) . 0 , illegal_characters. to_glib_none ( ) . 0 ) )
1348
1332
}
@@ -1394,9 +1378,7 @@ pub fn variant_get_gtype() -> types::Type {
1394
1378
// unsafe { TODO: call ffi::g_vsprintf() }
1395
1379
//}
1396
1380
1397
- 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 ) {
1398
- let domain = domain. into ( ) ;
1399
- let warnexpr = warnexpr. into ( ) ;
1381
+ pub fn warn_message ( domain : Option < & str > , file : & str , line : i32 , func : & str , warnexpr : Option < & str > ) {
1400
1382
unsafe {
1401
1383
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 ) ;
1402
1384
}
0 commit comments