Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 1e5b617

Browse files
regen
1 parent ba003a1 commit 1e5b617

File tree

6 files changed

+34
-63
lines changed

6 files changed

+34
-63
lines changed

src/auto/date_time.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ impl DateTime {
3131
}
3232

3333
#[cfg(any(feature = "v2_56", feature = "dox"))]
34-
pub fn new_from_iso8601<'a, P: Into<Option<&'a TimeZone>>>(text: &str, default_tz: P) -> Option<DateTime> {
35-
let default_tz = default_tz.into();
34+
pub fn new_from_iso8601(text: &str, default_tz: Option<&TimeZone>) -> Option<DateTime> {
3635
unsafe {
3736
from_glib_full(ffi::g_date_time_new_from_iso8601(text.to_glib_none().0, default_tz.to_glib_none().0))
3837
}

src/auto/functions.rs

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ pub fn assertion_message_cmpstr(domain: &str, file: &str, line: i32, func: &str,
4747
}
4848
}
4949

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>) {
5351
unsafe {
5452
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);
5553
}
@@ -280,15 +278,13 @@ pub fn compute_hmac_for_string(digest_type: ChecksumType, key: &[u8], str: &str)
280278
// unsafe { TODO: call ffi::g_dataset_id_set_data_full() }
281279
//}
282280

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> {
285282
unsafe {
286283
from_glib_none(ffi::g_dcgettext(domain.to_glib_none().0, msgid.to_glib_none().0, category))
287284
}
288285
}
289286

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> {
292288
unsafe {
293289
from_glib_none(ffi::g_dgettext(domain.to_glib_none().0, msgid.to_glib_none().0))
294290
}
@@ -302,8 +298,7 @@ pub fn dgettext<'a, P: Into<Option<&'a str>>>(domain: P, msgid: &str) -> Option<
302298
// unsafe { TODO: call ffi::g_direct_hash() }
303299
//}
304300

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> {
307302
unsafe {
308303
from_glib_none(ffi::g_dngettext(domain.to_glib_none().0, msgid.to_glib_none().0, msgid_plural.to_glib_none().0, n))
309304
}
@@ -317,15 +312,13 @@ pub fn dngettext<'a, P: Into<Option<&'a str>>>(domain: P, msgid: &str, msgid_plu
317312
// unsafe { TODO: call ffi::g_double_hash() }
318313
//}
319314

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> {
322316
unsafe {
323317
from_glib_none(ffi::g_dpgettext(domain.to_glib_none().0, msgctxtid.to_glib_none().0, msgidoffset))
324318
}
325319
}
326320

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> {
329322
unsafe {
330323
from_glib_none(ffi::g_dpgettext2(domain.to_glib_none().0, context.to_glib_none().0, msgid.to_glib_none().0))
331324
}
@@ -596,11 +589,11 @@ pub fn listenv() -> Vec<std::ffi::OsString> {
596589
}
597590
}
598591

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) {
600593
// unsafe { TODO: call ffi::g_log() }
601594
//}
602595

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>) {
604597
// unsafe { TODO: call ffi::g_log_default_handler() }
605598
//}
606599

@@ -622,12 +615,12 @@ pub fn log_remove_handler(log_domain: &str, handler_id: u32) {
622615
// unsafe { TODO: call ffi::g_log_set_fatal_mask() }
623616
//}
624617

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 {
626619
// unsafe { TODO: call ffi::g_log_set_handler() }
627620
//}
628621

629622
//#[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 {
631624
// unsafe { TODO: call ffi::g_log_set_handler_full() }
632625
//}
633626

@@ -651,7 +644,7 @@ pub fn log_remove_handler(log_domain: &str, handler_id: u32) {
651644
//}
652645

653646
//#[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) {
655648
// unsafe { TODO: call ffi::g_log_variant() }
656649
//}
657650

@@ -675,7 +668,7 @@ pub fn log_remove_handler(log_domain: &str, handler_id: u32) {
675668
// unsafe { TODO: call ffi::g_log_writer_standard_streams() }
676669
//}
677670

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) {
679672
// unsafe { TODO: call ffi::g_logv() }
680673
//}
681674

@@ -789,7 +782,7 @@ pub fn on_error_stack_trace(prg_name: &str) {
789782
}
790783
}
791784

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 {
793786
// unsafe { TODO: call ffi::g_parse_debug_string() }
794787
//}
795788

@@ -817,7 +810,7 @@ pub fn path_skip_root<P: AsRef<std::path::Path>>(file_name: P) -> Option<std::pa
817810
}
818811
}
819812

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 {
821814
// unsafe { TODO: call ffi::g_pattern_match() }
822815
//}
823816

@@ -847,7 +840,7 @@ pub fn pattern_match_simple(pattern: &str, string: &str) -> bool {
847840
// unsafe { TODO: call ffi::g_poll() }
848841
//}
849842

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) {
851844
// unsafe { TODO: call ffi::g_prefix_error() }
852845
//}
853846

@@ -919,9 +912,7 @@ pub fn reload_user_special_dirs_cache() {
919912
}
920913
}
921914

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>) {
925916
unsafe {
926917
ffi::g_return_if_fail_warning(log_domain.to_glib_none().0, pretty_function.to_glib_none().0, expression.to_glib_none().0);
927918
}
@@ -1111,7 +1102,7 @@ pub fn test_bug_base(uri_pattern: &str) {
11111102
// unsafe { TODO: call ffi::g_test_create_suite() }
11121103
//}
11131104

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) {
11151106
// unsafe { TODO: call ffi::g_test_expect_message() }
11161107
//}
11171108

@@ -1139,8 +1130,7 @@ pub fn test_failed() -> bool {
11391130
// unsafe { TODO: call ffi::g_test_get_root() }
11401131
//}
11411132

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>) {
11441134
unsafe {
11451135
ffi::g_test_incomplete(msg.to_glib_none().0);
11461136
}
@@ -1218,8 +1208,7 @@ pub fn test_set_nonfatal_assertions() {
12181208
}
12191209
}
12201210

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>) {
12231212
unsafe {
12241213
ffi::g_test_skip(msg.to_glib_none().0);
12251214
}
@@ -1271,7 +1260,7 @@ pub fn test_trap_reached_timeout() -> bool {
12711260
}
12721261
}
12731262

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) {
12751264
// unsafe { TODO: call ffi::g_test_trap_subprocess() }
12761265
//}
12771266

@@ -1313,8 +1302,7 @@ pub fn unlink<P: AsRef<std::path::Path>>(filename: P) -> i32 {
13131302
}
13141303
}
13151304

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> {
13181306
unsafe {
13191307
from_glib_full(ffi::g_uri_escape_string(unescaped.to_glib_none().0, reserved_chars_allowed.to_glib_none().0, allow_utf8.to_glib()))
13201308
}
@@ -1332,17 +1320,13 @@ pub fn uri_parse_scheme(uri: &str) -> Option<GString> {
13321320
}
13331321
}
13341322

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> {
13391324
unsafe {
13401325
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))
13411326
}
13421327
}
13431328

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> {
13461330
unsafe {
13471331
from_glib_full(ffi::g_uri_unescape_string(escaped_string.to_glib_none().0, illegal_characters.to_glib_none().0))
13481332
}
@@ -1394,9 +1378,7 @@ pub fn variant_get_gtype() -> types::Type {
13941378
// unsafe { TODO: call ffi::g_vsprintf() }
13951379
//}
13961380

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>) {
14001382
unsafe {
14011383
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);
14021384
}

src/auto/key_file.rs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ impl KeyFile {
3232
}
3333
}
3434

35-
pub fn get_comment<'a, P: Into<Option<&'a str>>>(&self, group_name: P, key: &str) -> Result<GString, Error> {
36-
let group_name = group_name.into();
35+
pub fn get_comment(&self, group_name: Option<&str>, key: &str) -> Result<GString, Error> {
3736
unsafe {
3837
let mut error = ptr::null_mut();
3938
let ret = ffi::g_key_file_get_comment(self.to_glib_none().0, group_name.to_glib_none().0, key.to_glib_none().0, &mut error);
@@ -101,24 +100,21 @@ impl KeyFile {
101100
}
102101

103102
#[cfg(any(feature = "v2_56", feature = "dox"))]
104-
pub fn get_locale_for_key<'a, P: Into<Option<&'a str>>>(&self, group_name: &str, key: &str, locale: P) -> Option<GString> {
105-
let locale = locale.into();
103+
pub fn get_locale_for_key(&self, group_name: &str, key: &str, locale: Option<&str>) -> Option<GString> {
106104
unsafe {
107105
from_glib_full(ffi::g_key_file_get_locale_for_key(self.to_glib_none().0, group_name.to_glib_none().0, key.to_glib_none().0, locale.to_glib_none().0))
108106
}
109107
}
110108

111-
pub fn get_locale_string<'a, P: Into<Option<&'a str>>>(&self, group_name: &str, key: &str, locale: P) -> Result<GString, Error> {
112-
let locale = locale.into();
109+
pub fn get_locale_string(&self, group_name: &str, key: &str, locale: Option<&str>) -> Result<GString, Error> {
113110
unsafe {
114111
let mut error = ptr::null_mut();
115112
let ret = ffi::g_key_file_get_locale_string(self.to_glib_none().0, group_name.to_glib_none().0, key.to_glib_none().0, locale.to_glib_none().0, &mut error);
116113
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
117114
}
118115
}
119116

120-
pub fn get_locale_string_list<'a, P: Into<Option<&'a str>>>(&self, group_name: &str, key: &str, locale: P) -> Result<Vec<GString>, Error> {
121-
let locale = locale.into();
117+
pub fn get_locale_string_list(&self, group_name: &str, key: &str, locale: Option<&str>) -> Result<Vec<GString>, Error> {
122118
unsafe {
123119
let mut length = mem::uninitialized();
124120
let mut error = ptr::null_mut();
@@ -198,9 +194,7 @@ impl KeyFile {
198194
}
199195
}
200196

201-
pub fn remove_comment<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, group_name: P, key: Q) -> Result<(), Error> {
202-
let group_name = group_name.into();
203-
let key = key.into();
197+
pub fn remove_comment(&self, group_name: Option<&str>, key: Option<&str>) -> Result<(), Error> {
204198
unsafe {
205199
let mut error = ptr::null_mut();
206200
let _ = ffi::g_key_file_remove_comment(self.to_glib_none().0, group_name.to_glib_none().0, key.to_glib_none().0, &mut error);
@@ -234,9 +228,7 @@ impl KeyFile {
234228
// unsafe { TODO: call ffi::g_key_file_set_boolean_list() }
235229
//}
236230

237-
pub fn set_comment<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, group_name: P, key: Q, comment: &str) -> Result<(), Error> {
238-
let group_name = group_name.into();
239-
let key = key.into();
231+
pub fn set_comment(&self, group_name: Option<&str>, key: Option<&str>, comment: &str) -> Result<(), Error> {
240232
unsafe {
241233
let mut error = ptr::null_mut();
242234
let _ = ffi::g_key_file_set_comment(self.to_glib_none().0, group_name.to_glib_none().0, key.to_glib_none().0, comment.to_glib_none().0, &mut error);

src/auto/main_loop.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ glib_wrapper! {
1818
}
1919

2020
impl MainLoop {
21-
pub fn new<'a, P: Into<Option<&'a MainContext>>>(context: P, is_running: bool) -> MainLoop {
22-
let context = context.into();
21+
pub fn new(context: Option<&MainContext>, is_running: bool) -> MainLoop {
2322
unsafe {
2423
from_glib_full(ffi::g_main_loop_new(context.to_glib_none().0, is_running.to_glib()))
2524
}

src/auto/time_zone.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ glib_wrapper! {
1919
}
2020

2121
impl TimeZone {
22-
pub fn new<'a, P: Into<Option<&'a str>>>(identifier: P) -> TimeZone {
23-
let identifier = identifier.into();
22+
pub fn new(identifier: Option<&str>) -> TimeZone {
2423
unsafe {
2524
from_glib_full(ffi::g_time_zone_new(identifier.to_glib_none().0))
2625
}

src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 4a198d9)
1+
Generated by gir (https://github.com/gtk-rs/gir @ c6b1950)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 02dfee2)

0 commit comments

Comments
 (0)