From 28acedc6b849353c529a0a27113b51a9dfdac874 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 25 Oct 2022 14:42:36 +0200 Subject: [PATCH] Fix clippy lints --- cairo/src/paths.rs | 2 +- cairo/sys/build.rs | 2 +- examples/gio_cancellable_future/main.rs | 2 +- examples/gio_futures/main.rs | 10 +- examples/gio_futures_await/main.rs | 10 +- examples/gio_task/main.rs | 4 +- gdk-pixbuf/src/pixbuf.rs | 4 +- gdk-pixbuf/sys/build.rs | 2 +- gdk-pixbuf/sys/src/lib.rs | 26 +- gdk-pixbuf/sys/versions.txt | 2 +- gio/src/async_initable.rs | 8 +- gio/src/cancellable.rs | 2 +- gio/src/dbus_proxy.rs | 2 +- gio/src/file.rs | 2 +- gio/src/initable.rs | 4 +- gio/src/lib.rs | 1 + gio/src/list_model.rs | 4 +- gio/src/output_stream.rs | 2 +- gio/src/pollable_input_stream.rs | 2 +- gio/src/read_input_stream.rs | 2 +- gio/sys/build.rs | 2 +- gio/sys/src/lib.rs | 590 ++++++++++++------------ gio/sys/versions.txt | 2 +- glib-build-tools/src/lib.rs | 9 +- glib-macros/src/clone.rs | 60 ++- glib-macros/src/closure.rs | 4 +- glib-macros/src/enum_derive.rs | 4 +- glib-macros/src/flags_attribute.rs | 4 +- glib-macros/src/lib.rs | 2 +- glib/gobject-sys/build.rs | 2 +- glib/gobject-sys/src/lib.rs | 126 +++-- glib/gobject-sys/versions.txt | 2 +- glib/src/char.rs | 6 +- glib/src/checksum.rs | 2 +- glib/src/convert.rs | 6 +- glib/src/date.rs | 2 +- glib/src/gobject/auto/flags.rs | 28 +- glib/src/gobject/binding.rs | 20 +- glib/src/gobject/binding_group.rs | 13 +- glib/src/gobject/flags.rs | 16 +- glib/src/gobject/signal_group.rs | 2 +- glib/src/key_file.rs | 6 +- glib/src/lib.rs | 1 + glib/src/log.rs | 2 +- glib/src/object.rs | 104 ++--- glib/src/param_spec.rs | 4 +- glib/src/signal.rs | 2 +- glib/src/subclass/types.rs | 2 +- glib/src/utils.rs | 2 +- glib/src/variant.rs | 6 +- glib/src/variant_type.rs | 4 +- glib/sys/build.rs | 2 +- glib/sys/src/lib.rs | 144 +++--- glib/sys/versions.txt | 2 +- graphene/sys/build.rs | 2 +- graphene/sys/src/lib.rs | 38 +- graphene/sys/versions.txt | 2 +- pango/sys/build.rs | 2 +- pango/sys/src/lib.rs | 98 ++-- pango/sys/versions.txt | 2 +- pangocairo/src/lib.rs | 1 + pangocairo/sys/build.rs | 2 +- pangocairo/sys/src/lib.rs | 4 +- pangocairo/sys/versions.txt | 2 +- 64 files changed, 687 insertions(+), 742 deletions(-) diff --git a/cairo/src/paths.rs b/cairo/src/paths.rs index 6808354cd911..90c11f830b14 100644 --- a/cairo/src/paths.rs +++ b/cairo/src/paths.rs @@ -102,7 +102,7 @@ impl<'a> Iterator for PathSegments<'a> { to_tuple(&self.data[self.i + 3].point), ), PathDataType::ClosePath => PathSegment::ClosePath, - PathDataType::__Unknown(x) => panic!("Unknown value: {}", x), + PathDataType::__Unknown(x) => panic!("Unknown value: {x}"), }; self.i += self.data[self.i].header.length as usize; diff --git a/cairo/sys/build.rs b/cairo/sys/build.rs index ac320f3fd729..1735f2317b78 100644 --- a/cairo/sys/build.rs +++ b/cairo/sys/build.rs @@ -7,7 +7,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/examples/gio_cancellable_future/main.rs b/examples/gio_cancellable_future/main.rs index 0aabca134393..3c79a664413d 100644 --- a/examples/gio_cancellable_future/main.rs +++ b/examples/gio_cancellable_future/main.rs @@ -27,7 +27,7 @@ fn main() { let cancellable_task = gio::CancellableFuture::new(a_very_long_task(), cancellable.clone()) .map(move |res| { if let Err(error) = res { - println!("{:?}", error); + println!("{error:?}"); } main_loop.quit(); diff --git a/examples/gio_futures/main.rs b/examples/gio_futures/main.rs index fc51ba518afc..46745ab87df2 100644 --- a/examples/gio_futures/main.rs +++ b/examples/gio_futures/main.rs @@ -17,7 +17,7 @@ fn main() { // error first print that error. .map(move |res| { if let Err(err) = res { - eprintln!("Got error: {}", err); + eprintln!("Got error: {err}"); } l_clone.quit(); @@ -36,7 +36,7 @@ fn read_and_print_file( file: &gio::File, ) -> impl Future> + std::marker::Unpin { file.read_future(glib::PRIORITY_DEFAULT) - .map_err(|err| format!("Failed to open file: {}", err)) + .map_err(|err| format!("Failed to open file: {err}")) .and_then(read_and_print_chunks) } @@ -98,9 +98,9 @@ fn read_and_print_next_chunk( ) -> impl Future>, String>> + std::marker::Unpin { let strm_clone = strm.clone(); strm.read_future(buf, glib::PRIORITY_DEFAULT) - .map_err(|(_buf, err)| format!("Failed to read from stream: {}", err)) + .map_err(|(_buf, err)| format!("Failed to read from stream: {err}")) .and_then(move |(buf, len)| { - println!("line {}: {:?}", idx, str::from_utf8(&buf[0..len]).unwrap()); + println!("line {idx}: {:?}", str::from_utf8(&buf[0..len]).unwrap()); // 0 is only returned when the input stream is finished, in which case // we drop the buffer and close the stream asynchronously. @@ -111,7 +111,7 @@ fn read_and_print_next_chunk( futures::future::Either::Left( strm_clone .close_future(glib::PRIORITY_DEFAULT) - .map_err(|err| format!("Failed to close stream: {}", err)) + .map_err(|err| format!("Failed to close stream: {err}")) .map_ok(|_| None), ) } else { diff --git a/examples/gio_futures_await/main.rs b/examples/gio_futures_await/main.rs index 1d8054d2fd2b..be4bf6924cfe 100644 --- a/examples/gio_futures_await/main.rs +++ b/examples/gio_futures_await/main.rs @@ -14,7 +14,7 @@ fn main() { let future = clone!(@strong l => async move { match read_file(file).await { Ok(()) => (), - Err(err) => eprintln!("Got error: {}", err), + Err(err) => eprintln!("Got error: {err}"), } l.quit(); }); @@ -30,7 +30,7 @@ async fn read_file(file: gio::File) -> Result<(), String> { // Try to open the file. let strm = file .read_future(glib::PRIORITY_DEFAULT) - .map_err(|err| format!("Failed to open file: {}", err)) + .map_err(|err| format!("Failed to open file: {err}")) .await?; // If opening the file succeeds, we asynchronously loop and @@ -42,7 +42,7 @@ async fn read_file(file: gio::File) -> Result<(), String> { loop { let (b, len) = strm .read_future(buf, glib::PRIORITY_DEFAULT) - .map_err(|(_buf, err)| format!("Failed to read from stream: {}", err)) + .map_err(|(_buf, err)| format!("Failed to read from stream: {err}")) .await?; // Once 0 is returned, we know that we're done with reading, otherwise @@ -53,14 +53,14 @@ async fn read_file(file: gio::File) -> Result<(), String> { buf = b; - println!("line {}: {:?}", idx, str::from_utf8(&buf[0..len]).unwrap()); + println!("line {idx}: {:?}", str::from_utf8(&buf[0..len]).unwrap()); idx += 1; } // Asynchronously close the stream in the end. strm.close_future(glib::PRIORITY_DEFAULT) - .map_err(|err| format!("Failed to close stream: {}", err)) + .map_err(|err| format!("Failed to close stream: {err}")) .await?; Ok(()) diff --git a/examples/gio_task/main.rs b/examples/gio_task/main.rs index 2b908d557e36..a8a9fd4a8e48 100644 --- a/examples/gio_task/main.rs +++ b/examples/gio_task/main.rs @@ -58,7 +58,7 @@ fn run_unsafe(send: oneshot::Sender<()>) { return; } - println!("Unsafe callback - Returned value from task: {}", ret); + println!("Unsafe callback - Returned value from task: {ret}"); println!( "Unsafe callback - FileSize::size: {}", file_size::ffi::my_file_size_get_retrieved_size( @@ -89,7 +89,7 @@ fn run_safe(send: oneshot::Sender<()>) { let cancellable = gio::Cancellable::new(); let closure = move |value: i64, source_object: &FileSize| { - println!("Safe callback - Returned value from task: {}", value); + println!("Safe callback - Returned value from task: {value}"); println!( "Safe callback - FileSize::size: {}", source_object.retrieved_size().unwrap() diff --git a/gdk-pixbuf/src/pixbuf.rs b/gdk-pixbuf/src/pixbuf.rs index cfc21a132b93..516fe6a14bc4 100644 --- a/gdk-pixbuf/src/pixbuf.rs +++ b/gdk-pixbuf/src/pixbuf.rs @@ -50,7 +50,7 @@ impl Pixbuf { let ptr = { let data: &mut [u8] = (*data).as_mut(); assert!( - data.len() >= ((height - 1) * row_stride + last_row_len) as usize, + data.len() >= ((height - 1) * row_stride + last_row_len), "data.len() must fit the width, height, and row_stride" ); data.as_mut_ptr() @@ -406,7 +406,7 @@ impl Pixbuf { if error.is_null() { Ok(FromGlibContainer::from_glib_full_num( buffer, - buffer_size.assume_init() as usize, + buffer_size.assume_init() as _, )) } else { Err(from_glib_full(error)) diff --git a/gdk-pixbuf/sys/build.rs b/gdk-pixbuf/sys/build.rs index 631008acdbca..8d181dad8caa 100644 --- a/gdk-pixbuf/sys/build.rs +++ b/gdk-pixbuf/sys/build.rs @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/gdk-pixbuf/sys/src/lib.rs b/gdk-pixbuf/sys/src/lib.rs index da0c2376e53b..fa802cc4bbfc 100644 --- a/gdk-pixbuf/sys/src/lib.rs +++ b/gdk-pixbuf/sys/src/lib.rs @@ -127,7 +127,7 @@ pub struct GdkPixbufAnimationClass { impl ::std::fmt::Debug for GdkPixbufAnimationClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufAnimationClass @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufAnimationClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("is_static_image", &self.is_static_image) .field("get_static_image", &self.get_static_image) @@ -152,7 +152,7 @@ pub struct GdkPixbufAnimationIterClass { impl ::std::fmt::Debug for GdkPixbufAnimationIterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufAnimationIterClass @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufAnimationIterClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_delay_time", &self.get_delay_time) .field("get_pixbuf", &self.get_pixbuf) @@ -181,7 +181,7 @@ pub struct GdkPixbufFormat { impl ::std::fmt::Debug for GdkPixbufFormat { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufFormat @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufFormat @ {self:p}")) .field("name", &self.name) .field("signature", &self.signature) .field("domain", &self.domain) @@ -208,7 +208,7 @@ pub struct GdkPixbufLoaderClass { impl ::std::fmt::Debug for GdkPixbufLoaderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufLoaderClass @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufLoaderClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("size_prepared", &self.size_prepared) .field("area_prepared", &self.area_prepared) @@ -242,7 +242,7 @@ pub struct GdkPixbufModule { impl ::std::fmt::Debug for GdkPixbufModule { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufModule @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufModule @ {self:p}")) .field("module_name", &self.module_name) .field("module_path", &self.module_path) .field("module", &self.module) @@ -274,7 +274,7 @@ pub struct GdkPixbufModulePattern { impl ::std::fmt::Debug for GdkPixbufModulePattern { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufModulePattern @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufModulePattern @ {self:p}")) .field("prefix", &self.prefix) .field("mask", &self.mask) .field("relevance", &self.relevance) @@ -299,7 +299,7 @@ pub struct GdkPixbuf { impl ::std::fmt::Debug for GdkPixbuf { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbuf @ {:p}", self)).finish() + f.debug_struct(&format!("GdkPixbuf @ {self:p}")).finish() } } @@ -311,7 +311,7 @@ pub struct GdkPixbufAnimation { impl ::std::fmt::Debug for GdkPixbufAnimation { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufAnimation @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufAnimation @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -325,7 +325,7 @@ pub struct GdkPixbufAnimationIter { impl ::std::fmt::Debug for GdkPixbufAnimationIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufAnimationIter @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufAnimationIter @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -340,7 +340,7 @@ pub struct GdkPixbufLoader { impl ::std::fmt::Debug for GdkPixbufLoader { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufLoader @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufLoader @ {self:p}")) .finish() } } @@ -353,7 +353,7 @@ pub struct GdkPixbufNonAnim { impl ::std::fmt::Debug for GdkPixbufNonAnim { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufNonAnim @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufNonAnim @ {self:p}")) .finish() } } @@ -366,7 +366,7 @@ pub struct GdkPixbufSimpleAnim { impl ::std::fmt::Debug for GdkPixbufSimpleAnim { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufSimpleAnim @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufSimpleAnim @ {self:p}")) .finish() } } @@ -379,7 +379,7 @@ pub struct GdkPixbufSimpleAnimIter { impl ::std::fmt::Debug for GdkPixbufSimpleAnimIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GdkPixbufSimpleAnimIter @ {:p}", self)) + f.debug_struct(&format!("GdkPixbufSimpleAnimIter @ {self:p}")) .finish() } } diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index 651e606eb1b2..83a0853fbf03 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 952ff416b599) +Generated by gir (https://github.com/gtk-rs/gir @ f0e953c094a5) from gir-files (https://github.com/gtk-rs/gir-files @ 89a11aa6a362) diff --git a/gio/src/async_initable.rs b/gio/src/async_initable.rs index 6e9c9eedebee..4918c9e00efb 100644 --- a/gio/src/async_initable.rs +++ b/gio/src/async_initable.rs @@ -57,7 +57,7 @@ impl AsyncInitable { callback: Q, ) { if !type_.is_a(AsyncInitable::static_type()) { - panic!("Type '{}' is not async initable", type_); + panic!("Type '{type_}' is not async initable"); } let mut property_values = smallvec::SmallVec::<[_; 16]>::with_capacity(properties.len()); @@ -85,7 +85,7 @@ impl AsyncInitable { io_priority: glib::Priority, ) -> Pin> + 'static>> { if !type_.is_a(AsyncInitable::static_type()) { - panic!("Type '{}' is not async initable", type_); + panic!("Type '{type_}' is not async initable"); } let mut property_values = smallvec::SmallVec::<[_; 16]>::with_capacity(properties.len()); @@ -121,7 +121,7 @@ impl AsyncInitable { callback: Q, ) { if !type_.is_a(AsyncInitable::static_type()) { - panic!("Type '{}' is not async initable", type_); + panic!("Type '{type_}' is not async initable"); } let mut property_values = smallvec::SmallVec::<[_; 16]>::with_capacity(properties.len()); @@ -149,7 +149,7 @@ impl AsyncInitable { io_priority: glib::Priority, ) -> Pin> + 'static>> { if !type_.is_a(AsyncInitable::static_type()) { - panic!("Type '{}' is not async initable", type_); + panic!("Type '{type_}' is not async initable"); } let mut property_values = smallvec::SmallVec::<[_; 16]>::with_capacity(properties.len()); diff --git a/gio/src/cancellable.rs b/gio/src/cancellable.rs index 2b774c3fa159..ceaacb770570 100644 --- a/gio/src/cancellable.rs +++ b/gio/src/cancellable.rs @@ -26,7 +26,7 @@ impl TryFromGlib for CancelledHandlerId { type Error = GlibNoneError; #[inline] unsafe fn try_from_glib(val: libc::c_ulong) -> Result { - NonZeroU64::new(val as u64).map(Self).ok_or(GlibNoneError) + NonZeroU64::new(val as _).map(Self).ok_or(GlibNoneError) } } diff --git a/gio/src/dbus_proxy.rs b/gio/src/dbus_proxy.rs index 44e9417e1514..95aba7979ede 100644 --- a/gio/src/dbus_proxy.rs +++ b/gio/src/dbus_proxy.rs @@ -95,7 +95,7 @@ impl> DBusProxyExtManual for O { } unsafe { let f: Box_ = Box_::new(f); - let detailed_signal_name = detail.map(|name| format!("g-signal::{}\0", name)); + let detailed_signal_name = detail.map(|name| format!("g-signal::{name}\0")); let signal_name: &[u8] = detailed_signal_name .as_ref() .map_or(&b"g-signal\0"[..], |n| n.as_bytes()); diff --git a/gio/src/file.rs b/gio/src/file.rs index f92cd4e9338c..b73e1c050773 100644 --- a/gio/src/file.rs +++ b/gio/src/file.rs @@ -683,7 +683,7 @@ impl> FileExtManual for O { ); let result = if error.is_null() { Ok(( - FromGlibContainer::from_glib_full_num(contents, length.assume_init() as usize), + FromGlibContainer::from_glib_full_num(contents, length.assume_init() as _), from_glib_full(etag_out), )) } else { diff --git a/gio/src/initable.rs b/gio/src/initable.rs index 6a9e4aba81e1..267a1a1897aa 100644 --- a/gio/src/initable.rs +++ b/gio/src/initable.rs @@ -36,7 +36,7 @@ impl Initable { cancellable: Option<&impl IsA>, ) -> Result { if !type_.is_a(Initable::static_type()) { - panic!("Type '{}' is not initable", type_); + panic!("Type '{type_}' is not initable"); } let mut property_values = smallvec::SmallVec::<[_; 16]>::with_capacity(properties.len()); @@ -63,7 +63,7 @@ impl Initable { cancellable: Option<&impl IsA>, ) -> Result { if !type_.is_a(Initable::static_type()) { - panic!("Type '{}' is not initable", type_); + panic!("Type '{type_}' is not initable"); } let mut property_values = smallvec::SmallVec::<[_; 16]>::with_capacity(properties.len()); diff --git a/gio/src/lib.rs b/gio/src/lib.rs index a2b7fbd64bf6..a9f3e3038a6f 100644 --- a/gio/src/lib.rs +++ b/gio/src/lib.rs @@ -7,6 +7,7 @@ #![allow(clippy::missing_safety_doc)] #![allow(clippy::upper_case_acronyms)] #![allow(clippy::non_send_fields_in_send_ty)] +#![allow(clippy::should_implement_trait)] #![doc = include_str!("../README.md")] pub use ffi; diff --git a/gio/src/list_model.rs b/gio/src/list_model.rs index d5d46cab8f38..1df17e7c6d20 100644 --- a/gio/src/list_model.rs +++ b/gio/src/list_model.rs @@ -103,8 +103,8 @@ impl<'a, T: IsA> Iterator for ListModelIter<'a, T> { } fn size_hint(&self) -> (usize, Option) { - let n = (self.reverse_pos - self.i) as usize; - (n as usize, Some(n)) + let n: usize = (self.reverse_pos - self.i) as _; + (n as _, Some(n)) } fn count(self) -> usize { diff --git a/gio/src/output_stream.rs b/gio/src/output_stream.rs index 41e524d335b7..f26703e78895 100644 --- a/gio/src/output_stream.rs +++ b/gio/src/output_stream.rs @@ -148,7 +148,7 @@ impl> OutputStreamExtManual for O { ) -> Result<(usize, Option), glib::Error> { let cancellable = cancellable.map(|c| c.as_ref()); let gcancellable = cancellable.to_glib_none(); - let count = buffer.len() as usize; + let count = buffer.len(); unsafe { let mut bytes_written = mem::MaybeUninit::uninit(); let mut error = ptr::null_mut(); diff --git a/gio/src/pollable_input_stream.rs b/gio/src/pollable_input_stream.rs index 6d1a02c2932f..01185ca0efc9 100644 --- a/gio/src/pollable_input_stream.rs +++ b/gio/src/pollable_input_stream.rs @@ -120,7 +120,7 @@ impl> PollableInputStreamExtManual for O { ) -> Result { let cancellable = cancellable.map(|c| c.as_ref()); let gcancellable = cancellable.to_glib_none(); - let count = buffer.len() as usize; + let count = buffer.len(); unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_pollable_input_stream_read_nonblocking( diff --git a/gio/src/read_input_stream.rs b/gio/src/read_input_stream.rs index 4253f1cc1e39..d6fa78d93a29 100644 --- a/gio/src/read_input_stream.rs +++ b/gio/src/read_input_stream.rs @@ -315,7 +315,7 @@ pub(crate) fn std_error_to_gio_error( ))), ErrorKind::WriteZero | _ => Some(Err(glib::Error::new( crate::IOErrorEnum::Failed, - format!("Unknown error: {:?}", err).as_str(), + format!("Unknown error: {err:?}").as_str(), ))), } } diff --git a/gio/sys/build.rs b/gio/sys/build.rs index 631008acdbca..8d181dad8caa 100644 --- a/gio/sys/build.rs +++ b/gio/sys/build.rs @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/gio/sys/src/lib.rs b/gio/sys/src/lib.rs index a4d739f75321..64092e18ff96 100644 --- a/gio/sys/src/lib.rs +++ b/gio/sys/src/lib.rs @@ -984,7 +984,7 @@ pub struct GActionEntry { impl ::std::fmt::Debug for GActionEntry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GActionEntry @ {:p}", self)) + f.debug_struct(&format!("GActionEntry @ {self:p}")) .field("name", &self.name) .field("activate", &self.activate) .field("parameter_type", &self.parameter_type) @@ -1035,7 +1035,7 @@ pub struct GActionGroupInterface { impl ::std::fmt::Debug for GActionGroupInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GActionGroupInterface @ {:p}", self)) + f.debug_struct(&format!("GActionGroupInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("has_action", &self.has_action) .field("list_actions", &self.list_actions) @@ -1071,7 +1071,7 @@ pub struct GActionInterface { impl ::std::fmt::Debug for GActionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GActionInterface @ {:p}", self)) + f.debug_struct(&format!("GActionInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("get_name", &self.get_name) .field("get_parameter_type", &self.get_parameter_type) @@ -1096,7 +1096,7 @@ pub struct GActionMapInterface { impl ::std::fmt::Debug for GActionMapInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GActionMapInterface @ {:p}", self)) + f.debug_struct(&format!("GActionMapInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("lookup_action", &self.lookup_action) .field("add_action", &self.add_action) @@ -1173,7 +1173,7 @@ pub struct GAppInfoIface { impl ::std::fmt::Debug for GAppInfoIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GAppInfoIface @ {:p}", self)) + f.debug_struct(&format!("GAppInfoIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("dup", &self.dup) .field("equal", &self.equal) @@ -1237,7 +1237,7 @@ pub struct GAppLaunchContextClass { impl ::std::fmt::Debug for GAppLaunchContextClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GAppLaunchContextClass @ {:p}", self)) + f.debug_struct(&format!("GAppLaunchContextClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_display", &self.get_display) .field("get_startup_notify_id", &self.get_startup_notify_id) @@ -1297,7 +1297,7 @@ pub struct GApplicationClass { impl ::std::fmt::Debug for GApplicationClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GApplicationClass @ {:p}", self)) + f.debug_struct(&format!("GApplicationClass @ {self:p}")) .field("startup", &self.startup) .field("activate", &self.activate) .field("open", &self.open) @@ -1329,7 +1329,7 @@ pub struct GApplicationCommandLineClass { impl ::std::fmt::Debug for GApplicationCommandLineClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GApplicationCommandLineClass @ {:p}", self)) + f.debug_struct(&format!("GApplicationCommandLineClass @ {self:p}")) .field("print_literal", &self.print_literal) .field("printerr_literal", &self.printerr_literal) .field("get_stdin", &self.get_stdin) @@ -1377,7 +1377,7 @@ pub struct GAsyncInitableIface { impl ::std::fmt::Debug for GAsyncInitableIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GAsyncInitableIface @ {:p}", self)) + f.debug_struct(&format!("GAsyncInitableIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("init_async", &self.init_async) .field("init_finish", &self.init_finish) @@ -1396,7 +1396,7 @@ pub struct GAsyncResultIface { impl ::std::fmt::Debug for GAsyncResultIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GAsyncResultIface @ {:p}", self)) + f.debug_struct(&format!("GAsyncResultIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("get_user_data", &self.get_user_data) .field("get_source_object", &self.get_source_object) @@ -1443,7 +1443,7 @@ pub struct GBufferedInputStreamClass { impl ::std::fmt::Debug for GBufferedInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBufferedInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GBufferedInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("fill", &self.fill) .field("fill_async", &self.fill_async) @@ -1475,7 +1475,7 @@ pub struct GBufferedOutputStreamClass { impl ::std::fmt::Debug for GBufferedOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBufferedOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GBufferedOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -1505,7 +1505,7 @@ pub struct GCancellableClass { impl ::std::fmt::Debug for GCancellableClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GCancellableClass @ {:p}", self)) + f.debug_struct(&format!("GCancellableClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("cancelled", &self.cancelled) .field("_g_reserved1", &self._g_reserved1) @@ -1533,7 +1533,7 @@ pub struct GCharsetConverterClass { impl ::std::fmt::Debug for GCharsetConverterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GCharsetConverterClass @ {:p}", self)) + f.debug_struct(&format!("GCharsetConverterClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -1561,7 +1561,7 @@ pub struct GConverterIface { impl ::std::fmt::Debug for GConverterIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GConverterIface @ {:p}", self)) + f.debug_struct(&format!("GConverterIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("convert", &self.convert) .field("reset", &self.reset) @@ -1582,7 +1582,7 @@ pub struct GConverterInputStreamClass { impl ::std::fmt::Debug for GConverterInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GConverterInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GConverterInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -1614,7 +1614,7 @@ pub struct GConverterOutputStreamClass { impl ::std::fmt::Debug for GConverterOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GConverterOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GConverterOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -1652,7 +1652,7 @@ pub struct GDBusAnnotationInfo { impl ::std::fmt::Debug for GDBusAnnotationInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusAnnotationInfo @ {:p}", self)) + f.debug_struct(&format!("GDBusAnnotationInfo @ {self:p}")) .field("ref_count", &self.ref_count) .field("key", &self.key) .field("value", &self.value) @@ -1672,7 +1672,7 @@ pub struct GDBusArgInfo { impl ::std::fmt::Debug for GDBusArgInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusArgInfo @ {:p}", self)) + f.debug_struct(&format!("GDBusArgInfo @ {self:p}")) .field("ref_count", &self.ref_count) .field("name", &self.name) .field("signature", &self.signature) @@ -1690,7 +1690,7 @@ pub struct GDBusErrorEntry { impl ::std::fmt::Debug for GDBusErrorEntry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusErrorEntry @ {:p}", self)) + f.debug_struct(&format!("GDBusErrorEntry @ {self:p}")) .field("error_code", &self.error_code) .field("dbus_error_name", &self.dbus_error_name) .finish() @@ -1709,7 +1709,7 @@ pub struct GDBusInterfaceIface { impl ::std::fmt::Debug for GDBusInterfaceIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusInterfaceIface @ {:p}", self)) + f.debug_struct(&format!("GDBusInterfaceIface @ {self:p}")) .field("parent_iface", &self.parent_iface) .field("get_info", &self.get_info) .field("get_object", &self.get_object) @@ -1732,7 +1732,7 @@ pub struct GDBusInterfaceInfo { impl ::std::fmt::Debug for GDBusInterfaceInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusInterfaceInfo @ {:p}", self)) + f.debug_struct(&format!("GDBusInterfaceInfo @ {self:p}")) .field("ref_count", &self.ref_count) .field("name", &self.name) .field("methods", &self.methods) @@ -1763,7 +1763,7 @@ pub struct GDBusInterfaceSkeletonClass { impl ::std::fmt::Debug for GDBusInterfaceSkeletonClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusInterfaceSkeletonClass @ {:p}", self)) + f.debug_struct(&format!("GDBusInterfaceSkeletonClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_info", &self.get_info) .field("get_vtable", &self.get_vtable) @@ -1793,7 +1793,7 @@ pub struct GDBusInterfaceVTable { impl ::std::fmt::Debug for GDBusInterfaceVTable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusInterfaceVTable @ {:p}", self)) + f.debug_struct(&format!("GDBusInterfaceVTable @ {self:p}")) .field("method_call", &self.method_call) .field("get_property", &self.get_property) .field("set_property", &self.set_property) @@ -1813,7 +1813,7 @@ pub struct GDBusMethodInfo { impl ::std::fmt::Debug for GDBusMethodInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusMethodInfo @ {:p}", self)) + f.debug_struct(&format!("GDBusMethodInfo @ {self:p}")) .field("ref_count", &self.ref_count) .field("name", &self.name) .field("in_args", &self.in_args) @@ -1835,7 +1835,7 @@ pub struct GDBusNodeInfo { impl ::std::fmt::Debug for GDBusNodeInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusNodeInfo @ {:p}", self)) + f.debug_struct(&format!("GDBusNodeInfo @ {self:p}")) .field("ref_count", &self.ref_count) .field("path", &self.path) .field("interfaces", &self.interfaces) @@ -1859,7 +1859,7 @@ pub struct GDBusObjectIface { impl ::std::fmt::Debug for GDBusObjectIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectIface @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectIface @ {self:p}")) .field("parent_iface", &self.parent_iface) .field("get_object_path", &self.get_object_path) .field("get_interfaces", &self.get_interfaces) @@ -1898,7 +1898,7 @@ pub struct GDBusObjectManagerClientClass { impl ::std::fmt::Debug for GDBusObjectManagerClientClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectManagerClientClass @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectManagerClientClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("interface_proxy_signal", &self.interface_proxy_signal) .field( @@ -1944,7 +1944,7 @@ pub struct GDBusObjectManagerIface { impl ::std::fmt::Debug for GDBusObjectManagerIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectManagerIface @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectManagerIface @ {self:p}")) .field("parent_iface", &self.parent_iface) .field("get_object_path", &self.get_object_path) .field("get_objects", &self.get_objects) @@ -1967,7 +1967,7 @@ pub struct GDBusObjectManagerServerClass { impl ::std::fmt::Debug for GDBusObjectManagerServerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectManagerServerClass @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectManagerServerClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -1990,7 +1990,7 @@ pub struct GDBusObjectProxyClass { impl ::std::fmt::Debug for GDBusObjectProxyClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectProxyClass @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectProxyClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -2020,7 +2020,7 @@ pub struct GDBusObjectSkeletonClass { impl ::std::fmt::Debug for GDBusObjectSkeletonClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectSkeletonClass @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectSkeletonClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("authorize_method", &self.authorize_method) .finish() @@ -2047,7 +2047,7 @@ pub struct GDBusPropertyInfo { impl ::std::fmt::Debug for GDBusPropertyInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusPropertyInfo @ {:p}", self)) + f.debug_struct(&format!("GDBusPropertyInfo @ {self:p}")) .field("ref_count", &self.ref_count) .field("name", &self.name) .field("signature", &self.signature) @@ -2071,7 +2071,7 @@ pub struct GDBusProxyClass { impl ::std::fmt::Debug for GDBusProxyClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusProxyClass @ {:p}", self)) + f.debug_struct(&format!("GDBusProxyClass @ {self:p}")) .field("g_properties_changed", &self.g_properties_changed) .field("g_signal", &self.g_signal) .finish() @@ -2097,7 +2097,7 @@ pub struct GDBusSignalInfo { impl ::std::fmt::Debug for GDBusSignalInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusSignalInfo @ {:p}", self)) + f.debug_struct(&format!("GDBusSignalInfo @ {self:p}")) .field("ref_count", &self.ref_count) .field("name", &self.name) .field("args", &self.args) @@ -2117,7 +2117,7 @@ pub struct GDBusSubtreeVTable { impl ::std::fmt::Debug for GDBusSubtreeVTable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusSubtreeVTable @ {:p}", self)) + f.debug_struct(&format!("GDBusSubtreeVTable @ {self:p}")) .field("enumerate", &self.enumerate) .field("introspect", &self.introspect) .field("dispatch", &self.dispatch) @@ -2138,7 +2138,7 @@ pub struct GDataInputStreamClass { impl ::std::fmt::Debug for GDataInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDataInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GDataInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -2170,7 +2170,7 @@ pub struct GDataOutputStreamClass { impl ::std::fmt::Debug for GDataOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDataOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GDataOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -2237,7 +2237,7 @@ pub struct GDatagramBasedInterface { impl ::std::fmt::Debug for GDatagramBasedInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDatagramBasedInterface @ {:p}", self)) + f.debug_struct(&format!("GDatagramBasedInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("receive_messages", &self.receive_messages) .field("send_messages", &self.send_messages) @@ -2260,7 +2260,7 @@ pub struct GDebugControllerDBusClass { impl ::std::fmt::Debug for GDebugControllerDBusClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDebugControllerDBusClass @ {:p}", self)) + f.debug_struct(&format!("GDebugControllerDBusClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("authorize", &self.authorize) .field("padding", &self.padding) @@ -2276,7 +2276,7 @@ pub struct GDebugControllerInterface { impl ::std::fmt::Debug for GDebugControllerInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDebugControllerInterface @ {:p}", self)) + f.debug_struct(&format!("GDebugControllerInterface @ {self:p}")) .finish() } } @@ -2289,7 +2289,7 @@ pub struct GDesktopAppInfoClass { impl ::std::fmt::Debug for GDesktopAppInfoClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDesktopAppInfoClass @ {:p}", self)) + f.debug_struct(&format!("GDesktopAppInfoClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -2305,7 +2305,7 @@ pub struct GDesktopAppInfoLookupIface { impl ::std::fmt::Debug for GDesktopAppInfoLookupIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDesktopAppInfoLookupIface @ {:p}", self)) + f.debug_struct(&format!("GDesktopAppInfoLookupIface @ {self:p}")) .field("g_iface", &self.g_iface) .field( "get_default_for_uri_scheme", @@ -2401,7 +2401,7 @@ pub struct GDriveIface { impl ::std::fmt::Debug for GDriveIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDriveIface @ {:p}", self)) + f.debug_struct(&format!("GDriveIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("changed", &self.changed) .field("disconnected", &self.disconnected) @@ -2450,7 +2450,7 @@ pub struct GDtlsClientConnectionInterface { impl ::std::fmt::Debug for GDtlsClientConnectionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDtlsClientConnectionInterface @ {:p}", self)) + f.debug_struct(&format!("GDtlsClientConnectionInterface @ {self:p}")) .field("g_iface", &self.g_iface) .finish() } @@ -2533,7 +2533,7 @@ pub struct GDtlsConnectionInterface { impl ::std::fmt::Debug for GDtlsConnectionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDtlsConnectionInterface @ {:p}", self)) + f.debug_struct(&format!("GDtlsConnectionInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("accept_certificate", &self.accept_certificate) .field("handshake", &self.handshake) @@ -2557,7 +2557,7 @@ pub struct GDtlsServerConnectionInterface { impl ::std::fmt::Debug for GDtlsServerConnectionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDtlsServerConnectionInterface @ {:p}", self)) + f.debug_struct(&format!("GDtlsServerConnectionInterface @ {self:p}")) .field("g_iface", &self.g_iface) .finish() } @@ -2579,7 +2579,7 @@ pub struct GEmblemedIconClass { impl ::std::fmt::Debug for GEmblemedIconClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GEmblemedIconClass @ {:p}", self)) + f.debug_struct(&format!("GEmblemedIconClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -2603,7 +2603,7 @@ pub struct GFileAttributeInfo { impl ::std::fmt::Debug for GFileAttributeInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileAttributeInfo @ {:p}", self)) + f.debug_struct(&format!("GFileAttributeInfo @ {self:p}")) .field("name", &self.name) .field("type_", &self.type_) .field("flags", &self.flags) @@ -2620,7 +2620,7 @@ pub struct GFileAttributeInfoList { impl ::std::fmt::Debug for GFileAttributeInfoList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileAttributeInfoList @ {:p}", self)) + f.debug_struct(&format!("GFileAttributeInfoList @ {self:p}")) .field("infos", &self.infos) .field("n_infos", &self.n_infos) .finish() @@ -2635,7 +2635,7 @@ pub struct GFileAttributeMatcher { impl ::std::fmt::Debug for GFileAttributeMatcher { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileAttributeMatcher @ {:p}", self)) + f.debug_struct(&format!("GFileAttributeMatcher @ {self:p}")) .finish() } } @@ -2649,7 +2649,7 @@ pub struct GFileDescriptorBasedIface { impl ::std::fmt::Debug for GFileDescriptorBasedIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileDescriptorBasedIface @ {:p}", self)) + f.debug_struct(&format!("GFileDescriptorBasedIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("get_fd", &self.get_fd) .finish() @@ -2718,7 +2718,7 @@ pub struct GFileEnumeratorClass { impl ::std::fmt::Debug for GFileEnumeratorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileEnumeratorClass @ {:p}", self)) + f.debug_struct(&format!("GFileEnumeratorClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("next_file", &self.next_file) .field("close_fn", &self.close_fn) @@ -2804,7 +2804,7 @@ pub struct GFileIOStreamClass { impl ::std::fmt::Debug for GFileIOStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileIOStreamClass @ {:p}", self)) + f.debug_struct(&format!("GFileIOStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("tell", &self.tell) .field("can_seek", &self.can_seek) @@ -3460,7 +3460,7 @@ pub struct GFileIface { impl ::std::fmt::Debug for GFileIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileIface @ {:p}", self)) + f.debug_struct(&format!("GFileIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("dup", &self.dup) .field("hash", &self.hash) @@ -3668,7 +3668,7 @@ pub struct GFileInputStreamClass { impl ::std::fmt::Debug for GFileInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GFileInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("tell", &self.tell) .field("can_seek", &self.can_seek) @@ -3709,7 +3709,7 @@ pub struct GFileMonitorClass { impl ::std::fmt::Debug for GFileMonitorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileMonitorClass @ {:p}", self)) + f.debug_struct(&format!("GFileMonitorClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("changed", &self.changed) .field("cancel", &self.cancel) @@ -3789,7 +3789,7 @@ pub struct GFileOutputStreamClass { impl ::std::fmt::Debug for GFileOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GFileOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("tell", &self.tell) .field("can_seek", &self.can_seek) @@ -3829,7 +3829,7 @@ pub struct GFilenameCompleterClass { impl ::std::fmt::Debug for GFilenameCompleterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFilenameCompleterClass @ {:p}", self)) + f.debug_struct(&format!("GFilenameCompleterClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("got_completion_data", &self.got_completion_data) .field("_g_reserved1", &self._g_reserved1) @@ -3850,7 +3850,7 @@ pub struct GFilterInputStreamClass { impl ::std::fmt::Debug for GFilterInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFilterInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GFilterInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -3870,7 +3870,7 @@ pub struct GFilterOutputStreamClass { impl ::std::fmt::Debug for GFilterOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFilterOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GFilterOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -3962,7 +3962,7 @@ pub struct GIOStreamClass { impl ::std::fmt::Debug for GIOStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GIOStreamClass @ {:p}", self)) + f.debug_struct(&format!("GIOStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_input_stream", &self.get_input_stream) .field("get_output_stream", &self.get_output_stream) @@ -4007,7 +4007,7 @@ pub struct GIconIface { impl ::std::fmt::Debug for GIconIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GIconIface @ {:p}", self)) + f.debug_struct(&format!("GIconIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("hash", &self.hash) .field("equal", &self.equal) @@ -4028,7 +4028,7 @@ pub struct GInetAddressClass { impl ::std::fmt::Debug for GInetAddressClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInetAddressClass @ {:p}", self)) + f.debug_struct(&format!("GInetAddressClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("to_string", &self.to_string) .field("to_bytes", &self.to_bytes) @@ -4044,7 +4044,7 @@ pub struct GInetAddressMaskClass { impl ::std::fmt::Debug for GInetAddressMaskClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInetAddressMaskClass @ {:p}", self)) + f.debug_struct(&format!("GInetAddressMaskClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -4074,7 +4074,7 @@ pub struct GInetSocketAddressClass { impl ::std::fmt::Debug for GInetSocketAddressClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInetSocketAddressClass @ {:p}", self)) + f.debug_struct(&format!("GInetSocketAddressClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -4099,7 +4099,7 @@ pub struct GInitableIface { impl ::std::fmt::Debug for GInitableIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInitableIface @ {:p}", self)) + f.debug_struct(&format!("GInitableIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("init", &self.init) .finish() @@ -4120,7 +4120,7 @@ pub struct GInputMessage { impl ::std::fmt::Debug for GInputMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInputMessage @ {:p}", self)) + f.debug_struct(&format!("GInputMessage @ {self:p}")) .field("address", &self.address) .field("vectors", &self.vectors) .field("num_vectors", &self.num_vectors) @@ -4220,7 +4220,7 @@ pub struct GInputStreamClass { impl ::std::fmt::Debug for GInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("read_fn", &self.read_fn) .field("skip", &self.skip) @@ -4257,7 +4257,7 @@ pub struct GInputVector { impl ::std::fmt::Debug for GInputVector { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInputVector @ {:p}", self)) + f.debug_struct(&format!("GInputVector @ {self:p}")) .field("buffer", &self.buffer) .field("size", &self.size) .finish() @@ -4275,7 +4275,7 @@ pub struct GListModelInterface { impl ::std::fmt::Debug for GListModelInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GListModelInterface @ {:p}", self)) + f.debug_struct(&format!("GListModelInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("get_item_type", &self.get_item_type) .field("get_n_items", &self.get_n_items) @@ -4292,7 +4292,7 @@ pub struct GListStoreClass { impl ::std::fmt::Debug for GListStoreClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GListStoreClass @ {:p}", self)) + f.debug_struct(&format!("GListStoreClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -4332,7 +4332,7 @@ pub struct GLoadableIconIface { impl ::std::fmt::Debug for GLoadableIconIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GLoadableIconIface @ {:p}", self)) + f.debug_struct(&format!("GLoadableIconIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("load", &self.load) .field("load_async", &self.load_async) @@ -4354,7 +4354,7 @@ pub struct GMemoryInputStreamClass { impl ::std::fmt::Debug for GMemoryInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMemoryInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GMemoryInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -4383,7 +4383,7 @@ pub struct GMemoryMonitorInterface { impl ::std::fmt::Debug for GMemoryMonitorInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMemoryMonitorInterface @ {:p}", self)) + f.debug_struct(&format!("GMemoryMonitorInterface @ {self:p}")) .field("low_memory_warning", &self.low_memory_warning) .finish() } @@ -4402,7 +4402,7 @@ pub struct GMemoryOutputStreamClass { impl ::std::fmt::Debug for GMemoryOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMemoryOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GMemoryOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -4436,7 +4436,7 @@ pub struct GMenuAttributeIterClass { impl ::std::fmt::Debug for GMenuAttributeIterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenuAttributeIterClass @ {:p}", self)) + f.debug_struct(&format!("GMenuAttributeIterClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_next", &self.get_next) .finish() @@ -4466,7 +4466,7 @@ pub struct GMenuLinkIterClass { impl ::std::fmt::Debug for GMenuLinkIterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenuLinkIterClass @ {:p}", self)) + f.debug_struct(&format!("GMenuLinkIterClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_next", &self.get_next) .finish() @@ -4509,7 +4509,7 @@ pub struct GMenuModelClass { impl ::std::fmt::Debug for GMenuModelClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenuModelClass @ {:p}", self)) + f.debug_struct(&format!("GMenuModelClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("is_mutable", &self.is_mutable) .field("get_n_items", &self.get_n_items) @@ -4640,7 +4640,7 @@ pub struct GMountIface { impl ::std::fmt::Debug for GMountIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMountIface @ {:p}", self)) + f.debug_struct(&format!("GMountIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("changed", &self.changed) .field("unmounted", &self.unmounted) @@ -4719,7 +4719,7 @@ pub struct GMountOperationClass { impl ::std::fmt::Debug for GMountOperationClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMountOperationClass @ {:p}", self)) + f.debug_struct(&format!("GMountOperationClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("ask_password", &self.ask_password) .field("ask_question", &self.ask_question) @@ -4756,7 +4756,7 @@ pub struct GNativeSocketAddressClass { impl ::std::fmt::Debug for GNativeSocketAddressClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNativeSocketAddressClass @ {:p}", self)) + f.debug_struct(&format!("GNativeSocketAddressClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -4780,7 +4780,7 @@ pub struct GNativeVolumeMonitorClass { impl ::std::fmt::Debug for GNativeVolumeMonitorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNativeVolumeMonitorClass @ {:p}", self)) + f.debug_struct(&format!("GNativeVolumeMonitorClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_mount_for_mount_path", &self.get_mount_for_mount_path) .finish() @@ -4795,7 +4795,7 @@ pub struct GNetworkAddressClass { impl ::std::fmt::Debug for GNetworkAddressClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNetworkAddressClass @ {:p}", self)) + f.debug_struct(&format!("GNetworkAddressClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -4842,7 +4842,7 @@ pub struct GNetworkMonitorInterface { impl ::std::fmt::Debug for GNetworkMonitorInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNetworkMonitorInterface @ {:p}", self)) + f.debug_struct(&format!("GNetworkMonitorInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("network_changed", &self.network_changed) .field("can_reach", &self.can_reach) @@ -4860,7 +4860,7 @@ pub struct GNetworkServiceClass { impl ::std::fmt::Debug for GNetworkServiceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNetworkServiceClass @ {:p}", self)) + f.debug_struct(&format!("GNetworkServiceClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -4887,7 +4887,7 @@ pub struct GOutputMessage { impl ::std::fmt::Debug for GOutputMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GOutputMessage @ {:p}", self)) + f.debug_struct(&format!("GOutputMessage @ {self:p}")) .field("address", &self.address) .field("vectors", &self.vectors) .field("num_vectors", &self.num_vectors) @@ -5040,7 +5040,7 @@ pub struct GOutputStreamClass { impl ::std::fmt::Debug for GOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("write_fn", &self.write_fn) .field("splice", &self.splice) @@ -5083,7 +5083,7 @@ pub struct GOutputVector { impl ::std::fmt::Debug for GOutputVector { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GOutputVector @ {:p}", self)) + f.debug_struct(&format!("GOutputVector @ {self:p}")) .field("buffer", &self.buffer) .field("size", &self.size) .finish() @@ -5133,7 +5133,7 @@ pub struct GPermissionClass { impl ::std::fmt::Debug for GPermissionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPermissionClass @ {:p}", self)) + f.debug_struct(&format!("GPermissionClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("acquire", &self.acquire) .field("acquire_async", &self.acquire_async) @@ -5175,7 +5175,7 @@ pub struct GPollableInputStreamInterface { impl ::std::fmt::Debug for GPollableInputStreamInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPollableInputStreamInterface @ {:p}", self)) + f.debug_struct(&format!("GPollableInputStreamInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("can_poll", &self.can_poll) .field("is_readable", &self.is_readable) @@ -5215,7 +5215,7 @@ pub struct GPollableOutputStreamInterface { impl ::std::fmt::Debug for GPollableOutputStreamInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPollableOutputStreamInterface @ {:p}", self)) + f.debug_struct(&format!("GPollableOutputStreamInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("can_poll", &self.can_poll) .field("is_writable", &self.is_writable) @@ -5234,7 +5234,7 @@ pub struct GPowerProfileMonitorInterface { impl ::std::fmt::Debug for GPowerProfileMonitorInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPowerProfileMonitorInterface @ {:p}", self)) + f.debug_struct(&format!("GPowerProfileMonitorInterface @ {self:p}")) .finish() } } @@ -5247,7 +5247,7 @@ pub struct GProxyAddressClass { impl ::std::fmt::Debug for GProxyAddressClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GProxyAddressClass @ {:p}", self)) + f.debug_struct(&format!("GProxyAddressClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -5268,7 +5268,7 @@ pub struct GProxyAddressEnumeratorClass { impl ::std::fmt::Debug for GProxyAddressEnumeratorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GProxyAddressEnumeratorClass @ {:p}", self)) + f.debug_struct(&format!("GProxyAddressEnumeratorClass @ {self:p}")) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) .field("_g_reserved3", &self._g_reserved3) @@ -5331,7 +5331,7 @@ pub struct GProxyInterface { impl ::std::fmt::Debug for GProxyInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GProxyInterface @ {:p}", self)) + f.debug_struct(&format!("GProxyInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("connect", &self.connect) .field("connect_async", &self.connect_async) @@ -5374,7 +5374,7 @@ pub struct GProxyResolverInterface { impl ::std::fmt::Debug for GProxyResolverInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GProxyResolverInterface @ {:p}", self)) + f.debug_struct(&format!("GProxyResolverInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("is_supported", &self.is_supported) .field("lookup", &self.lookup) @@ -5408,7 +5408,7 @@ pub struct GRemoteActionGroupInterface { impl ::std::fmt::Debug for GRemoteActionGroupInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GRemoteActionGroupInterface @ {:p}", self)) + f.debug_struct(&format!("GRemoteActionGroupInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("activate_action_full", &self.activate_action_full) .field("change_action_state_full", &self.change_action_state_full) @@ -5549,7 +5549,7 @@ pub struct GResolverClass { impl ::std::fmt::Debug for GResolverClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GResolverClass @ {:p}", self)) + f.debug_struct(&format!("GResolverClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("reload", &self.reload) .field("lookup_by_name", &self.lookup_by_name) @@ -5593,7 +5593,7 @@ pub struct GResource { impl ::std::fmt::Debug for GResource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GResource @ {:p}", self)).finish() + f.debug_struct(&format!("GResource @ {self:p}")).finish() } } @@ -5625,7 +5625,7 @@ pub struct GSeekableIface { impl ::std::fmt::Debug for GSeekableIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSeekableIface @ {:p}", self)) + f.debug_struct(&format!("GSeekableIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("tell", &self.tell) .field("can_seek", &self.can_seek) @@ -5678,7 +5678,7 @@ pub struct GSettingsBackendClass { impl ::std::fmt::Debug for GSettingsBackendClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSettingsBackendClass @ {:p}", self)) + f.debug_struct(&format!("GSettingsBackendClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("read", &self.read) .field("get_writable", &self.get_writable) @@ -5717,7 +5717,7 @@ pub struct GSettingsClass { impl ::std::fmt::Debug for GSettingsClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSettingsClass @ {:p}", self)) + f.debug_struct(&format!("GSettingsClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("writable_changed", &self.writable_changed) .field("changed", &self.changed) @@ -5744,7 +5744,7 @@ pub struct GSettingsSchema { impl ::std::fmt::Debug for GSettingsSchema { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSettingsSchema @ {:p}", self)) + f.debug_struct(&format!("GSettingsSchema @ {self:p}")) .finish() } } @@ -5757,7 +5757,7 @@ pub struct GSettingsSchemaKey { impl ::std::fmt::Debug for GSettingsSchemaKey { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSettingsSchemaKey @ {:p}", self)) + f.debug_struct(&format!("GSettingsSchemaKey @ {self:p}")) .finish() } } @@ -5770,7 +5770,7 @@ pub struct GSettingsSchemaSource { impl ::std::fmt::Debug for GSettingsSchemaSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSettingsSchemaSource @ {:p}", self)) + f.debug_struct(&format!("GSettingsSchemaSource @ {self:p}")) .finish() } } @@ -5784,7 +5784,7 @@ pub struct GSimpleActionGroupClass { impl ::std::fmt::Debug for GSimpleActionGroupClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimpleActionGroupClass @ {:p}", self)) + f.debug_struct(&format!("GSimpleActionGroupClass @ {self:p}")) .finish() } } @@ -5818,7 +5818,7 @@ pub struct GSimpleProxyResolverClass { impl ::std::fmt::Debug for GSimpleProxyResolverClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimpleProxyResolverClass @ {:p}", self)) + f.debug_struct(&format!("GSimpleProxyResolverClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -5855,7 +5855,7 @@ pub struct GSocketAddressClass { impl ::std::fmt::Debug for GSocketAddressClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketAddressClass @ {:p}", self)) + f.debug_struct(&format!("GSocketAddressClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_family", &self.get_family) .field("get_native_size", &self.get_native_size) @@ -5894,7 +5894,7 @@ pub struct GSocketAddressEnumeratorClass { impl ::std::fmt::Debug for GSocketAddressEnumeratorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketAddressEnumeratorClass @ {:p}", self)) + f.debug_struct(&format!("GSocketAddressEnumeratorClass @ {self:p}")) .field("next", &self.next) .field("next_async", &self.next_async) .field("next_finish", &self.next_finish) @@ -5920,7 +5920,7 @@ pub struct GSocketClass { impl ::std::fmt::Debug for GSocketClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketClass @ {:p}", self)) + f.debug_struct(&format!("GSocketClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -5956,7 +5956,7 @@ pub struct GSocketClientClass { impl ::std::fmt::Debug for GSocketClientClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketClientClass @ {:p}", self)) + f.debug_struct(&format!("GSocketClientClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("event", &self.event) .field("_g_reserved1", &self._g_reserved1) @@ -5988,7 +5988,7 @@ pub struct GSocketConnectableIface { impl ::std::fmt::Debug for GSocketConnectableIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketConnectableIface @ {:p}", self)) + f.debug_struct(&format!("GSocketConnectableIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("enumerate", &self.enumerate) .field("proxy_enumerate", &self.proxy_enumerate) @@ -6011,7 +6011,7 @@ pub struct GSocketConnectionClass { impl ::std::fmt::Debug for GSocketConnectionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketConnectionClass @ {:p}", self)) + f.debug_struct(&format!("GSocketConnectionClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -6050,7 +6050,7 @@ pub struct GSocketControlMessageClass { impl ::std::fmt::Debug for GSocketControlMessageClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketControlMessageClass @ {:p}", self)) + f.debug_struct(&format!("GSocketControlMessageClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_size", &self.get_size) .field("get_level", &self.get_level) @@ -6090,7 +6090,7 @@ pub struct GSocketListenerClass { impl ::std::fmt::Debug for GSocketListenerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketListenerClass @ {:p}", self)) + f.debug_struct(&format!("GSocketListenerClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("changed", &self.changed) .field("event", &self.event) @@ -6140,7 +6140,7 @@ pub struct GSocketServiceClass { impl ::std::fmt::Debug for GSocketServiceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketServiceClass @ {:p}", self)) + f.debug_struct(&format!("GSocketServiceClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("incoming", &self.incoming) .field("_g_reserved1", &self._g_reserved1) @@ -6169,7 +6169,7 @@ pub struct GSrvTarget { impl ::std::fmt::Debug for GSrvTarget { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSrvTarget @ {:p}", self)).finish() + f.debug_struct(&format!("GSrvTarget @ {self:p}")).finish() } } @@ -6185,7 +6185,7 @@ pub struct GStaticResource { impl ::std::fmt::Debug for GStaticResource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GStaticResource @ {:p}", self)) + f.debug_struct(&format!("GStaticResource @ {self:p}")) .finish() } } @@ -6206,7 +6206,7 @@ pub struct GTcpConnectionClass { impl ::std::fmt::Debug for GTcpConnectionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTcpConnectionClass @ {:p}", self)) + f.debug_struct(&format!("GTcpConnectionClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -6228,7 +6228,7 @@ pub struct GTcpWrapperConnectionClass { impl ::std::fmt::Debug for GTcpWrapperConnectionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTcpWrapperConnectionClass @ {:p}", self)) + f.debug_struct(&format!("GTcpWrapperConnectionClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -6270,7 +6270,7 @@ pub struct GThreadedSocketServiceClass { impl ::std::fmt::Debug for GThreadedSocketServiceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GThreadedSocketServiceClass @ {:p}", self)) + f.debug_struct(&format!("GThreadedSocketServiceClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("run", &self.run) .field("_g_reserved1", &self._g_reserved1) @@ -6307,7 +6307,7 @@ pub struct GTlsBackendInterface { impl ::std::fmt::Debug for GTlsBackendInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsBackendInterface @ {:p}", self)) + f.debug_struct(&format!("GTlsBackendInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("supports_tls", &self.supports_tls) .field("get_certificate_type", &self.get_certificate_type) @@ -6350,7 +6350,7 @@ pub struct GTlsCertificateClass { impl ::std::fmt::Debug for GTlsCertificateClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsCertificateClass @ {:p}", self)) + f.debug_struct(&format!("GTlsCertificateClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("verify", &self.verify) .finish() @@ -6375,7 +6375,7 @@ pub struct GTlsClientConnectionInterface { impl ::std::fmt::Debug for GTlsClientConnectionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsClientConnectionInterface @ {:p}", self)) + f.debug_struct(&format!("GTlsClientConnectionInterface @ {self:p}")) .field("g_iface", &self.g_iface) .field("copy_session_state", &self.copy_session_state) .finish() @@ -6430,7 +6430,7 @@ pub struct GTlsConnectionClass { impl ::std::fmt::Debug for GTlsConnectionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsConnectionClass @ {:p}", self)) + f.debug_struct(&format!("GTlsConnectionClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("accept_certificate", &self.accept_certificate) .field("handshake", &self.handshake) @@ -6577,7 +6577,7 @@ pub struct GTlsDatabaseClass { impl ::std::fmt::Debug for GTlsDatabaseClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsDatabaseClass @ {:p}", self)) + f.debug_struct(&format!("GTlsDatabaseClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("verify_chain", &self.verify_chain) .field("verify_chain_async", &self.verify_chain_async) @@ -6637,7 +6637,7 @@ pub struct GTlsFileDatabaseInterface { impl ::std::fmt::Debug for GTlsFileDatabaseInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsFileDatabaseInterface @ {:p}", self)) + f.debug_struct(&format!("GTlsFileDatabaseInterface @ {self:p}")) .field("g_iface", &self.g_iface) .finish() } @@ -6702,7 +6702,7 @@ pub struct GTlsInteractionClass { impl ::std::fmt::Debug for GTlsInteractionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsInteractionClass @ {:p}", self)) + f.debug_struct(&format!("GTlsInteractionClass @ {self:p}")) .field("ask_password", &self.ask_password) .field("ask_password_async", &self.ask_password_async) .field("ask_password_finish", &self.ask_password_finish) @@ -6737,7 +6737,7 @@ pub struct GTlsPasswordClass { impl ::std::fmt::Debug for GTlsPasswordClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsPasswordClass @ {:p}", self)) + f.debug_struct(&format!("GTlsPasswordClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_value", &self.get_value) .field("set_value", &self.set_value) @@ -6762,7 +6762,7 @@ pub struct GTlsServerConnectionInterface { impl ::std::fmt::Debug for GTlsServerConnectionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsServerConnectionInterface @ {:p}", self)) + f.debug_struct(&format!("GTlsServerConnectionInterface @ {self:p}")) .field("g_iface", &self.g_iface) .finish() } @@ -6776,7 +6776,7 @@ pub struct GUnixConnectionClass { impl ::std::fmt::Debug for GUnixConnectionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixConnectionClass @ {:p}", self)) + f.debug_struct(&format!("GUnixConnectionClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -6800,7 +6800,7 @@ pub struct GUnixCredentialsMessageClass { impl ::std::fmt::Debug for GUnixCredentialsMessageClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixCredentialsMessageClass @ {:p}", self)) + f.debug_struct(&format!("GUnixCredentialsMessageClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -6829,7 +6829,7 @@ pub struct GUnixFDListClass { impl ::std::fmt::Debug for GUnixFDListClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixFDListClass @ {:p}", self)) + f.debug_struct(&format!("GUnixFDListClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -6858,7 +6858,7 @@ pub struct GUnixFDMessageClass { impl ::std::fmt::Debug for GUnixFDMessageClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixFDMessageClass @ {:p}", self)) + f.debug_struct(&format!("GUnixFDMessageClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -6887,7 +6887,7 @@ pub struct GUnixInputStreamClass { impl ::std::fmt::Debug for GUnixInputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixInputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GUnixInputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -6914,7 +6914,7 @@ pub struct GUnixMountEntry { impl ::std::fmt::Debug for GUnixMountEntry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixMountEntry @ {:p}", self)) + f.debug_struct(&format!("GUnixMountEntry @ {self:p}")) .finish() } } @@ -6935,7 +6935,7 @@ pub struct GUnixMountPoint { impl ::std::fmt::Debug for GUnixMountPoint { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixMountPoint @ {:p}", self)) + f.debug_struct(&format!("GUnixMountPoint @ {self:p}")) .finish() } } @@ -6953,7 +6953,7 @@ pub struct GUnixOutputStreamClass { impl ::std::fmt::Debug for GUnixOutputStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixOutputStreamClass @ {:p}", self)) + f.debug_struct(&format!("GUnixOutputStreamClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_g_reserved1", &self._g_reserved1) .field("_g_reserved2", &self._g_reserved2) @@ -6980,7 +6980,7 @@ pub struct GUnixSocketAddressClass { impl ::std::fmt::Debug for GUnixSocketAddressClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixSocketAddressClass @ {:p}", self)) + f.debug_struct(&format!("GUnixSocketAddressClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -7041,7 +7041,7 @@ pub struct GVfsClass { impl ::std::fmt::Debug for GVfsClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVfsClass @ {:p}", self)) + f.debug_struct(&format!("GVfsClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("is_active", &self.is_active) .field("get_file_for_path", &self.get_file_for_path) @@ -7125,7 +7125,7 @@ pub struct GVolumeIface { impl ::std::fmt::Debug for GVolumeIface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVolumeIface @ {:p}", self)) + f.debug_struct(&format!("GVolumeIface @ {self:p}")) .field("g_iface", &self.g_iface) .field("changed", &self.changed) .field("removed", &self.removed) @@ -7191,7 +7191,7 @@ pub struct GVolumeMonitorClass { impl ::std::fmt::Debug for GVolumeMonitorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVolumeMonitorClass @ {:p}", self)) + f.debug_struct(&format!("GVolumeMonitorClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("volume_added", &self.volume_added) .field("volume_removed", &self.volume_removed) @@ -7230,7 +7230,7 @@ pub struct GZlibCompressorClass { impl ::std::fmt::Debug for GZlibCompressorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GZlibCompressorClass @ {:p}", self)) + f.debug_struct(&format!("GZlibCompressorClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -7244,7 +7244,7 @@ pub struct GZlibDecompressorClass { impl ::std::fmt::Debug for GZlibDecompressorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GZlibDecompressorClass @ {:p}", self)) + f.debug_struct(&format!("GZlibDecompressorClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } @@ -7259,7 +7259,7 @@ pub struct GAppInfoMonitor { impl ::std::fmt::Debug for GAppInfoMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GAppInfoMonitor @ {:p}", self)) + f.debug_struct(&format!("GAppInfoMonitor @ {self:p}")) .finish() } } @@ -7273,7 +7273,7 @@ pub struct GAppLaunchContext { impl ::std::fmt::Debug for GAppLaunchContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GAppLaunchContext @ {:p}", self)) + f.debug_struct(&format!("GAppLaunchContext @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7288,8 +7288,7 @@ pub struct GApplication { impl ::std::fmt::Debug for GApplication { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GApplication @ {:p}", self)) - .finish() + f.debug_struct(&format!("GApplication @ {self:p}")).finish() } } @@ -7302,7 +7301,7 @@ pub struct GApplicationCommandLine { impl ::std::fmt::Debug for GApplicationCommandLine { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GApplicationCommandLine @ {:p}", self)) + f.debug_struct(&format!("GApplicationCommandLine @ {self:p}")) .finish() } } @@ -7316,7 +7315,7 @@ pub struct GBufferedInputStream { impl ::std::fmt::Debug for GBufferedInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBufferedInputStream @ {:p}", self)) + f.debug_struct(&format!("GBufferedInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7331,7 +7330,7 @@ pub struct GBufferedOutputStream { impl ::std::fmt::Debug for GBufferedOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBufferedOutputStream @ {:p}", self)) + f.debug_struct(&format!("GBufferedOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -7346,7 +7345,7 @@ pub struct GBytesIcon { impl ::std::fmt::Debug for GBytesIcon { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBytesIcon @ {:p}", self)).finish() + f.debug_struct(&format!("GBytesIcon @ {self:p}")).finish() } } @@ -7359,7 +7358,7 @@ pub struct GCancellable { impl ::std::fmt::Debug for GCancellable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GCancellable @ {:p}", self)) + f.debug_struct(&format!("GCancellable @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7373,7 +7372,7 @@ pub struct GCharsetConverter { impl ::std::fmt::Debug for GCharsetConverter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GCharsetConverter @ {:p}", self)) + f.debug_struct(&format!("GCharsetConverter @ {self:p}")) .finish() } } @@ -7387,7 +7386,7 @@ pub struct GConverterInputStream { impl ::std::fmt::Debug for GConverterInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GConverterInputStream @ {:p}", self)) + f.debug_struct(&format!("GConverterInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7402,7 +7401,7 @@ pub struct GConverterOutputStream { impl ::std::fmt::Debug for GConverterOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GConverterOutputStream @ {:p}", self)) + f.debug_struct(&format!("GConverterOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7416,8 +7415,7 @@ pub struct GCredentials { impl ::std::fmt::Debug for GCredentials { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GCredentials @ {:p}", self)) - .finish() + f.debug_struct(&format!("GCredentials @ {self:p}")).finish() } } @@ -7429,7 +7427,7 @@ pub struct GDBusActionGroup { impl ::std::fmt::Debug for GDBusActionGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusActionGroup @ {:p}", self)) + f.debug_struct(&format!("GDBusActionGroup @ {self:p}")) .finish() } } @@ -7442,7 +7440,7 @@ pub struct GDBusAuthObserver { impl ::std::fmt::Debug for GDBusAuthObserver { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusAuthObserver @ {:p}", self)) + f.debug_struct(&format!("GDBusAuthObserver @ {self:p}")) .finish() } } @@ -7455,7 +7453,7 @@ pub struct GDBusConnection { impl ::std::fmt::Debug for GDBusConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusConnection @ {:p}", self)) + f.debug_struct(&format!("GDBusConnection @ {self:p}")) .finish() } } @@ -7469,7 +7467,7 @@ pub struct GDBusInterfaceSkeleton { impl ::std::fmt::Debug for GDBusInterfaceSkeleton { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusInterfaceSkeleton @ {:p}", self)) + f.debug_struct(&format!("GDBusInterfaceSkeleton @ {self:p}")) .finish() } } @@ -7482,7 +7480,7 @@ pub struct GDBusMenuModel { impl ::std::fmt::Debug for GDBusMenuModel { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusMenuModel @ {:p}", self)) + f.debug_struct(&format!("GDBusMenuModel @ {self:p}")) .finish() } } @@ -7495,8 +7493,7 @@ pub struct GDBusMessage { impl ::std::fmt::Debug for GDBusMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusMessage @ {:p}", self)) - .finish() + f.debug_struct(&format!("GDBusMessage @ {self:p}")).finish() } } @@ -7508,7 +7505,7 @@ pub struct GDBusMethodInvocation { impl ::std::fmt::Debug for GDBusMethodInvocation { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusMethodInvocation @ {:p}", self)) + f.debug_struct(&format!("GDBusMethodInvocation @ {self:p}")) .finish() } } @@ -7522,7 +7519,7 @@ pub struct GDBusObjectManagerClient { impl ::std::fmt::Debug for GDBusObjectManagerClient { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectManagerClient @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectManagerClient @ {self:p}")) .finish() } } @@ -7536,7 +7533,7 @@ pub struct GDBusObjectManagerServer { impl ::std::fmt::Debug for GDBusObjectManagerServer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectManagerServer @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectManagerServer @ {self:p}")) .finish() } } @@ -7550,7 +7547,7 @@ pub struct GDBusObjectProxy { impl ::std::fmt::Debug for GDBusObjectProxy { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectProxy @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectProxy @ {self:p}")) .finish() } } @@ -7564,7 +7561,7 @@ pub struct GDBusObjectSkeleton { impl ::std::fmt::Debug for GDBusObjectSkeleton { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusObjectSkeleton @ {:p}", self)) + f.debug_struct(&format!("GDBusObjectSkeleton @ {self:p}")) .finish() } } @@ -7578,7 +7575,7 @@ pub struct GDBusProxy { impl ::std::fmt::Debug for GDBusProxy { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusProxy @ {:p}", self)).finish() + f.debug_struct(&format!("GDBusProxy @ {self:p}")).finish() } } @@ -7590,8 +7587,7 @@ pub struct GDBusServer { impl ::std::fmt::Debug for GDBusServer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDBusServer @ {:p}", self)) - .finish() + f.debug_struct(&format!("GDBusServer @ {self:p}")).finish() } } @@ -7604,7 +7600,7 @@ pub struct GDataInputStream { impl ::std::fmt::Debug for GDataInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDataInputStream @ {:p}", self)) + f.debug_struct(&format!("GDataInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7619,7 +7615,7 @@ pub struct GDataOutputStream { impl ::std::fmt::Debug for GDataOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDataOutputStream @ {:p}", self)) + f.debug_struct(&format!("GDataOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7633,7 +7629,7 @@ pub struct GDebugControllerDBus { impl ::std::fmt::Debug for GDebugControllerDBus { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDebugControllerDBus @ {:p}", self)) + f.debug_struct(&format!("GDebugControllerDBus @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7647,7 +7643,7 @@ pub struct GDesktopAppInfo { impl ::std::fmt::Debug for GDesktopAppInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDesktopAppInfo @ {:p}", self)) + f.debug_struct(&format!("GDesktopAppInfo @ {self:p}")) .finish() } } @@ -7660,7 +7656,7 @@ pub struct GEmblem { impl ::std::fmt::Debug for GEmblem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GEmblem @ {:p}", self)).finish() + f.debug_struct(&format!("GEmblem @ {self:p}")).finish() } } @@ -7673,7 +7669,7 @@ pub struct GEmblemedIcon { impl ::std::fmt::Debug for GEmblemedIcon { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GEmblemedIcon @ {:p}", self)) + f.debug_struct(&format!("GEmblemedIcon @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7688,7 +7684,7 @@ pub struct GFileEnumerator { impl ::std::fmt::Debug for GFileEnumerator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileEnumerator @ {:p}", self)) + f.debug_struct(&format!("GFileEnumerator @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7703,7 +7699,7 @@ pub struct GFileIOStream { impl ::std::fmt::Debug for GFileIOStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileIOStream @ {:p}", self)) + f.debug_struct(&format!("GFileIOStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7717,7 +7713,7 @@ pub struct GFileIcon { impl ::std::fmt::Debug for GFileIcon { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileIcon @ {:p}", self)).finish() + f.debug_struct(&format!("GFileIcon @ {self:p}")).finish() } } @@ -7729,7 +7725,7 @@ pub struct GFileInfo { impl ::std::fmt::Debug for GFileInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileInfo @ {:p}", self)).finish() + f.debug_struct(&format!("GFileInfo @ {self:p}")).finish() } } @@ -7742,7 +7738,7 @@ pub struct GFileInputStream { impl ::std::fmt::Debug for GFileInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileInputStream @ {:p}", self)) + f.debug_struct(&format!("GFileInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7757,7 +7753,7 @@ pub struct GFileMonitor { impl ::std::fmt::Debug for GFileMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileMonitor @ {:p}", self)) + f.debug_struct(&format!("GFileMonitor @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7772,7 +7768,7 @@ pub struct GFileOutputStream { impl ::std::fmt::Debug for GFileOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFileOutputStream @ {:p}", self)) + f.debug_struct(&format!("GFileOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7786,7 +7782,7 @@ pub struct GFilenameCompleter { impl ::std::fmt::Debug for GFilenameCompleter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFilenameCompleter @ {:p}", self)) + f.debug_struct(&format!("GFilenameCompleter @ {self:p}")) .finish() } } @@ -7800,7 +7796,7 @@ pub struct GFilterInputStream { impl ::std::fmt::Debug for GFilterInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFilterInputStream @ {:p}", self)) + f.debug_struct(&format!("GFilterInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("base_stream", &self.base_stream) .finish() @@ -7816,7 +7812,7 @@ pub struct GFilterOutputStream { impl ::std::fmt::Debug for GFilterOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFilterOutputStream @ {:p}", self)) + f.debug_struct(&format!("GFilterOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("base_stream", &self.base_stream) .finish() @@ -7831,7 +7827,7 @@ pub struct GIOModule { impl ::std::fmt::Debug for GIOModule { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GIOModule @ {:p}", self)).finish() + f.debug_struct(&format!("GIOModule @ {self:p}")).finish() } } @@ -7844,7 +7840,7 @@ pub struct GIOStream { impl ::std::fmt::Debug for GIOStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GIOStream @ {:p}", self)) + f.debug_struct(&format!("GIOStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7859,7 +7855,7 @@ pub struct GInetAddress { impl ::std::fmt::Debug for GInetAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInetAddress @ {:p}", self)) + f.debug_struct(&format!("GInetAddress @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7874,7 +7870,7 @@ pub struct GInetAddressMask { impl ::std::fmt::Debug for GInetAddressMask { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInetAddressMask @ {:p}", self)) + f.debug_struct(&format!("GInetAddressMask @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7889,7 +7885,7 @@ pub struct GInetSocketAddress { impl ::std::fmt::Debug for GInetSocketAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInetSocketAddress @ {:p}", self)) + f.debug_struct(&format!("GInetSocketAddress @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7904,7 +7900,7 @@ pub struct GInputStream { impl ::std::fmt::Debug for GInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInputStream @ {:p}", self)) + f.debug_struct(&format!("GInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7918,7 +7914,7 @@ pub struct GListStore { impl ::std::fmt::Debug for GListStore { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GListStore @ {:p}", self)).finish() + f.debug_struct(&format!("GListStore @ {self:p}")).finish() } } @@ -7931,7 +7927,7 @@ pub struct GMemoryInputStream { impl ::std::fmt::Debug for GMemoryInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMemoryInputStream @ {:p}", self)) + f.debug_struct(&format!("GMemoryInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7946,7 +7942,7 @@ pub struct GMemoryOutputStream { impl ::std::fmt::Debug for GMemoryOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMemoryOutputStream @ {:p}", self)) + f.debug_struct(&format!("GMemoryOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -7960,7 +7956,7 @@ pub struct GMenu { impl ::std::fmt::Debug for GMenu { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenu @ {:p}", self)).finish() + f.debug_struct(&format!("GMenu @ {self:p}")).finish() } } @@ -7973,7 +7969,7 @@ pub struct GMenuAttributeIter { impl ::std::fmt::Debug for GMenuAttributeIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenuAttributeIter @ {:p}", self)) + f.debug_struct(&format!("GMenuAttributeIter @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -7988,7 +7984,7 @@ pub struct GMenuItem { impl ::std::fmt::Debug for GMenuItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenuItem @ {:p}", self)).finish() + f.debug_struct(&format!("GMenuItem @ {self:p}")).finish() } } @@ -8001,7 +7997,7 @@ pub struct GMenuLinkIter { impl ::std::fmt::Debug for GMenuLinkIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenuLinkIter @ {:p}", self)) + f.debug_struct(&format!("GMenuLinkIter @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8017,7 +8013,7 @@ pub struct GMenuModel { impl ::std::fmt::Debug for GMenuModel { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMenuModel @ {:p}", self)) + f.debug_struct(&format!("GMenuModel @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8033,7 +8029,7 @@ pub struct GMountOperation { impl ::std::fmt::Debug for GMountOperation { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMountOperation @ {:p}", self)) + f.debug_struct(&format!("GMountOperation @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8049,7 +8045,7 @@ pub struct GNativeSocketAddress { impl ::std::fmt::Debug for GNativeSocketAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNativeSocketAddress @ {:p}", self)) + f.debug_struct(&format!("GNativeSocketAddress @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8063,7 +8059,7 @@ pub struct GNativeVolumeMonitor { impl ::std::fmt::Debug for GNativeVolumeMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNativeVolumeMonitor @ {:p}", self)) + f.debug_struct(&format!("GNativeVolumeMonitor @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8078,7 +8074,7 @@ pub struct GNetworkAddress { impl ::std::fmt::Debug for GNetworkAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNetworkAddress @ {:p}", self)) + f.debug_struct(&format!("GNetworkAddress @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8093,7 +8089,7 @@ pub struct GNetworkService { impl ::std::fmt::Debug for GNetworkService { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNetworkService @ {:p}", self)) + f.debug_struct(&format!("GNetworkService @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8107,7 +8103,7 @@ pub struct GNotification { impl ::std::fmt::Debug for GNotification { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNotification @ {:p}", self)) + f.debug_struct(&format!("GNotification @ {self:p}")) .finish() } } @@ -8121,7 +8117,7 @@ pub struct GOutputStream { impl ::std::fmt::Debug for GOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GOutputStream @ {:p}", self)) + f.debug_struct(&format!("GOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8136,7 +8132,7 @@ pub struct GPermission { impl ::std::fmt::Debug for GPermission { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPermission @ {:p}", self)) + f.debug_struct(&format!("GPermission @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8150,7 +8146,7 @@ pub struct GPropertyAction { impl ::std::fmt::Debug for GPropertyAction { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPropertyAction @ {:p}", self)) + f.debug_struct(&format!("GPropertyAction @ {self:p}")) .finish() } } @@ -8164,7 +8160,7 @@ pub struct GProxyAddress { impl ::std::fmt::Debug for GProxyAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GProxyAddress @ {:p}", self)) + f.debug_struct(&format!("GProxyAddress @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8179,7 +8175,7 @@ pub struct GProxyAddressEnumerator { impl ::std::fmt::Debug for GProxyAddressEnumerator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GProxyAddressEnumerator @ {:p}", self)) + f.debug_struct(&format!("GProxyAddressEnumerator @ {self:p}")) .finish() } } @@ -8193,7 +8189,7 @@ pub struct GResolver { impl ::std::fmt::Debug for GResolver { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GResolver @ {:p}", self)) + f.debug_struct(&format!("GResolver @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8209,7 +8205,7 @@ pub struct GSettings { impl ::std::fmt::Debug for GSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSettings @ {:p}", self)) + f.debug_struct(&format!("GSettings @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8225,7 +8221,7 @@ pub struct GSettingsBackend { impl ::std::fmt::Debug for GSettingsBackend { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSettingsBackend @ {:p}", self)) + f.debug_struct(&format!("GSettingsBackend @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8239,7 +8235,7 @@ pub struct GSimpleAction { impl ::std::fmt::Debug for GSimpleAction { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimpleAction @ {:p}", self)) + f.debug_struct(&format!("GSimpleAction @ {self:p}")) .finish() } } @@ -8253,7 +8249,7 @@ pub struct GSimpleActionGroup { impl ::std::fmt::Debug for GSimpleActionGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimpleActionGroup @ {:p}", self)) + f.debug_struct(&format!("GSimpleActionGroup @ {self:p}")) .finish() } } @@ -8266,7 +8262,7 @@ pub struct GSimpleAsyncResult { impl ::std::fmt::Debug for GSimpleAsyncResult { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimpleAsyncResult @ {:p}", self)) + f.debug_struct(&format!("GSimpleAsyncResult @ {self:p}")) .finish() } } @@ -8279,7 +8275,7 @@ pub struct GSimpleIOStream { impl ::std::fmt::Debug for GSimpleIOStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimpleIOStream @ {:p}", self)) + f.debug_struct(&format!("GSimpleIOStream @ {self:p}")) .finish() } } @@ -8292,7 +8288,7 @@ pub struct GSimplePermission { impl ::std::fmt::Debug for GSimplePermission { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimplePermission @ {:p}", self)) + f.debug_struct(&format!("GSimplePermission @ {self:p}")) .finish() } } @@ -8306,7 +8302,7 @@ pub struct GSimpleProxyResolver { impl ::std::fmt::Debug for GSimpleProxyResolver { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSimpleProxyResolver @ {:p}", self)) + f.debug_struct(&format!("GSimpleProxyResolver @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8321,7 +8317,7 @@ pub struct GSocket { impl ::std::fmt::Debug for GSocket { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocket @ {:p}", self)) + f.debug_struct(&format!("GSocket @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8336,7 +8332,7 @@ pub struct GSocketAddress { impl ::std::fmt::Debug for GSocketAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketAddress @ {:p}", self)) + f.debug_struct(&format!("GSocketAddress @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8350,7 +8346,7 @@ pub struct GSocketAddressEnumerator { impl ::std::fmt::Debug for GSocketAddressEnumerator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketAddressEnumerator @ {:p}", self)) + f.debug_struct(&format!("GSocketAddressEnumerator @ {self:p}")) .finish() } } @@ -8364,7 +8360,7 @@ pub struct GSocketClient { impl ::std::fmt::Debug for GSocketClient { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketClient @ {:p}", self)) + f.debug_struct(&format!("GSocketClient @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8380,7 +8376,7 @@ pub struct GSocketConnection { impl ::std::fmt::Debug for GSocketConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketConnection @ {:p}", self)) + f.debug_struct(&format!("GSocketConnection @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8396,7 +8392,7 @@ pub struct GSocketControlMessage { impl ::std::fmt::Debug for GSocketControlMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketControlMessage @ {:p}", self)) + f.debug_struct(&format!("GSocketControlMessage @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8412,7 +8408,7 @@ pub struct GSocketListener { impl ::std::fmt::Debug for GSocketListener { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketListener @ {:p}", self)) + f.debug_struct(&format!("GSocketListener @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8428,7 +8424,7 @@ pub struct GSocketService { impl ::std::fmt::Debug for GSocketService { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSocketService @ {:p}", self)) + f.debug_struct(&format!("GSocketService @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8443,8 +8439,7 @@ pub struct GSubprocess { impl ::std::fmt::Debug for GSubprocess { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSubprocess @ {:p}", self)) - .finish() + f.debug_struct(&format!("GSubprocess @ {self:p}")).finish() } } @@ -8456,7 +8451,7 @@ pub struct GSubprocessLauncher { impl ::std::fmt::Debug for GSubprocessLauncher { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSubprocessLauncher @ {:p}", self)) + f.debug_struct(&format!("GSubprocessLauncher @ {self:p}")) .finish() } } @@ -8469,7 +8464,7 @@ pub struct GTask { impl ::std::fmt::Debug for GTask { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTask @ {:p}", self)).finish() + f.debug_struct(&format!("GTask @ {self:p}")).finish() } } @@ -8482,7 +8477,7 @@ pub struct GTcpConnection { impl ::std::fmt::Debug for GTcpConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTcpConnection @ {:p}", self)) + f.debug_struct(&format!("GTcpConnection @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8498,7 +8493,7 @@ pub struct GTcpWrapperConnection { impl ::std::fmt::Debug for GTcpWrapperConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTcpWrapperConnection @ {:p}", self)) + f.debug_struct(&format!("GTcpWrapperConnection @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8513,7 +8508,7 @@ pub struct GTestDBus { impl ::std::fmt::Debug for GTestDBus { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTestDBus @ {:p}", self)).finish() + f.debug_struct(&format!("GTestDBus @ {self:p}")).finish() } } @@ -8525,8 +8520,7 @@ pub struct GThemedIcon { impl ::std::fmt::Debug for GThemedIcon { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GThemedIcon @ {:p}", self)) - .finish() + f.debug_struct(&format!("GThemedIcon @ {self:p}")).finish() } } @@ -8539,7 +8533,7 @@ pub struct GThreadedSocketService { impl ::std::fmt::Debug for GThreadedSocketService { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GThreadedSocketService @ {:p}", self)) + f.debug_struct(&format!("GThreadedSocketService @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8555,7 +8549,7 @@ pub struct GTlsCertificate { impl ::std::fmt::Debug for GTlsCertificate { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsCertificate @ {:p}", self)) + f.debug_struct(&format!("GTlsCertificate @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8571,7 +8565,7 @@ pub struct GTlsConnection { impl ::std::fmt::Debug for GTlsConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsConnection @ {:p}", self)) + f.debug_struct(&format!("GTlsConnection @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8587,7 +8581,7 @@ pub struct GTlsDatabase { impl ::std::fmt::Debug for GTlsDatabase { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsDatabase @ {:p}", self)) + f.debug_struct(&format!("GTlsDatabase @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8603,7 +8597,7 @@ pub struct GTlsInteraction { impl ::std::fmt::Debug for GTlsInteraction { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsInteraction @ {:p}", self)) + f.debug_struct(&format!("GTlsInteraction @ {self:p}")) .finish() } } @@ -8617,7 +8611,7 @@ pub struct GTlsPassword { impl ::std::fmt::Debug for GTlsPassword { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTlsPassword @ {:p}", self)) + f.debug_struct(&format!("GTlsPassword @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8633,7 +8627,7 @@ pub struct GUnixConnection { impl ::std::fmt::Debug for GUnixConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixConnection @ {:p}", self)) + f.debug_struct(&format!("GUnixConnection @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8649,7 +8643,7 @@ pub struct GUnixCredentialsMessage { impl ::std::fmt::Debug for GUnixCredentialsMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixCredentialsMessage @ {:p}", self)) + f.debug_struct(&format!("GUnixCredentialsMessage @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8665,7 +8659,7 @@ pub struct GUnixFDList { impl ::std::fmt::Debug for GUnixFDList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixFDList @ {:p}", self)) + f.debug_struct(&format!("GUnixFDList @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8681,7 +8675,7 @@ pub struct GUnixFDMessage { impl ::std::fmt::Debug for GUnixFDMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixFDMessage @ {:p}", self)) + f.debug_struct(&format!("GUnixFDMessage @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("priv_", &self.priv_) .finish() @@ -8697,7 +8691,7 @@ pub struct GUnixInputStream { impl ::std::fmt::Debug for GUnixInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixInputStream @ {:p}", self)) + f.debug_struct(&format!("GUnixInputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8711,7 +8705,7 @@ pub struct GUnixMountMonitor { impl ::std::fmt::Debug for GUnixMountMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixMountMonitor @ {:p}", self)) + f.debug_struct(&format!("GUnixMountMonitor @ {self:p}")) .finish() } } @@ -8725,7 +8719,7 @@ pub struct GUnixOutputStream { impl ::std::fmt::Debug for GUnixOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixOutputStream @ {:p}", self)) + f.debug_struct(&format!("GUnixOutputStream @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8740,7 +8734,7 @@ pub struct GUnixSocketAddress { impl ::std::fmt::Debug for GUnixSocketAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUnixSocketAddress @ {:p}", self)) + f.debug_struct(&format!("GUnixSocketAddress @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8754,7 +8748,7 @@ pub struct GVfs { impl ::std::fmt::Debug for GVfs { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVfs @ {:p}", self)) + f.debug_struct(&format!("GVfs @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8769,7 +8763,7 @@ pub struct GVolumeMonitor { impl ::std::fmt::Debug for GVolumeMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVolumeMonitor @ {:p}", self)) + f.debug_struct(&format!("GVolumeMonitor @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -8783,7 +8777,7 @@ pub struct GZlibCompressor { impl ::std::fmt::Debug for GZlibCompressor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GZlibCompressor @ {:p}", self)) + f.debug_struct(&format!("GZlibCompressor @ {self:p}")) .finish() } } @@ -8796,7 +8790,7 @@ pub struct GZlibDecompressor { impl ::std::fmt::Debug for GZlibDecompressor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GZlibDecompressor @ {:p}", self)) + f.debug_struct(&format!("GZlibDecompressor @ {self:p}")) .finish() } } @@ -8810,7 +8804,7 @@ pub struct GAction { impl ::std::fmt::Debug for GAction { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GAction @ {:p}", self) + write!(f, "GAction @ {self:p}") } } @@ -8822,7 +8816,7 @@ pub struct GActionGroup { impl ::std::fmt::Debug for GActionGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GActionGroup @ {:p}", self) + write!(f, "GActionGroup @ {self:p}") } } @@ -8834,7 +8828,7 @@ pub struct GActionMap { impl ::std::fmt::Debug for GActionMap { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GActionMap @ {:p}", self) + write!(f, "GActionMap @ {self:p}") } } @@ -8846,7 +8840,7 @@ pub struct GAppInfo { impl ::std::fmt::Debug for GAppInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GAppInfo @ {:p}", self) + write!(f, "GAppInfo @ {self:p}") } } @@ -8858,7 +8852,7 @@ pub struct GAsyncInitable { impl ::std::fmt::Debug for GAsyncInitable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GAsyncInitable @ {:p}", self) + write!(f, "GAsyncInitable @ {self:p}") } } @@ -8870,7 +8864,7 @@ pub struct GAsyncResult { impl ::std::fmt::Debug for GAsyncResult { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GAsyncResult @ {:p}", self) + write!(f, "GAsyncResult @ {self:p}") } } @@ -8882,7 +8876,7 @@ pub struct GConverter { impl ::std::fmt::Debug for GConverter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GConverter @ {:p}", self) + write!(f, "GConverter @ {self:p}") } } @@ -8894,7 +8888,7 @@ pub struct GDBusInterface { impl ::std::fmt::Debug for GDBusInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDBusInterface @ {:p}", self) + write!(f, "GDBusInterface @ {self:p}") } } @@ -8906,7 +8900,7 @@ pub struct GDBusObject { impl ::std::fmt::Debug for GDBusObject { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDBusObject @ {:p}", self) + write!(f, "GDBusObject @ {self:p}") } } @@ -8918,7 +8912,7 @@ pub struct GDBusObjectManager { impl ::std::fmt::Debug for GDBusObjectManager { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDBusObjectManager @ {:p}", self) + write!(f, "GDBusObjectManager @ {self:p}") } } @@ -8930,7 +8924,7 @@ pub struct GDatagramBased { impl ::std::fmt::Debug for GDatagramBased { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDatagramBased @ {:p}", self) + write!(f, "GDatagramBased @ {self:p}") } } @@ -8942,7 +8936,7 @@ pub struct GDebugController { impl ::std::fmt::Debug for GDebugController { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDebugController @ {:p}", self) + write!(f, "GDebugController @ {self:p}") } } @@ -8954,7 +8948,7 @@ pub struct GDesktopAppInfoLookup { impl ::std::fmt::Debug for GDesktopAppInfoLookup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDesktopAppInfoLookup @ {:p}", self) + write!(f, "GDesktopAppInfoLookup @ {self:p}") } } @@ -8966,7 +8960,7 @@ pub struct GDrive { impl ::std::fmt::Debug for GDrive { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDrive @ {:p}", self) + write!(f, "GDrive @ {self:p}") } } @@ -8978,7 +8972,7 @@ pub struct GDtlsClientConnection { impl ::std::fmt::Debug for GDtlsClientConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDtlsClientConnection @ {:p}", self) + write!(f, "GDtlsClientConnection @ {self:p}") } } @@ -8990,7 +8984,7 @@ pub struct GDtlsConnection { impl ::std::fmt::Debug for GDtlsConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDtlsConnection @ {:p}", self) + write!(f, "GDtlsConnection @ {self:p}") } } @@ -9002,7 +8996,7 @@ pub struct GDtlsServerConnection { impl ::std::fmt::Debug for GDtlsServerConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GDtlsServerConnection @ {:p}", self) + write!(f, "GDtlsServerConnection @ {self:p}") } } @@ -9014,7 +9008,7 @@ pub struct GFile { impl ::std::fmt::Debug for GFile { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GFile @ {:p}", self) + write!(f, "GFile @ {self:p}") } } @@ -9026,7 +9020,7 @@ pub struct GFileDescriptorBased { impl ::std::fmt::Debug for GFileDescriptorBased { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GFileDescriptorBased @ {:p}", self) + write!(f, "GFileDescriptorBased @ {self:p}") } } @@ -9038,7 +9032,7 @@ pub struct GIcon { impl ::std::fmt::Debug for GIcon { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GIcon @ {:p}", self) + write!(f, "GIcon @ {self:p}") } } @@ -9050,7 +9044,7 @@ pub struct GInitable { impl ::std::fmt::Debug for GInitable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GInitable @ {:p}", self) + write!(f, "GInitable @ {self:p}") } } @@ -9062,7 +9056,7 @@ pub struct GListModel { impl ::std::fmt::Debug for GListModel { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GListModel @ {:p}", self) + write!(f, "GListModel @ {self:p}") } } @@ -9074,7 +9068,7 @@ pub struct GLoadableIcon { impl ::std::fmt::Debug for GLoadableIcon { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GLoadableIcon @ {:p}", self) + write!(f, "GLoadableIcon @ {self:p}") } } @@ -9086,7 +9080,7 @@ pub struct GMemoryMonitor { impl ::std::fmt::Debug for GMemoryMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GMemoryMonitor @ {:p}", self) + write!(f, "GMemoryMonitor @ {self:p}") } } @@ -9098,7 +9092,7 @@ pub struct GMount { impl ::std::fmt::Debug for GMount { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GMount @ {:p}", self) + write!(f, "GMount @ {self:p}") } } @@ -9110,7 +9104,7 @@ pub struct GNetworkMonitor { impl ::std::fmt::Debug for GNetworkMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GNetworkMonitor @ {:p}", self) + write!(f, "GNetworkMonitor @ {self:p}") } } @@ -9122,7 +9116,7 @@ pub struct GPollableInputStream { impl ::std::fmt::Debug for GPollableInputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GPollableInputStream @ {:p}", self) + write!(f, "GPollableInputStream @ {self:p}") } } @@ -9134,7 +9128,7 @@ pub struct GPollableOutputStream { impl ::std::fmt::Debug for GPollableOutputStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GPollableOutputStream @ {:p}", self) + write!(f, "GPollableOutputStream @ {self:p}") } } @@ -9146,7 +9140,7 @@ pub struct GPowerProfileMonitor { impl ::std::fmt::Debug for GPowerProfileMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GPowerProfileMonitor @ {:p}", self) + write!(f, "GPowerProfileMonitor @ {self:p}") } } @@ -9158,7 +9152,7 @@ pub struct GProxy { impl ::std::fmt::Debug for GProxy { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GProxy @ {:p}", self) + write!(f, "GProxy @ {self:p}") } } @@ -9170,7 +9164,7 @@ pub struct GProxyResolver { impl ::std::fmt::Debug for GProxyResolver { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GProxyResolver @ {:p}", self) + write!(f, "GProxyResolver @ {self:p}") } } @@ -9182,7 +9176,7 @@ pub struct GRemoteActionGroup { impl ::std::fmt::Debug for GRemoteActionGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GRemoteActionGroup @ {:p}", self) + write!(f, "GRemoteActionGroup @ {self:p}") } } @@ -9194,7 +9188,7 @@ pub struct GSeekable { impl ::std::fmt::Debug for GSeekable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GSeekable @ {:p}", self) + write!(f, "GSeekable @ {self:p}") } } @@ -9206,7 +9200,7 @@ pub struct GSocketConnectable { impl ::std::fmt::Debug for GSocketConnectable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GSocketConnectable @ {:p}", self) + write!(f, "GSocketConnectable @ {self:p}") } } @@ -9218,7 +9212,7 @@ pub struct GTlsBackend { impl ::std::fmt::Debug for GTlsBackend { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GTlsBackend @ {:p}", self) + write!(f, "GTlsBackend @ {self:p}") } } @@ -9230,7 +9224,7 @@ pub struct GTlsClientConnection { impl ::std::fmt::Debug for GTlsClientConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GTlsClientConnection @ {:p}", self) + write!(f, "GTlsClientConnection @ {self:p}") } } @@ -9242,7 +9236,7 @@ pub struct GTlsFileDatabase { impl ::std::fmt::Debug for GTlsFileDatabase { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GTlsFileDatabase @ {:p}", self) + write!(f, "GTlsFileDatabase @ {self:p}") } } @@ -9254,7 +9248,7 @@ pub struct GTlsServerConnection { impl ::std::fmt::Debug for GTlsServerConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GTlsServerConnection @ {:p}", self) + write!(f, "GTlsServerConnection @ {self:p}") } } @@ -9266,7 +9260,7 @@ pub struct GVolume { impl ::std::fmt::Debug for GVolume { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GVolume @ {:p}", self) + write!(f, "GVolume @ {self:p}") } } diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index 651e606eb1b2..83a0853fbf03 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 952ff416b599) +Generated by gir (https://github.com/gtk-rs/gir @ f0e953c094a5) from gir-files (https://github.com/gtk-rs/gir-files @ 89a11aa6a362) diff --git a/glib-build-tools/src/lib.rs b/glib-build-tools/src/lib.rs index eccfbad9c520..153a4e86145b 100644 --- a/glib-build-tools/src/lib.rs +++ b/glib-build-tools/src/lib.rs @@ -24,18 +24,17 @@ pub fn compile_resources>(source_dir: P, gresource: &str, target: .arg("--sourcedir") .arg(source_dir.as_ref()) .arg("--target") - .arg(&format!("{}/{}", out_dir, target)) + .arg(&format!("{out_dir}/{target}")) .arg(gresource) .status() .unwrap(); assert!( status.success(), - "glib-compile-resources failed with exit status {}", - status + "glib-compile-resources failed with exit status {status}", ); - println!("cargo:rerun-if-changed={}", gresource); + println!("cargo:rerun-if-changed={gresource}"); let output = Command::new("glib-compile-resources") .arg("--sourcedir") .arg(source_dir.as_ref()) @@ -46,6 +45,6 @@ pub fn compile_resources>(source_dir: P, gresource: &str, target: .stdout; let output = String::from_utf8(output).unwrap(); for dep in output.split_whitespace() { - println!("cargo:rerun-if-changed={}", dep); + println!("cargo:rerun-if-changed={dep}"); } } diff --git a/glib-macros/src/clone.rs b/glib-macros/src/clone.rs index 69b565fc9d23..58562ad2913b 100644 --- a/glib-macros/src/clone.rs +++ b/glib-macros/src/clone.rs @@ -33,7 +33,7 @@ impl WrapperKind { fn to_str(&self) -> String { match *self { Self::DefaultPanic => "@default-panic".to_owned(), - Self::DefaultReturn(ref r) => format!("@default-return {}", r), + Self::DefaultReturn(ref r) => format!("@default-return {r}"), } } @@ -231,9 +231,9 @@ fn full_ident(parts: &mut Peekable, borrow_kind: BorrowKind) -> String name.push('.'); parts.next(); } else if name.is_empty() { - panic!("Expected ident, found `{}`", p_s); + panic!("Expected ident, found `{p_s}`"); } else { - panic!("Expected ident, found `{}` after `{}`", p_s, name); + panic!("Expected ident, found `{p_s}` after `{name}`"); } } Some(TokenTree::Ident(i)) => { @@ -244,9 +244,9 @@ fn full_ident(parts: &mut Peekable, borrow_kind: BorrowKind) -> String name.push_str(&i.to_string()); parts.next(); } - Some(x) if name.is_empty() => panic!("Expected ident, found `{}`", x), - Some(x) => panic!("Expected ident, found `{}` after `{}`", x, name), - None => panic!("Unexpected end after ident `{}`", name), + Some(x) if name.is_empty() => panic!("Expected ident, found `{x}`"), + Some(x) => panic!("Expected ident, found `{x}` after `{name}`"), + None => panic!("Unexpected end after ident `{name}`"), } } assert!( @@ -300,8 +300,7 @@ fn parse_ident(parts: &mut Peekable, elements: &mut Vec) "default-return" => panic!("`@default-return` should be after `=>`"), "default-panic" => panic!("`@default-panic` should be after `=>`"), k => panic!( - "Unknown keyword `{}`, only `weak`, `weak-allow-none`, `to-owned` and `strong` are allowed", - k, + "Unknown keyword `{k}`, only `weak`, `weak-allow-none`, `to-owned` and `strong` are allowed", ), }; let name = full_ident(parts, borrow_kind); @@ -310,11 +309,11 @@ fn parse_ident(parts: &mut Peekable, elements: &mut Vec) parts.next(); match parts.next() { Some(TokenTree::Ident(i)) => Some(i.to_string()), - Some(x) => panic!("Expected ident after `as` keyword, found `{}`", x), + Some(x) => panic!("Expected ident after `as` keyword, found `{x}`"), None => panic!("Unexpected end after `as` keyword"), } } - Some(TokenTree::Ident(p)) => panic!("Unexpected `{}`", p), + Some(TokenTree::Ident(p)) => panic!("Unexpected `{p}`"), _ => None, }; if name == "self" && alias.is_none() { @@ -323,11 +322,10 @@ fn parse_ident(parts: &mut Peekable, elements: &mut Vec) rename it using `as`." ); } else { - assert!(!name.ends_with('.'), "Invalid variable name: `{}`", name); + assert!(!name.ends_with('.'), "Invalid variable name: `{name}`"); assert!( !name.contains('.') || alias.is_some(), - "`{}`: Field accesses are not allowed as is, you must rename it!", - name + "`{name}`: Field accesses are not allowed as is, you must rename it!", ); } elements.push(ElemToClone { @@ -384,7 +382,7 @@ fn expr(parts: &mut Peekable) -> String { "[" | "{" | "(" => { total += 1; } - x => panic!("Unexpected token `{}` after `@default-return`", x), + x => panic!("Unexpected token `{x}` after `@default-return`"), }, Some(TokenTree::Group(g)) => return group_to_string(&g), None => panic!("Unexpected end after `@default-return`"), @@ -412,8 +410,7 @@ fn expr(parts: &mut Peekable) -> String { ret.push_str(&x.to_string()) } None => panic!( - "Unexpected end after `{}`. Did you forget a `,` after the @default-return value?", - ret + "Unexpected end after `{ret}`. Did you forget a `,` after the @default-return value?", ), } parts.next(); @@ -427,10 +424,10 @@ fn return_kind(parts: &mut Peekable) -> WrapperKind { parts, ) { Err(TokenCheck::UnexpectedToken(tokens, unexpected_token)) => { - panic!("Unknown keyword `{}{}`", tokens, unexpected_token); + panic!("Unknown keyword `{tokens}{unexpected_token}`"); } Err(TokenCheck::UnexpectedEnd(tokens)) => { - panic!("Unexpected end after tokens `{}`", tokens); + panic!("Unexpected end after tokens `{tokens}`"); } Ok(()) => {} } @@ -440,9 +437,9 @@ fn return_kind(parts: &mut Peekable) -> WrapperKind { if i_s == "panic" { return WrapperKind::DefaultPanic; } - assert!(i_s == "return", "Unknown keyword `@default-{}`", i_s); + assert!(i_s == "return", "Unknown keyword `@default-{i_s}`"); } - Some(x) => panic!("Unknown token `{}` after `@default-`", x), + Some(x) => panic!("Unknown token `{x}` after `@default-`",), None => panic!("Unexpected end after `@default-`"), } WrapperKind::DefaultReturn(expr(parts)) @@ -459,13 +456,12 @@ fn parse_return_kind(parts: &mut Peekable) -> Option { match check_tokens(&[SimpleToken::Punct(",")], parts) { Err(TokenCheck::UnexpectedToken(_, unexpected_token)) => { panic!( - "Expected `,` after `{}`, found `{}`", + "Expected `,` after `{}`, found `{unexpected_token}`", ret.to_str(), - unexpected_token ); } Err(TokenCheck::UnexpectedEnd(tokens)) => { - panic!("Expected `,` after `{}{}`", ret.to_str(), tokens); + panic!("Expected `,` after `{}{tokens}`", ret.to_str()); } Ok(()) => {} } @@ -494,10 +490,10 @@ fn check_move_after_async(parts: &mut Peekable) { Some(TokenTree::Ident(i)) if i.to_string() == "move" => {} // The next checks are just for better error messages. Some(TokenTree::Ident(i)) => { - panic!("Expected `move` after `async`, found `{}`", i); + panic!("Expected `move` after `async`, found `{i}`"); } Some(TokenTree::Punct(p)) => { - panic!("Expected `move` after `async`, found `{}`", p); + panic!("Expected `move` after `async`, found `{p}`"); } Some(TokenTree::Group(g)) => { panic!( @@ -517,10 +513,7 @@ fn check_async_syntax(parts: &mut Peekable) -> BlockKind { BlockKind::AsyncClosure(closure(parts)) } Some(TokenTree::Punct(p)) => { - panic!( - "Expected closure or block after `async move`, found `{}`", - p - ); + panic!("Expected closure or block after `async move`, found `{p}`",); } Some(TokenTree::Group(g)) if g.delimiter() == Delimiter::Brace => BlockKind::AsyncBlock, Some(TokenTree::Group(g)) => { @@ -553,7 +546,7 @@ fn check_before_closure(parts: &mut Peekable) -> BlockKind { } match parts.next() { Some(TokenTree::Punct(p)) if p.to_string() == "|" => {} - Some(x) => panic!("Expected closure, found `{}`", x), + Some(x) => panic!("Expected closure, found `{x}`"), None => panic!("Expected closure"), } let closure = closure(parts); @@ -567,7 +560,7 @@ fn check_before_closure(parts: &mut Peekable) -> BlockKind { } // The next matchings are for better error messages. Some(TokenTree::Punct(p)) => { - panic!("Expected block after `| async move`, found `{}`", p); + panic!("Expected block after `| async move`, found `{p}`"); } Some(TokenTree::Group(g)) => { panic!( @@ -745,12 +738,11 @@ pub(crate) fn clone_inner(item: TokenStream) -> TokenStream { } Some(TokenTree::Ident(i)) => { panic!( - "Unexpected ident `{}`: you need to specify if this is a weak or a strong \ + "Unexpected ident `{i}`: you need to specify if this is a weak or a strong \ clone.", - i, ); } - Some(t) => panic!("Unexpected token `{}`", t), + Some(t) => panic!("Unexpected token `{t}`"), None => panic!("Unexpected end 4"), } } diff --git a/glib-macros/src/closure.rs b/glib-macros/src/closure.rs index 1be0b7c1b3b1..cd4b83802055 100644 --- a/glib-macros/src/closure.rs +++ b/glib-macros/src/closure.rs @@ -196,7 +196,7 @@ impl syn::parse::Parse for Closure { .inputs .iter() .enumerate() - .map(|(i, _)| Ident::new(&format!("____value{}", i), Span::call_site())) + .map(|(i, _)| Ident::new(&format!("____value{i}"), Span::call_site())) .collect(); closure.capture = None; Ok(Closure { @@ -228,7 +228,7 @@ impl ToTokens for Closure { .map(|c| c.outer_after_tokens(&crate_ident, &closure_ident)); let arg_values = self.args.iter().enumerate().map(|(index, arg)| { - let err_msg = format!("Wrong type for argument {}: {{:?}}", index); + let err_msg = format!("Wrong type for argument {index}: {{:?}}"); quote! { let #arg = ::core::result::Result::unwrap_or_else( #crate_ident::Value::get(&#values_ident[#index]), diff --git a/glib-macros/src/enum_derive.rs b/glib-macros/src/enum_derive.rs index 3169d4946a71..5e111670e992 100644 --- a/glib-macros/src/enum_derive.rs +++ b/glib-macros/src/enum_derive.rs @@ -45,8 +45,8 @@ fn gen_enum_values( } ); - let value_name = format!("{}\0", value_name); - let value_nick = format!("{}\0", value_nick); + let value_name = format!("{value_name}\0"); + let value_nick = format!("{value_nick}\0"); n += 1; quote_spanned! {v.span()=> diff --git a/glib-macros/src/flags_attribute.rs b/glib-macros/src/flags_attribute.rs index 5b2e6452cdd9..a10463f6f591 100644 --- a/glib-macros/src/flags_attribute.rs +++ b/glib-macros/src/flags_attribute.rs @@ -59,8 +59,8 @@ fn gen_flags_values( } ); - let value_name = format!("{}\0", value_name); - let value_nick = format!("{}\0", value_nick); + let value_name = format!("{value_name}\0"); + let value_nick = format!("{value_nick}\0"); n += 1; quote_spanned! {v.span()=> diff --git a/glib-macros/src/lib.rs b/glib-macros/src/lib.rs index 527c1dbc6ea7..699884126a9e 100644 --- a/glib-macros/src/lib.rs +++ b/glib-macros/src/lib.rs @@ -827,7 +827,7 @@ pub fn cstr_bytes(item: TokenStream) -> TokenStream { let literal = stream.parse::()?; stream.parse::()?; let bytes = std::ffi::CString::new(literal.value()) - .map_err(|e| syn::Error::new_spanned(&literal, format!("{}", e)))? + .map_err(|e| syn::Error::new_spanned(&literal, format!("{e}")))? .into_bytes_with_nul(); let bytes = proc_macro2::Literal::byte_string(&bytes); Ok(quote::quote! { #bytes }.into()) diff --git a/glib/gobject-sys/build.rs b/glib/gobject-sys/build.rs index 631008acdbca..8d181dad8caa 100644 --- a/glib/gobject-sys/build.rs +++ b/glib/gobject-sys/build.rs @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/glib/gobject-sys/src/lib.rs b/glib/gobject-sys/src/lib.rs index 31d3acd54a9c..bc83e1292d47 100644 --- a/glib/gobject-sys/src/lib.rs +++ b/glib/gobject-sys/src/lib.rs @@ -137,8 +137,7 @@ pub struct GTypeCValue { impl ::std::fmt::Debug for GTypeCValue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeCValue @ {:p}", self)) - .finish() + f.debug_struct(&format!("GTypeCValue @ {self:p}")).finish() } } @@ -158,7 +157,7 @@ pub union GValue_data { impl ::std::fmt::Debug for GValue_data { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GValue_data @ {:p}", self)) + f.debug_struct(&format!("GValue_data @ {self:p}")) .field("v_int", unsafe { &self.v_int }) .field("v_uint", unsafe { &self.v_uint }) .field("v_long", unsafe { &self.v_long }) @@ -180,7 +179,7 @@ pub union GWeakRef_priv { impl ::std::fmt::Debug for GWeakRef_priv { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GWeakRef_priv @ {:p}", self)) + f.debug_struct(&format!("GWeakRef_priv @ {self:p}")) .field("p", unsafe { &self.p }) .finish() } @@ -241,7 +240,7 @@ pub struct GCClosure { impl ::std::fmt::Debug for GCClosure { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GCClosure @ {:p}", self)).finish() + f.debug_struct(&format!("GCClosure @ {self:p}")).finish() } } @@ -254,7 +253,7 @@ pub struct GClosure { impl ::std::fmt::Debug for GClosure { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GClosure @ {:p}", self)).finish() + f.debug_struct(&format!("GClosure @ {self:p}")).finish() } } @@ -267,7 +266,7 @@ pub struct GClosureNotifyData { impl ::std::fmt::Debug for GClosureNotifyData { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GClosureNotifyData @ {:p}", self)) + f.debug_struct(&format!("GClosureNotifyData @ {self:p}")) .field("data", &self.data) .field("notify", &self.notify) .finish() @@ -286,7 +285,7 @@ pub struct GEnumClass { impl ::std::fmt::Debug for GEnumClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GEnumClass @ {:p}", self)) + f.debug_struct(&format!("GEnumClass @ {self:p}")) .field("g_type_class", &self.g_type_class) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -306,7 +305,7 @@ pub struct GEnumValue { impl ::std::fmt::Debug for GEnumValue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GEnumValue @ {:p}", self)) + f.debug_struct(&format!("GEnumValue @ {self:p}")) .field("value", &self.value) .field("value_name", &self.value_name) .field("value_nick", &self.value_nick) @@ -325,7 +324,7 @@ pub struct GFlagsClass { impl ::std::fmt::Debug for GFlagsClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFlagsClass @ {:p}", self)) + f.debug_struct(&format!("GFlagsClass @ {self:p}")) .field("g_type_class", &self.g_type_class) .field("mask", &self.mask) .field("n_values", &self.n_values) @@ -344,7 +343,7 @@ pub struct GFlagsValue { impl ::std::fmt::Debug for GFlagsValue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFlagsValue @ {:p}", self)) + f.debug_struct(&format!("GFlagsValue @ {self:p}")) .field("value", &self.value) .field("value_name", &self.value_name) .field("value_nick", &self.value_nick) @@ -378,7 +377,7 @@ pub struct GInitiallyUnownedClass { impl ::std::fmt::Debug for GInitiallyUnownedClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInitiallyUnownedClass @ {:p}", self)) + f.debug_struct(&format!("GInitiallyUnownedClass @ {self:p}")) .field("g_type_class", &self.g_type_class) .field("constructor", &self.constructor) .field("set_property", &self.set_property) @@ -405,7 +404,7 @@ pub struct GInterfaceInfo { impl ::std::fmt::Debug for GInterfaceInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInterfaceInfo @ {:p}", self)) + f.debug_struct(&format!("GInterfaceInfo @ {self:p}")) .field("interface_init", &self.interface_init) .field("interface_finalize", &self.interface_finalize) .field("interface_data", &self.interface_data) @@ -439,7 +438,7 @@ pub struct GObjectClass { impl ::std::fmt::Debug for GObjectClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GObjectClass @ {:p}", self)) + f.debug_struct(&format!("GObjectClass @ {self:p}")) .field("g_type_class", &self.g_type_class) .field("constructor", &self.constructor) .field("set_property", &self.set_property) @@ -465,7 +464,7 @@ pub struct GObjectConstructParam { impl ::std::fmt::Debug for GObjectConstructParam { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GObjectConstructParam @ {:p}", self)) + f.debug_struct(&format!("GObjectConstructParam @ {self:p}")) .field("pspec", &self.pspec) .field("value", &self.value) .finish() @@ -488,7 +487,7 @@ pub struct GParamSpecClass { impl ::std::fmt::Debug for GParamSpecClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecClass @ {:p}", self)) + f.debug_struct(&format!("GParamSpecClass @ {self:p}")) .field("g_type_class", &self.g_type_class) .field("value_type", &self.value_type) .field("finalize", &self.finalize) @@ -524,7 +523,7 @@ pub struct GParamSpecTypeInfo { impl ::std::fmt::Debug for GParamSpecTypeInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecTypeInfo @ {:p}", self)) + f.debug_struct(&format!("GParamSpecTypeInfo @ {self:p}")) .field("instance_size", &self.instance_size) .field("n_preallocs", &self.n_preallocs) .field("instance_init", &self.instance_init) @@ -546,7 +545,7 @@ pub struct GParameter { impl ::std::fmt::Debug for GParameter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParameter @ {:p}", self)) + f.debug_struct(&format!("GParameter @ {self:p}")) .field("name", &self.name) .field("value", &self.value) .finish() @@ -563,7 +562,7 @@ pub struct GSignalInvocationHint { impl ::std::fmt::Debug for GSignalInvocationHint { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSignalInvocationHint @ {:p}", self)) + f.debug_struct(&format!("GSignalInvocationHint @ {self:p}")) .field("signal_id", &self.signal_id) .field("detail", &self.detail) .field("run_type", &self.run_type) @@ -585,7 +584,7 @@ pub struct GSignalQuery { impl ::std::fmt::Debug for GSignalQuery { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSignalQuery @ {:p}", self)) + f.debug_struct(&format!("GSignalQuery @ {self:p}")) .field("signal_id", &self.signal_id) .field("signal_name", &self.signal_name) .field("itype", &self.itype) @@ -605,7 +604,7 @@ pub struct GTypeClass { impl ::std::fmt::Debug for GTypeClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeClass @ {:p}", self)).finish() + f.debug_struct(&format!("GTypeClass @ {self:p}")).finish() } } @@ -617,7 +616,7 @@ pub struct GTypeFundamentalInfo { impl ::std::fmt::Debug for GTypeFundamentalInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeFundamentalInfo @ {:p}", self)) + f.debug_struct(&format!("GTypeFundamentalInfo @ {self:p}")) .field("type_flags", &self.type_flags) .finish() } @@ -640,7 +639,7 @@ pub struct GTypeInfo { impl ::std::fmt::Debug for GTypeInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeInfo @ {:p}", self)) + f.debug_struct(&format!("GTypeInfo @ {self:p}")) .field("class_size", &self.class_size) .field("base_init", &self.base_init) .field("base_finalize", &self.base_finalize) @@ -663,7 +662,7 @@ pub struct GTypeInstance { impl ::std::fmt::Debug for GTypeInstance { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeInstance @ {:p}", self)) + f.debug_struct(&format!("GTypeInstance @ {self:p}")) .finish() } } @@ -677,7 +676,7 @@ pub struct GTypeInterface { impl ::std::fmt::Debug for GTypeInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeInterface @ {:p}", self)) + f.debug_struct(&format!("GTypeInterface @ {self:p}")) .finish() } } @@ -696,7 +695,7 @@ pub struct GTypeModuleClass { impl ::std::fmt::Debug for GTypeModuleClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeModuleClass @ {:p}", self)) + f.debug_struct(&format!("GTypeModuleClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("load", &self.load) .field("unload", &self.unload) @@ -720,7 +719,7 @@ pub struct GTypePluginClass { impl ::std::fmt::Debug for GTypePluginClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypePluginClass @ {:p}", self)) + f.debug_struct(&format!("GTypePluginClass @ {self:p}")) .field("use_plugin", &self.use_plugin) .field("unuse_plugin", &self.unuse_plugin) .field("complete_type_info", &self.complete_type_info) @@ -740,7 +739,7 @@ pub struct GTypeQuery { impl ::std::fmt::Debug for GTypeQuery { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeQuery @ {:p}", self)) + f.debug_struct(&format!("GTypeQuery @ {self:p}")) .field("type_", &self.type_) .field("type_name", &self.type_name) .field("class_size", &self.class_size) @@ -768,7 +767,7 @@ pub struct GTypeValueTable { impl ::std::fmt::Debug for GTypeValueTable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeValueTable @ {:p}", self)) + f.debug_struct(&format!("GTypeValueTable @ {self:p}")) .field("value_init", &self.value_init) .field("value_free", &self.value_free) .field("value_copy", &self.value_copy) @@ -790,7 +789,7 @@ pub struct GValue { impl ::std::fmt::Debug for GValue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GValue @ {:p}", self)) + f.debug_struct(&format!("GValue @ {self:p}")) .field("data", &self.data) .finish() } @@ -806,7 +805,7 @@ pub struct GValueArray { impl ::std::fmt::Debug for GValueArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GValueArray @ {:p}", self)) + f.debug_struct(&format!("GValueArray @ {self:p}")) .field("n_values", &self.n_values) .field("values", &self.values) .finish() @@ -821,7 +820,7 @@ pub struct GWeakRef { impl ::std::fmt::Debug for GWeakRef { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GWeakRef @ {:p}", self)) + f.debug_struct(&format!("GWeakRef @ {self:p}")) .field("priv_", &self.priv_) .finish() } @@ -836,7 +835,7 @@ pub struct GBinding { impl ::std::fmt::Debug for GBinding { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBinding @ {:p}", self)).finish() + f.debug_struct(&format!("GBinding @ {self:p}")).finish() } } @@ -848,7 +847,7 @@ pub struct GBindingGroup { impl ::std::fmt::Debug for GBindingGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBindingGroup @ {:p}", self)) + f.debug_struct(&format!("GBindingGroup @ {self:p}")) .finish() } } @@ -863,7 +862,7 @@ pub struct GInitiallyUnowned { impl ::std::fmt::Debug for GInitiallyUnowned { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GInitiallyUnowned @ {:p}", self)) + f.debug_struct(&format!("GInitiallyUnowned @ {self:p}")) .field("g_type_instance", &self.g_type_instance) .finish() } @@ -879,7 +878,7 @@ pub struct GObject { impl ::std::fmt::Debug for GObject { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GObject @ {:p}", self)) + f.debug_struct(&format!("GObject @ {self:p}")) .field("g_type_instance", &self.g_type_instance) .finish() } @@ -902,7 +901,7 @@ pub struct GParamSpec { impl ::std::fmt::Debug for GParamSpec { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpec @ {:p}", self)) + f.debug_struct(&format!("GParamSpec @ {self:p}")) .field("g_type_instance", &self.g_type_instance) .field("name", &self.name) .field("flags", &self.flags) @@ -921,7 +920,7 @@ pub struct GParamSpecBoolean { impl ::std::fmt::Debug for GParamSpecBoolean { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecBoolean @ {:p}", self)) + f.debug_struct(&format!("GParamSpecBoolean @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("default_value", &self.default_value) .finish() @@ -936,7 +935,7 @@ pub struct GParamSpecBoxed { impl ::std::fmt::Debug for GParamSpecBoxed { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecBoxed @ {:p}", self)) + f.debug_struct(&format!("GParamSpecBoxed @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -953,7 +952,7 @@ pub struct GParamSpecChar { impl ::std::fmt::Debug for GParamSpecChar { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecChar @ {:p}", self)) + f.debug_struct(&format!("GParamSpecChar @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -974,7 +973,7 @@ pub struct GParamSpecDouble { impl ::std::fmt::Debug for GParamSpecDouble { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecDouble @ {:p}", self)) + f.debug_struct(&format!("GParamSpecDouble @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -994,7 +993,7 @@ pub struct GParamSpecEnum { impl ::std::fmt::Debug for GParamSpecEnum { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecEnum @ {:p}", self)) + f.debug_struct(&format!("GParamSpecEnum @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("enum_class", &self.enum_class) .field("default_value", &self.default_value) @@ -1012,7 +1011,7 @@ pub struct GParamSpecFlags { impl ::std::fmt::Debug for GParamSpecFlags { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecFlags @ {:p}", self)) + f.debug_struct(&format!("GParamSpecFlags @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("flags_class", &self.flags_class) .field("default_value", &self.default_value) @@ -1032,7 +1031,7 @@ pub struct GParamSpecFloat { impl ::std::fmt::Debug for GParamSpecFloat { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecFloat @ {:p}", self)) + f.debug_struct(&format!("GParamSpecFloat @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1051,7 +1050,7 @@ pub struct GParamSpecGType { impl ::std::fmt::Debug for GParamSpecGType { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecGType @ {:p}", self)) + f.debug_struct(&format!("GParamSpecGType @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("is_a_type", &self.is_a_type) .finish() @@ -1069,7 +1068,7 @@ pub struct GParamSpecInt { impl ::std::fmt::Debug for GParamSpecInt { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecInt @ {:p}", self)) + f.debug_struct(&format!("GParamSpecInt @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1089,7 +1088,7 @@ pub struct GParamSpecInt64 { impl ::std::fmt::Debug for GParamSpecInt64 { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecInt64 @ {:p}", self)) + f.debug_struct(&format!("GParamSpecInt64 @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1109,7 +1108,7 @@ pub struct GParamSpecLong { impl ::std::fmt::Debug for GParamSpecLong { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecLong @ {:p}", self)) + f.debug_struct(&format!("GParamSpecLong @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1126,7 +1125,7 @@ pub struct GParamSpecObject { impl ::std::fmt::Debug for GParamSpecObject { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecObject @ {:p}", self)) + f.debug_struct(&format!("GParamSpecObject @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1141,7 +1140,7 @@ pub struct GParamSpecOverride { impl ::std::fmt::Debug for GParamSpecOverride { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecOverride @ {:p}", self)) + f.debug_struct(&format!("GParamSpecOverride @ {self:p}")) .finish() } } @@ -1154,7 +1153,7 @@ pub struct GParamSpecParam { impl ::std::fmt::Debug for GParamSpecParam { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecParam @ {:p}", self)) + f.debug_struct(&format!("GParamSpecParam @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1168,7 +1167,7 @@ pub struct GParamSpecPointer { impl ::std::fmt::Debug for GParamSpecPointer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecPointer @ {:p}", self)) + f.debug_struct(&format!("GParamSpecPointer @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1188,7 +1187,7 @@ pub struct GParamSpecString { impl ::std::fmt::Debug for GParamSpecString { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecString @ {:p}", self)) + f.debug_struct(&format!("GParamSpecString @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("default_value", &self.default_value) .field("cset_first", &self.cset_first) @@ -1210,7 +1209,7 @@ pub struct GParamSpecUChar { impl ::std::fmt::Debug for GParamSpecUChar { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecUChar @ {:p}", self)) + f.debug_struct(&format!("GParamSpecUChar @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1230,7 +1229,7 @@ pub struct GParamSpecUInt { impl ::std::fmt::Debug for GParamSpecUInt { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecUInt @ {:p}", self)) + f.debug_struct(&format!("GParamSpecUInt @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1250,7 +1249,7 @@ pub struct GParamSpecUInt64 { impl ::std::fmt::Debug for GParamSpecUInt64 { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecUInt64 @ {:p}", self)) + f.debug_struct(&format!("GParamSpecUInt64 @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1270,7 +1269,7 @@ pub struct GParamSpecULong { impl ::std::fmt::Debug for GParamSpecULong { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecULong @ {:p}", self)) + f.debug_struct(&format!("GParamSpecULong @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("minimum", &self.minimum) .field("maximum", &self.maximum) @@ -1288,7 +1287,7 @@ pub struct GParamSpecUnichar { impl ::std::fmt::Debug for GParamSpecUnichar { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecUnichar @ {:p}", self)) + f.debug_struct(&format!("GParamSpecUnichar @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("default_value", &self.default_value) .finish() @@ -1305,7 +1304,7 @@ pub struct GParamSpecValueArray { impl ::std::fmt::Debug for GParamSpecValueArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecValueArray @ {:p}", self)) + f.debug_struct(&format!("GParamSpecValueArray @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("element_spec", &self.element_spec) .field("fixed_n_elements", &self.fixed_n_elements) @@ -1324,7 +1323,7 @@ pub struct GParamSpecVariant { impl ::std::fmt::Debug for GParamSpecVariant { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GParamSpecVariant @ {:p}", self)) + f.debug_struct(&format!("GParamSpecVariant @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("type_", &self.type_) .field("default_value", &self.default_value) @@ -1340,8 +1339,7 @@ pub struct GSignalGroup { impl ::std::fmt::Debug for GSignalGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSignalGroup @ {:p}", self)) - .finish() + f.debug_struct(&format!("GSignalGroup @ {self:p}")).finish() } } @@ -1357,7 +1355,7 @@ pub struct GTypeModule { impl ::std::fmt::Debug for GTypeModule { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTypeModule @ {:p}", self)) + f.debug_struct(&format!("GTypeModule @ {self:p}")) .field("parent_instance", &self.parent_instance) .field("use_count", &self.use_count) .field("type_infos", &self.type_infos) @@ -1376,7 +1374,7 @@ pub struct GTypePlugin { impl ::std::fmt::Debug for GTypePlugin { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GTypePlugin @ {:p}", self) + write!(f, "GTypePlugin @ {self:p}") } } diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index 651e606eb1b2..83a0853fbf03 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 952ff416b599) +Generated by gir (https://github.com/gtk-rs/gir @ f0e953c094a5) from gir-files (https://github.com/gtk-rs/gir-files @ 89a11aa6a362) diff --git a/glib/src/char.rs b/glib/src/char.rs index 314652cbc4b1..5127a5ea367e 100644 --- a/glib/src/char.rs +++ b/glib/src/char.rs @@ -136,20 +136,20 @@ impl TryFrom for UChar { impl From for char { fn from(c: UChar) -> char { - c.0 as char + c.0 as _ } } impl From for UChar { #[allow(clippy::unnecessary_cast)] fn from(c: u8) -> UChar { - UChar(c as c_uchar) + UChar(c as _) } } impl From for u8 { fn from(c: UChar) -> u8 { - c.0 as u8 + c.0 as _ } } diff --git a/glib/src/checksum.rs b/glib/src/checksum.rs index 5abd31c4e7b1..ad60e6b25a2d 100644 --- a/glib/src/checksum.rs +++ b/glib/src/checksum.rs @@ -12,7 +12,7 @@ impl Checksum { unsafe { //Don't forget update when `ChecksumType` contains type bigger that Sha512. let mut digest_len: size_t = 512 / 8; - let mut vec = Vec::with_capacity(digest_len as usize); + let mut vec = Vec::with_capacity(digest_len as _); ffi::g_checksum_get_digest( mut_override(self.to_glib_none().0), diff --git a/glib/src/convert.rs b/glib/src/convert.rs index 23461abdb0e7..037a14bacb7e 100644 --- a/glib/src/convert.rs +++ b/glib/src/convert.rs @@ -56,7 +56,7 @@ pub fn convert( if result.is_null() { Err(CvtError::new(unsafe { from_glib_full(error) }, bytes_read)) } else { - let slice = unsafe { Slice::from_glib_full_num(result, bytes_written as usize) }; + let slice = unsafe { Slice::from_glib_full_num(result, bytes_written as _) }; Ok((slice, bytes_read)) } } @@ -87,7 +87,7 @@ pub fn convert_with_fallback( if result.is_null() { Err(CvtError::new(unsafe { from_glib_full(error) }, bytes_read)) } else { - let slice = unsafe { Slice::from_glib_full_num(result, bytes_written as usize) }; + let slice = unsafe { Slice::from_glib_full_num(result, bytes_written as _) }; Ok((slice, bytes_read)) } } @@ -141,7 +141,7 @@ impl IConv { if result.is_null() { Err(CvtError::new(unsafe { from_glib_full(error) }, bytes_read)) } else { - let slice = unsafe { Slice::from_glib_full_num(result, bytes_written as usize) }; + let slice = unsafe { Slice::from_glib_full_num(result, bytes_written as _) }; Ok((slice, bytes_read)) } } diff --git a/glib/src/date.rs b/glib/src/date.rs index 934158233bdf..e57069278b6c 100644 --- a/glib/src/date.rs +++ b/glib/src/date.rs @@ -347,7 +347,7 @@ impl Date { #[doc(alias = "g_date_strftime")] pub fn strftime(s: &str, format: &str, date: &Date) -> usize { - let slen = s.len() as usize; + let slen = s.len() as _; unsafe { ffi::g_date_strftime( s.to_glib_none().0, diff --git a/glib/src/gobject/auto/flags.rs b/glib/src/gobject/auto/flags.rs index 3d42c03de4c3..bb22fe619b80 100644 --- a/glib/src/gobject/auto/flags.rs +++ b/glib/src/gobject/auto/flags.rs @@ -14,13 +14,13 @@ bitflags! { #[doc(alias = "GBindingFlags")] pub struct BindingFlags: u32 { #[doc(alias = "G_BINDING_DEFAULT")] - const DEFAULT = gobject_ffi::G_BINDING_DEFAULT as u32; + const DEFAULT = gobject_ffi::G_BINDING_DEFAULT as _; #[doc(alias = "G_BINDING_BIDIRECTIONAL")] - const BIDIRECTIONAL = gobject_ffi::G_BINDING_BIDIRECTIONAL as u32; + const BIDIRECTIONAL = gobject_ffi::G_BINDING_BIDIRECTIONAL as _; #[doc(alias = "G_BINDING_SYNC_CREATE")] - const SYNC_CREATE = gobject_ffi::G_BINDING_SYNC_CREATE as u32; + const SYNC_CREATE = gobject_ffi::G_BINDING_SYNC_CREATE as _; #[doc(alias = "G_BINDING_INVERT_BOOLEAN")] - const INVERT_BOOLEAN = gobject_ffi::G_BINDING_INVERT_BOOLEAN as u32; + const INVERT_BOOLEAN = gobject_ffi::G_BINDING_INVERT_BOOLEAN as _; } } @@ -84,25 +84,25 @@ bitflags! { #[doc(alias = "GSignalFlags")] pub struct SignalFlags: u32 { #[doc(alias = "G_SIGNAL_RUN_FIRST")] - const RUN_FIRST = gobject_ffi::G_SIGNAL_RUN_FIRST as u32; + const RUN_FIRST = gobject_ffi::G_SIGNAL_RUN_FIRST as _; #[doc(alias = "G_SIGNAL_RUN_LAST")] - const RUN_LAST = gobject_ffi::G_SIGNAL_RUN_LAST as u32; + const RUN_LAST = gobject_ffi::G_SIGNAL_RUN_LAST as _; #[doc(alias = "G_SIGNAL_RUN_CLEANUP")] - const RUN_CLEANUP = gobject_ffi::G_SIGNAL_RUN_CLEANUP as u32; + const RUN_CLEANUP = gobject_ffi::G_SIGNAL_RUN_CLEANUP as _; #[doc(alias = "G_SIGNAL_NO_RECURSE")] - const NO_RECURSE = gobject_ffi::G_SIGNAL_NO_RECURSE as u32; + const NO_RECURSE = gobject_ffi::G_SIGNAL_NO_RECURSE as _; #[doc(alias = "G_SIGNAL_DETAILED")] - const DETAILED = gobject_ffi::G_SIGNAL_DETAILED as u32; + const DETAILED = gobject_ffi::G_SIGNAL_DETAILED as _; #[doc(alias = "G_SIGNAL_ACTION")] - const ACTION = gobject_ffi::G_SIGNAL_ACTION as u32; + const ACTION = gobject_ffi::G_SIGNAL_ACTION as _; #[doc(alias = "G_SIGNAL_NO_HOOKS")] - const NO_HOOKS = gobject_ffi::G_SIGNAL_NO_HOOKS as u32; + const NO_HOOKS = gobject_ffi::G_SIGNAL_NO_HOOKS as _; #[doc(alias = "G_SIGNAL_MUST_COLLECT")] - const MUST_COLLECT = gobject_ffi::G_SIGNAL_MUST_COLLECT as u32; + const MUST_COLLECT = gobject_ffi::G_SIGNAL_MUST_COLLECT as _; #[doc(alias = "G_SIGNAL_DEPRECATED")] - const DEPRECATED = gobject_ffi::G_SIGNAL_DEPRECATED as u32; + const DEPRECATED = gobject_ffi::G_SIGNAL_DEPRECATED as _; #[doc(alias = "G_SIGNAL_ACCUMULATOR_FIRST_RUN")] - const ACCUMULATOR_FIRST_RUN = gobject_ffi::G_SIGNAL_ACCUMULATOR_FIRST_RUN as u32; + const ACCUMULATOR_FIRST_RUN = gobject_ffi::G_SIGNAL_ACCUMULATOR_FIRST_RUN as _; } } diff --git a/glib/src/gobject/binding.rs b/glib/src/gobject/binding.rs index f3bb65abcdd7..de25d17b56ef 100644 --- a/glib/src/gobject/binding.rs +++ b/glib/src/gobject/binding.rs @@ -49,11 +49,11 @@ mod test { .sync_create() .transform_to_with_values(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .transform_from_with_values(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .build(); @@ -72,11 +72,11 @@ mod test { .bidirectional() .transform_to_with_values(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .transform_from_with_values(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .build(); @@ -92,8 +92,8 @@ mod test { source .bind_property("name", &target, "name") .sync_create() - .transform_to(|_binding, value: &str| Some(format!("{} World", value))) - .transform_from(|_binding, value: &str| Some(format!("{} World", value))) + .transform_to(|_binding, value: &str| Some(format!("{value} World"))) + .transform_from(|_binding, value: &str| Some(format!("{value} World"))) .build(); source.set_name("Hello"); @@ -108,8 +108,8 @@ mod test { source .bind_property("name", &target, "name") .sync_create() - .transform_to(|_binding, value: String| Some(format!("{} World", value))) - .transform_from(|_binding, value: &str| Some(format!("{} World", value))) + .transform_to(|_binding, value: String| Some(format!("{value} World"))) + .transform_from(|_binding, value: &str| Some(format!("{value} World"))) .build(); source.set_name("Hello"); @@ -125,8 +125,8 @@ mod test { .bind_property("name", &target, "name") .sync_create() .bidirectional() - .transform_to(|_binding, value: &str| Some(format!("{} World", value))) - .transform_from(|_binding, value: &str| Some(format!("{} World", value))) + .transform_to(|_binding, value: &str| Some(format!("{value} World"))) + .transform_from(|_binding, value: &str| Some(format!("{value} World"))) .build(); target.set_name("Hello"); diff --git a/glib/src/gobject/binding_group.rs b/glib/src/gobject/binding_group.rs index 04a71ad8fdc2..f75799ec7db1 100644 --- a/glib/src/gobject/binding_group.rs +++ b/glib/src/gobject/binding_group.rs @@ -173,13 +173,12 @@ impl<'a> BindingGroupBuilder<'a> { let pspec_name = transform_data.2.clone(); let source = binding.source().unwrap(); let pspec = source.find_property(&pspec_name); - assert!(pspec.is_some(), "Source object does not have a property {}", pspec_name); + assert!(pspec.is_some(), "Source object does not have a property {pspec_name}"); let pspec = pspec.unwrap(); assert!( res.type_().is_a(pspec.value_type()), - "Source property {} expected type {} but transform_from function returned {}", - pspec_name, + "Source property {pspec_name} expected type {} but transform_from function returned {}", pspec.value_type(), res.type_() ); @@ -331,11 +330,11 @@ mod test { .sync_create() .transform_to(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .transform_from(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .build(); @@ -357,11 +356,11 @@ mod test { .bidirectional() .transform_to(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .transform_from(|_binding, value| { let value = value.get::<&str>().unwrap(); - Some(format!("{} World", value).to_value()) + Some(format!("{value} World").to_value()) }) .build(); diff --git a/glib/src/gobject/flags.rs b/glib/src/gobject/flags.rs index 8dc8076285d3..1418196f488c 100644 --- a/glib/src/gobject/flags.rs +++ b/glib/src/gobject/flags.rs @@ -6,17 +6,17 @@ bitflags::bitflags! { #[doc(alias = "GParamFlags")] pub struct ParamFlags: u32 { #[doc(alias = "G_PARAM_READABLE")] - const READABLE = gobject_ffi::G_PARAM_READABLE as u32; + const READABLE = gobject_ffi::G_PARAM_READABLE as _; #[doc(alias = "G_PARAM_WRITABLE")] - const WRITABLE = gobject_ffi::G_PARAM_WRITABLE as u32; + const WRITABLE = gobject_ffi::G_PARAM_WRITABLE as _; #[doc(alias = "G_PARAM_READWRITE")] - const READWRITE = gobject_ffi::G_PARAM_READWRITE as u32; + const READWRITE = gobject_ffi::G_PARAM_READWRITE as _; #[doc(alias = "G_PARAM_CONSTRUCT")] - const CONSTRUCT = gobject_ffi::G_PARAM_CONSTRUCT as u32; + const CONSTRUCT = gobject_ffi::G_PARAM_CONSTRUCT as _; #[doc(alias = "G_PARAM_CONSTRUCT_ONLY")] - const CONSTRUCT_ONLY = gobject_ffi::G_PARAM_CONSTRUCT_ONLY as u32; + const CONSTRUCT_ONLY = gobject_ffi::G_PARAM_CONSTRUCT_ONLY as _; #[doc(alias = "G_PARAM_LAX_VALIDATION")] - const LAX_VALIDATION = gobject_ffi::G_PARAM_LAX_VALIDATION as u32; + const LAX_VALIDATION = gobject_ffi::G_PARAM_LAX_VALIDATION as _; const USER_1 = 256; const USER_2 = 1024; const USER_3 = 2048; @@ -26,9 +26,9 @@ bitflags::bitflags! { const USER_7 = 32768; const USER_8 = 65536; #[doc(alias = "G_PARAM_EXPLICIT_NOTIFY")] - const EXPLICIT_NOTIFY = gobject_ffi::G_PARAM_EXPLICIT_NOTIFY as u32; + const EXPLICIT_NOTIFY = gobject_ffi::G_PARAM_EXPLICIT_NOTIFY as _; #[doc(alias = "G_PARAM_DEPRECATED")] - const DEPRECATED = gobject_ffi::G_PARAM_DEPRECATED as u32; + const DEPRECATED = gobject_ffi::G_PARAM_DEPRECATED as _; } } diff --git a/glib/src/gobject/signal_group.rs b/glib/src/gobject/signal_group.rs index 086af3f48943..c0142e7dd37a 100644 --- a/glib/src/gobject/signal_group.rs +++ b/glib/src/gobject/signal_group.rs @@ -181,7 +181,7 @@ mod tests { false, glib::closure_local!(@watch obj, @strong store => move |o: &SignalObject, a: u32, b: &str| { assert_eq!(o, obj); - store.replace(format!("a {} b {}", a, b)); + store.replace(format!("a {a} b {b}")); }) ); group.connect_closure( diff --git a/glib/src/key_file.rs b/glib/src/key_file.rs index d991536bfe34..9942df2418cf 100644 --- a/glib/src/key_file.rs +++ b/glib/src/key_file.rs @@ -146,7 +146,7 @@ impl KeyFile { } Ok(FromGlibContainer::from_glib_container_num( ret, - length.assume_init() as usize, + length.assume_init() as _, )) } } @@ -187,7 +187,7 @@ impl KeyFile { if error.is_null() { Ok(FromGlibContainer::from_glib_full_num( ret, - length.assume_init() as usize, + length.assume_init() as _, )) } else { ffi::g_strfreev(ret); @@ -244,7 +244,7 @@ impl KeyFile { if error.is_null() { Ok(FromGlibContainer::from_glib_full_num( ret, - length.assume_init() as usize, + length.assume_init() as _, )) } else { ffi::g_strfreev(ret); diff --git a/glib/src/lib.rs b/glib/src/lib.rs index 027ff38e4b19..b86c124b83a9 100644 --- a/glib/src/lib.rs +++ b/glib/src/lib.rs @@ -5,6 +5,7 @@ #![allow(clippy::missing_safety_doc)] #![allow(clippy::wrong_self_convention)] #![allow(clippy::non_send_fields_in_send_ty)] +#![allow(clippy::should_implement_trait)] #![doc = include_str!("../README.md")] pub use ffi; diff --git a/glib/src/log.rs b/glib/src/log.rs index d2624471decb..1a11bb9f740c 100644 --- a/glib/src/log.rs +++ b/glib/src/log.rs @@ -77,7 +77,7 @@ impl FromGlib for LogLevel { } else if value & ffi::G_LOG_LEVEL_DEBUG != 0 { Self::Debug } else { - panic!("Unknown log level: {}", value) + panic!("Unknown log level: {value}") } } } diff --git a/glib/src/object.rs b/glib/src/object.rs index 98edbc34e5bb..a69240e29a7e 100644 --- a/glib/src/object.rs +++ b/glib/src/object.rs @@ -1430,11 +1430,11 @@ impl Object { unsafe { let iface_type = from_glib(gio_ffi::g_initable_get_type()); if type_.is_a(iface_type) { - panic!("Can't instantiate type '{}' implementing `gio::Initable`. Use `gio::Initable::new()`", type_); + panic!("Can't instantiate type '{type_}' implementing `gio::Initable`. Use `gio::Initable::new()`"); } let iface_type = from_glib(gio_ffi::g_async_initable_get_type()); if type_.is_a(iface_type) { - panic!("Can't instantiate type '{}' implementing `gio::AsyncInitable`. Use `gio::AsyncInitable::new()`", type_); + panic!("Can't instantiate type '{type_}' implementing `gio::AsyncInitable`. Use `gio::AsyncInitable::new()`"); } } @@ -1459,11 +1459,11 @@ impl Object { unsafe { let iface_type = from_glib(gio_ffi::g_initable_get_type()); if type_.is_a(iface_type) { - panic!("Can't instantiate type '{}' implementing `gio::Initable`. Use `gio::Initable::new()`", type_); + panic!("Can't instantiate type '{type_}' implementing `gio::Initable`. Use `gio::Initable::new()`"); } let iface_type = from_glib(gio_ffi::g_async_initable_get_type()); if type_.is_a(iface_type) { - panic!("Can't instantiate type '{}' implementing `gio::AsyncInitable`. Use `gio::AsyncInitable::new()`", type_); + panic!("Can't instantiate type '{type_}' implementing `gio::AsyncInitable`. Use `gio::AsyncInitable::new()`"); } } @@ -1490,7 +1490,7 @@ impl Object { #[track_caller] pub unsafe fn new_internal(type_: Type, properties: &mut [(&str, Value)]) -> Object { if !type_.is_a(Object::static_type()) { - panic!("Can't instantiate non-GObject type '{}'", type_); + panic!("Can't instantiate non-GObject type '{type_}'"); } if gobject_ffi::g_type_test_flags( @@ -1498,13 +1498,13 @@ impl Object { gobject_ffi::G_TYPE_FLAG_INSTANTIATABLE, ) == ffi::GFALSE { - panic!("Can't instantiate type '{}'", type_); + panic!("Can't instantiate type '{type_}'"); } if gobject_ffi::g_type_test_flags(type_.into_glib(), gobject_ffi::G_TYPE_FLAG_ABSTRACT) != ffi::GFALSE { - panic!("Can't instantiate abstract type '{}'", type_); + panic!("Can't instantiate abstract type '{type_}'"); } let mut property_names = smallvec::SmallVec::<[_; 16]>::with_capacity(properties.len()); @@ -1512,16 +1512,14 @@ impl Object { if !properties.is_empty() { let klass = ObjectClass::from_type(type_) - .unwrap_or_else(|| panic!("Can't retrieve class for type '{}'", type_)); + .unwrap_or_else(|| panic!("Can't retrieve class for type '{type_}'")); let pspecs = klass.list_properties(); for (idx, (name, value)) in properties.iter_mut().enumerate() { let pspec = pspecs .iter() .find(|p| p.name() == *name) - .unwrap_or_else(|| { - panic!("Can't find property '{}' for type '{}'", name, type_) - }); + .unwrap_or_else(|| panic!("Can't find property '{name}' for type '{type_}'")); if (pspec.flags().contains(crate::ParamFlags::CONSTRUCT) || pspec.flags().contains(crate::ParamFlags::CONSTRUCT_ONLY)) @@ -1529,10 +1527,7 @@ impl Object { .iter() .any(|other_name| pspec.name().as_ptr() == *other_name) { - panic!( - "Can't set construct property '{}' for type '{}' twice", - name, type_ - ); + panic!("Can't set construct property '{name}' for type '{type_}' twice"); } // FIXME: With GLib 2.74 and GParamSpecClass::value_is_valid() it is possible to @@ -1553,7 +1548,7 @@ impl Object { ); if ptr.is_null() { - panic!("Can't instantiate object for type '{}'", type_); + panic!("Can't instantiate object for type '{type_}'"); } else if type_.is_a(InitiallyUnowned::static_type()) { // Attention: This takes ownership of the floating reference from_glib_none(ptr) @@ -2292,8 +2287,7 @@ impl ObjectExt for T { fn set_property(&self, property_name: &str, value: V) { let pspec = self.find_property(property_name).unwrap_or_else(|| { panic!( - "property '{}' of type '{}' not found", - property_name, + "property '{property_name}' of type '{}' not found", self.type_() ) }); @@ -2315,8 +2309,7 @@ impl ObjectExt for T { Some(pspec) => pspec, None => { panic!( - "property '{}' of type '{}' not found", - property_name, + "property '{property_name}' of type '{}' not found", self.type_() ); } @@ -2344,7 +2337,7 @@ impl ObjectExt for T { .iter() .map(|&(name, value)| { let pspec = pspecs.iter().find(|p| p.name() == name).unwrap_or_else(|| { - panic!("Can't find property '{}' for type '{}'", name, self.type_()); + panic!("Can't find property '{name}' for type '{}'", self.type_()); }); let mut value = value.to_value(); @@ -2375,7 +2368,7 @@ impl ObjectExt for T { .iter() .find(|p| p.name() == *name) .unwrap_or_else(|| { - panic!("Can't find property '{}' for type '{}'", name, self.type_()); + panic!("Can't find property '{name}' for type '{}'", self.type_()); }); let mut value = value.clone(); @@ -2400,7 +2393,7 @@ impl ObjectExt for T { let prop = self.property_value(property_name); let v = prop .get_owned::() - .unwrap_or_else(|e| panic!("Failed to get cast value to a different type {}", e)); + .unwrap_or_else(|e| panic!("Failed to get cast value to a different type {e}")); v } @@ -2409,16 +2402,14 @@ impl ObjectExt for T { fn property_value(&self, property_name: &str) -> Value { let pspec = self.find_property(property_name).unwrap_or_else(|| { panic!( - "property '{}' of type '{}' not found", - property_name, + "property '{property_name}' of type '{}' not found", self.type_() ) }); if !pspec.flags().contains(crate::ParamFlags::READABLE) { panic!( - "property '{}' of type '{}' is not readable", - property_name, + "property '{property_name}' of type '{}' is not readable", self.type_() ); } @@ -2434,8 +2425,7 @@ impl ObjectExt for T { // This can't really happen unless something goes wrong inside GObject if !value.type_().is_valid() { panic!( - "Failed to get property value for property '{}' of type '{}'", - property_name, + "Failed to get property value for property '{property_name}' of type '{}'", self.type_() ) } @@ -2618,7 +2608,7 @@ impl ObjectExt for T { { let type_ = self.type_(); let (signal_id, details) = SignalId::parse_name(signal_name, type_, true) - .unwrap_or_else(|| panic!("Signal '{}' of type '{}' not found", signal_name, type_)); + .unwrap_or_else(|| panic!("Signal '{signal_name}' of type '{type_}' not found")); self.connect_unsafe_id(signal_id, details, after, callback) } @@ -2644,9 +2634,7 @@ impl ObjectExt for T { let ret = callback(values); if let Some(ret) = ret { panic!( - "Signal '{}' of type '{}' required no return value but got value of type '{}'", - signal_name, - type_, + "Signal '{signal_name}' of type '{type_}' required no return value but got value of type '{}'", ret.type_() ); } @@ -2656,9 +2644,7 @@ impl ObjectExt for T { Closure::new_unsafe(move |values| { let mut ret = callback(values).unwrap_or_else(|| { panic!( - "Signal '{}' of type '{}' required return value of type '{}' but got None", - signal_name, - type_, + "Signal '{signal_name}' of type '{type_}' required return value of type '{}' but got None", return_type.name() ); }); @@ -2673,8 +2659,7 @@ impl ObjectExt for T { if let Err(got) = coerce_object_type(&mut ret, return_type) { panic!( - "Signal '{}' of type '{}' required return value of type '{}' but got '{}'", - signal_name, type_, return_type, got + "Signal '{signal_name}' of type '{type_}' required return value of type '{return_type}' but got '{got}'", ); }; Some(ret) @@ -2698,10 +2683,7 @@ impl ObjectExt for T { ); if handler == 0 { - panic!( - "Failed to connect to signal '{}' of type '{}'", - signal_name, type_ - ); + panic!("Failed to connect to signal '{signal_name}' of type '{type_}'",); } from_glib(handler) @@ -2716,7 +2698,7 @@ impl ObjectExt for T { ) -> SignalHandlerId { let type_ = self.type_(); let (signal_id, details) = SignalId::parse_name(signal_name, type_, true) - .unwrap_or_else(|| panic!("Signal '{}' of type '{}' not found", signal_name, type_)); + .unwrap_or_else(|| panic!("Signal '{signal_name}' of type '{type_}' not found")); self.connect_closure_id(signal_id, details, after, closure) } @@ -2751,10 +2733,7 @@ impl ObjectExt for T { ); if handler == 0 { - panic!( - "Failed to connect to signal '{}' of type '{}'", - signal_name, type_ - ); + panic!("Failed to connect to signal '{signal_name}' of type '{type_}'",); } from_glib(handler) @@ -2872,7 +2851,7 @@ impl ObjectExt for T { ) -> R { let type_ = self.type_(); let signal_id = SignalId::lookup(signal_name, type_).unwrap_or_else(|| { - panic!("Signal '{}' of type '{}' not found", signal_name, type_); + panic!("Signal '{signal_name}' of type '{type_}' not found"); }); self.emit(signal_id, args) } @@ -2881,7 +2860,7 @@ impl ObjectExt for T { fn emit_by_name_with_values(&self, signal_name: &str, args: &[Value]) -> Option { let type_ = self.type_(); let signal_id = SignalId::lookup(signal_name, type_).unwrap_or_else(|| { - panic!("Signal '{}' of type '{}' not found", signal_name, type_); + panic!("Signal '{signal_name}' of type '{type_}' not found"); }); self.emit_with_values(signal_id, args) } @@ -2895,7 +2874,7 @@ impl ObjectExt for T { ) -> R { let type_ = self.type_(); let signal_id = SignalId::lookup(signal_name, type_) - .unwrap_or_else(|| panic!("Signal '{}' of type '{}' not found", signal_name, type_)); + .unwrap_or_else(|| panic!("Signal '{signal_name}' of type '{type_}' not found")); self.emit_with_details(signal_id, details, args) } @@ -2908,7 +2887,7 @@ impl ObjectExt for T { ) -> Option { let type_ = self.type_(); let signal_id = SignalId::lookup(signal_name, type_) - .unwrap_or_else(|| panic!("Signal '{}' of type '{}' not found", signal_name, type_)); + .unwrap_or_else(|| panic!("Signal '{signal_name}' of type '{type_}' not found")); self.emit_with_details_and_values(signal_id, details, args) } @@ -3069,7 +3048,7 @@ impl ObjectExt for T { } let signal_name = if let Some(name) = name { - format!("notify::{}\0", name) + format!("notify::{name}\0") } else { "notify\0".into() }; @@ -3213,9 +3192,8 @@ fn validate_property_type( || (!allow_construct_only && pspec.flags().contains(crate::ParamFlags::CONSTRUCT_ONLY)) { panic!( - "property '{}' of type '{}' is not writable", + "property '{}' of type '{type_}' is not writable", pspec.name(), - type_ ); } @@ -3232,11 +3210,9 @@ fn validate_property_type( if !valid_type { if let Err(got) = coerce_object_type(property_value, pspec.value_type()) { panic!( - "property '{}' of type '{}' can't be set from the given type (expected: '{}', got: '{}')", + "property '{}' of type '{type_}' can't be set from the given type (expected: '{}', got: '{got}')", pspec.name(), - type_, pspec.value_type(), - got ); } } @@ -3248,9 +3224,8 @@ fn validate_property_type( let change_allowed = pspec.flags().contains(crate::ParamFlags::LAX_VALIDATION); if changed && !change_allowed { panic!( - "property '{}' of type '{}' can't be set from given value, it is invalid or out of range", + "property '{}' of type '{type_}' can't be set from given value, it is invalid or out of range", pspec.name(), - type_, ); } } @@ -3279,9 +3254,7 @@ fn validate_signal_arguments(type_: Type, signal_query: &SignalQuery, args: &mut if signal_query.n_params() != args.len() as u32 { panic!( - "Incompatible number of arguments for signal '{}' of type '{}' (expected {}, got {})", - signal_name, - type_, + "Incompatible number of arguments for signal '{signal_name}' of type '{type_}' (expected {}, got {})", signal_query.n_params(), args.len(), ); @@ -3294,12 +3267,7 @@ fn validate_signal_arguments(type_: Type, signal_query: &SignalQuery, args: &mut if param_type != arg.type_() { coerce_object_type(arg, param_type).unwrap_or_else(|got| panic!( - "Incompatible argument type in argument {} for signal '{}' of type '{}' (expected {}, got {})", - i, - signal_name, - type_, - param_type, - got + "Incompatible argument type in argument {i} for signal '{signal_name}' of type '{type_}' (expected {param_type}, got {got})", ) ); } diff --git a/glib/src/param_spec.rs b/glib/src/param_spec.rs index 4d5abd292981..99964f8900c9 100644 --- a/glib/src/param_spec.rs +++ b/glib/src/param_spec.rs @@ -1597,7 +1597,7 @@ impl ParamSpecOverride { let interface_ref: InterfaceRef = Interface::from_type(T::static_type()).unwrap(); let pspec = interface_ref .find_property(name) - .unwrap_or_else(|| panic!("Couldn't find a property named `{}` to override", name)); + .unwrap_or_else(|| panic!("Couldn't find a property named `{name}` to override")); unsafe { Self::new_unchecked(name, &pspec) } } @@ -1621,7 +1621,7 @@ impl ParamSpecOverride { let pspec = ObjectClass::from_type(T::static_type()) .unwrap() .find_property(name) - .unwrap_or_else(|| panic!("Couldn't find a property named `{}` to override", name)); + .unwrap_or_else(|| panic!("Couldn't find a property named `{name}` to override")); unsafe { Self::new_unchecked(name, &pspec) } } diff --git a/glib/src/signal.rs b/glib/src/signal.rs index cbecb2367a90..eeacacfb04f5 100644 --- a/glib/src/signal.rs +++ b/glib/src/signal.rs @@ -61,7 +61,7 @@ impl FromGlib for SignalHandlerId { #[inline] unsafe fn from_glib(val: c_ulong) -> Self { assert_ne!(val, 0); - Self(NonZeroU64::new_unchecked(val as u64)) + Self(NonZeroU64::new_unchecked(val as _)) } } diff --git a/glib/src/subclass/types.rs b/glib/src/subclass/types.rs index 886a7b29590d..5ec2b11b732a 100644 --- a/glib/src/subclass/types.rs +++ b/glib/src/subclass/types.rs @@ -993,7 +993,7 @@ pub(crate) unsafe fn signal_override_class_handler( F: Fn(&super::SignalClassHandlerToken, &[Value]) -> Option + Send + Sync + 'static, { let (signal_id, _) = SignalId::parse_name(name, from_glib(type_), false) - .unwrap_or_else(|| panic!("Signal '{}' not found", name)); + .unwrap_or_else(|| panic!("Signal '{name}' not found")); let query = signal_id.query(); let return_type = query.return_type(); diff --git a/glib/src/utils.rs b/glib/src/utils.rs index efaef2f85456..f1539746d3ee 100644 --- a/glib/src/utils.rs +++ b/glib/src/utils.rs @@ -110,7 +110,7 @@ pub fn file_get_contents( if error.is_null() { Ok(crate::Slice::from_glib_full_num_copy( contents, - length.assume_init() as usize, + length.assume_init() as _, )) } else { Err(from_glib_full(error)) diff --git a/glib/src/variant.rs b/glib/src/variant.rs index 2884872ac82e..4904de919236 100644 --- a/glib/src/variant.rs +++ b/glib/src/variant.rs @@ -366,7 +366,7 @@ impl Variant { } else { let ret = str::from_utf8_unchecked(slice::from_raw_parts( ptr as *const u8, - len as usize, + len as _, )); Some(ret) } @@ -748,7 +748,7 @@ impl Variant { return &[]; } let ptr = ffi::g_variant_get_data(selfv.0); - slice::from_raw_parts(ptr as *const u8, len as usize) + slice::from_raw_parts(ptr as *const _, len as _) } } @@ -2162,7 +2162,7 @@ mod tests { let mut m = BTreeMap::new(); let total = 20; for n in 0..total { - let k = format!("v{:04}", n); + let k = format!("v{n:04}"); m.insert(k, n as u32); } let v = m.to_variant(); diff --git a/glib/src/variant_type.rs b/glib/src/variant_type.rs index 89b276a791c8..79bf8288cc01 100644 --- a/glib/src/variant_type.rs +++ b/glib/src/variant_type.rs @@ -232,7 +232,7 @@ impl FromGlibPtrFull<*const ffi::GVariantType> for VariantType { impl FromGlibPtrFull<*mut ffi::GVariantType> for VariantType { unsafe fn from_glib_full(ptr: *mut ffi::GVariantType) -> VariantType { assert!(!ptr.is_null()); - let len = ffi::g_variant_type_get_string_length(ptr) as usize; + let len: usize = ffi::g_variant_type_get_string_length(ptr) as _; VariantType { ptr: ptr::NonNull::new_unchecked(ptr), len, @@ -454,7 +454,7 @@ impl VariantTy { #[allow(clippy::cast_slice_from_raw_parts)] pub unsafe fn from_ptr<'a>(ptr: *const ffi::GVariantType) -> &'a VariantTy { assert!(!ptr.is_null()); - let len = ffi::g_variant_type_get_string_length(ptr) as usize; + let len: usize = ffi::g_variant_type_get_string_length(ptr) as _; assert!(len > 0); &*(slice::from_raw_parts(ptr as *const u8, len) as *const [u8] as *const VariantTy) } diff --git a/glib/sys/build.rs b/glib/sys/build.rs index 631008acdbca..8d181dad8caa 100644 --- a/glib/sys/build.rs +++ b/glib/sys/build.rs @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/glib/sys/src/lib.rs b/glib/sys/src/lib.rs index 14a6400f741b..1b6cf147da9e 100644 --- a/glib/sys/src/lib.rs +++ b/glib/sys/src/lib.rs @@ -1011,7 +1011,7 @@ pub struct GDoubleIEEE754 { impl ::std::fmt::Debug for GDoubleIEEE754 { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDoubleIEEE754 @ {:p}", self)) + f.debug_struct(&format!("GDoubleIEEE754 @ {self:p}")) .finish() } } @@ -1024,7 +1024,7 @@ pub struct GFloatIEEE754 { impl ::std::fmt::Debug for GFloatIEEE754 { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFloatIEEE754 @ {:p}", self)) + f.debug_struct(&format!("GFloatIEEE754 @ {self:p}")) .finish() } } @@ -1038,7 +1038,7 @@ pub union GMutex { impl ::std::fmt::Debug for GMutex { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMutex @ {:p}", self)).finish() + f.debug_struct(&format!("GMutex @ {self:p}")).finish() } } @@ -1061,7 +1061,7 @@ pub union GTokenValue { impl ::std::fmt::Debug for GTokenValue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTokenValue @ {:p}", self)) + f.debug_struct(&format!("GTokenValue @ {self:p}")) .field("v_symbol", unsafe { &self.v_symbol }) .field("v_identifier", unsafe { &self.v_identifier }) .field("v_binary", unsafe { &self.v_binary }) @@ -1087,7 +1087,7 @@ pub union GVariantBuilder_u { impl ::std::fmt::Debug for GVariantBuilder_u { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantBuilder_u @ {:p}", self)) + f.debug_struct(&format!("GVariantBuilder_u @ {self:p}")) .field("s", unsafe { &self.s }) .field("x", unsafe { &self.x }) .finish() @@ -1103,7 +1103,7 @@ pub union GVariantDict_u { impl ::std::fmt::Debug for GVariantDict_u { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantDict_u @ {:p}", self)) + f.debug_struct(&format!("GVariantDict_u @ {self:p}")) .field("s", unsafe { &self.s }) .field("x", unsafe { &self.x }) .finish() @@ -1197,7 +1197,7 @@ pub struct GArray { impl ::std::fmt::Debug for GArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GArray @ {:p}", self)) + f.debug_struct(&format!("GArray @ {self:p}")) .field("data", &self.data) .field("len", &self.len) .finish() @@ -1229,7 +1229,7 @@ pub struct GByteArray { impl ::std::fmt::Debug for GByteArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GByteArray @ {:p}", self)) + f.debug_struct(&format!("GByteArray @ {self:p}")) .field("data", &self.data) .field("len", &self.len) .finish() @@ -1244,7 +1244,7 @@ pub struct GBytes { impl ::std::fmt::Debug for GBytes { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GBytes @ {:p}", self)).finish() + f.debug_struct(&format!("GBytes @ {self:p}")).finish() } } @@ -1256,7 +1256,7 @@ pub struct GChecksum { impl ::std::fmt::Debug for GChecksum { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GChecksum @ {:p}", self)).finish() + f.debug_struct(&format!("GChecksum @ {self:p}")).finish() } } @@ -1269,7 +1269,7 @@ pub struct GCond { impl ::std::fmt::Debug for GCond { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GCond @ {:p}", self)).finish() + f.debug_struct(&format!("GCond @ {self:p}")).finish() } } @@ -1290,7 +1290,7 @@ pub struct GDate { impl ::std::fmt::Debug for GDate { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDate @ {:p}", self)) + f.debug_struct(&format!("GDate @ {self:p}")) .field("julian_days", &self.julian_days) .field("flags_dmy", &self.flags_dmy) .finish() @@ -1305,7 +1305,7 @@ pub struct GDateTime { impl ::std::fmt::Debug for GDateTime { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDateTime @ {:p}", self)).finish() + f.debug_struct(&format!("GDateTime @ {self:p}")).finish() } } @@ -1318,7 +1318,7 @@ pub struct GDebugKey { impl ::std::fmt::Debug for GDebugKey { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDebugKey @ {:p}", self)) + f.debug_struct(&format!("GDebugKey @ {self:p}")) .field("key", &self.key) .field("value", &self.value) .finish() @@ -1342,7 +1342,7 @@ pub struct GDoubleIEEE754_mpn { impl ::std::fmt::Debug for GDoubleIEEE754_mpn { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GDoubleIEEE754_mpn @ {:p}", self)) + f.debug_struct(&format!("GDoubleIEEE754_mpn @ {self:p}")) .field("mantissa_low", &self.mantissa_low) .finish() } @@ -1358,7 +1358,7 @@ pub struct GError { impl ::std::fmt::Debug for GError { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GError @ {:p}", self)) + f.debug_struct(&format!("GError @ {self:p}")) .field("domain", &self.domain) .field("code", &self.code) .field("message", &self.message) @@ -1375,7 +1375,7 @@ pub struct GFloatIEEE754_mpn { impl ::std::fmt::Debug for GFloatIEEE754_mpn { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GFloatIEEE754_mpn @ {:p}", self)) + f.debug_struct(&format!("GFloatIEEE754_mpn @ {self:p}")) .field("mantissa", &self.mantissa) .finish() } @@ -1389,7 +1389,7 @@ pub struct GHashTable { impl ::std::fmt::Debug for GHashTable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GHashTable @ {:p}", self)).finish() + f.debug_struct(&format!("GHashTable @ {self:p}")).finish() } } @@ -1406,7 +1406,7 @@ pub struct GHashTableIter { impl ::std::fmt::Debug for GHashTableIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GHashTableIter @ {:p}", self)) + f.debug_struct(&format!("GHashTableIter @ {self:p}")) .finish() } } @@ -1434,7 +1434,7 @@ pub struct GHook { impl ::std::fmt::Debug for GHook { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GHook @ {:p}", self)) + f.debug_struct(&format!("GHook @ {self:p}")) .field("data", &self.data) .field("next", &self.next) .field("prev", &self.prev) @@ -1463,7 +1463,7 @@ pub struct GHookList { impl ::std::fmt::Debug for GHookList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "GHookList @ {:p}", self) + write!(f, "GHookList @ {self:p}") } } @@ -1496,7 +1496,7 @@ pub struct GIOChannel { impl ::std::fmt::Debug for GIOChannel { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GIOChannel @ {:p}", self)).finish() + f.debug_struct(&format!("GIOChannel @ {self:p}")).finish() } } @@ -1535,7 +1535,7 @@ pub struct GIOFuncs { impl ::std::fmt::Debug for GIOFuncs { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GIOFuncs @ {:p}", self)) + f.debug_struct(&format!("GIOFuncs @ {self:p}")) .field("io_read", &self.io_read) .field("io_write", &self.io_write) .field("io_seek", &self.io_seek) @@ -1556,7 +1556,7 @@ pub struct GKeyFile { impl ::std::fmt::Debug for GKeyFile { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GKeyFile @ {:p}", self)).finish() + f.debug_struct(&format!("GKeyFile @ {self:p}")).finish() } } @@ -1570,7 +1570,7 @@ pub struct GList { impl ::std::fmt::Debug for GList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GList @ {:p}", self)) + f.debug_struct(&format!("GList @ {self:p}")) .field("data", &self.data) .field("next", &self.next) .field("prev", &self.prev) @@ -1588,7 +1588,7 @@ pub struct GLogField { impl ::std::fmt::Debug for GLogField { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GLogField @ {:p}", self)) + f.debug_struct(&format!("GLogField @ {self:p}")) .field("key", &self.key) .field("value", &self.value) .field("length", &self.length) @@ -1604,8 +1604,7 @@ pub struct GMainContext { impl ::std::fmt::Debug for GMainContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMainContext @ {:p}", self)) - .finish() + f.debug_struct(&format!("GMainContext @ {self:p}")).finish() } } @@ -1617,7 +1616,7 @@ pub struct GMainLoop { impl ::std::fmt::Debug for GMainLoop { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMainLoop @ {:p}", self)).finish() + f.debug_struct(&format!("GMainLoop @ {self:p}")).finish() } } @@ -1629,8 +1628,7 @@ pub struct GMappedFile { impl ::std::fmt::Debug for GMappedFile { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMappedFile @ {:p}", self)) - .finish() + f.debug_struct(&format!("GMappedFile @ {self:p}")).finish() } } @@ -1642,7 +1640,7 @@ pub struct GMarkupParseContext { impl ::std::fmt::Debug for GMarkupParseContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMarkupParseContext @ {:p}", self)) + f.debug_struct(&format!("GMarkupParseContext @ {self:p}")) .finish() } } @@ -1686,7 +1684,7 @@ pub struct GMarkupParser { impl ::std::fmt::Debug for GMarkupParser { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMarkupParser @ {:p}", self)) + f.debug_struct(&format!("GMarkupParser @ {self:p}")) .field("start_element", &self.start_element) .field("end_element", &self.end_element) .field("text", &self.text) @@ -1704,7 +1702,7 @@ pub struct GMatchInfo { impl ::std::fmt::Debug for GMatchInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMatchInfo @ {:p}", self)).finish() + f.debug_struct(&format!("GMatchInfo @ {self:p}")).finish() } } @@ -1721,7 +1719,7 @@ pub struct GMemVTable { impl ::std::fmt::Debug for GMemVTable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GMemVTable @ {:p}", self)) + f.debug_struct(&format!("GMemVTable @ {self:p}")) .field("malloc", &self.malloc) .field("realloc", &self.realloc) .field("free", &self.free) @@ -1744,7 +1742,7 @@ pub struct GNode { impl ::std::fmt::Debug for GNode { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GNode @ {:p}", self)) + f.debug_struct(&format!("GNode @ {self:p}")) .field("data", &self.data) .field("next", &self.next) .field("prev", &self.prev) @@ -1763,7 +1761,7 @@ pub struct GOnce { impl ::std::fmt::Debug for GOnce { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GOnce @ {:p}", self)).finish() + f.debug_struct(&format!("GOnce @ {self:p}")).finish() } } @@ -1789,7 +1787,7 @@ pub struct GOptionEntry { impl ::std::fmt::Debug for GOptionEntry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GOptionEntry @ {:p}", self)) + f.debug_struct(&format!("GOptionEntry @ {self:p}")) .field("long_name", &self.long_name) .field("short_name", &self.short_name) .field("flags", &self.flags) @@ -1809,8 +1807,7 @@ pub struct GOptionGroup { impl ::std::fmt::Debug for GOptionGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GOptionGroup @ {:p}", self)) - .finish() + f.debug_struct(&format!("GOptionGroup @ {self:p}")).finish() } } @@ -1822,8 +1819,7 @@ pub struct GPatternSpec { impl ::std::fmt::Debug for GPatternSpec { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPatternSpec @ {:p}", self)) - .finish() + f.debug_struct(&format!("GPatternSpec @ {self:p}")).finish() } } @@ -1837,7 +1833,7 @@ pub struct GPrivate { impl ::std::fmt::Debug for GPrivate { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPrivate @ {:p}", self)).finish() + f.debug_struct(&format!("GPrivate @ {self:p}")).finish() } } @@ -1850,7 +1846,7 @@ pub struct GPtrArray { impl ::std::fmt::Debug for GPtrArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GPtrArray @ {:p}", self)) + f.debug_struct(&format!("GPtrArray @ {self:p}")) .field("pdata", &self.pdata) .field("len", &self.len) .finish() @@ -1867,7 +1863,7 @@ pub struct GQueue { impl ::std::fmt::Debug for GQueue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GQueue @ {:p}", self)) + f.debug_struct(&format!("GQueue @ {self:p}")) .field("head", &self.head) .field("tail", &self.tail) .field("length", &self.length) @@ -1884,7 +1880,7 @@ pub struct GRWLock { impl ::std::fmt::Debug for GRWLock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GRWLock @ {:p}", self)).finish() + f.debug_struct(&format!("GRWLock @ {self:p}")).finish() } } @@ -1905,7 +1901,7 @@ pub struct GRecMutex { impl ::std::fmt::Debug for GRecMutex { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GRecMutex @ {:p}", self)).finish() + f.debug_struct(&format!("GRecMutex @ {self:p}")).finish() } } @@ -1917,7 +1913,7 @@ pub struct GRegex { impl ::std::fmt::Debug for GRegex { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GRegex @ {:p}", self)).finish() + f.debug_struct(&format!("GRegex @ {self:p}")).finish() } } @@ -1930,7 +1926,7 @@ pub struct GSList { impl ::std::fmt::Debug for GSList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSList @ {:p}", self)) + f.debug_struct(&format!("GSList @ {self:p}")) .field("data", &self.data) .field("next", &self.next) .finish() @@ -1965,7 +1961,7 @@ pub struct GScanner { impl ::std::fmt::Debug for GScanner { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GScanner @ {:p}", self)) + f.debug_struct(&format!("GScanner @ {self:p}")) .field("user_data", &self.user_data) .field("max_parse_errors", &self.max_parse_errors) .field("parse_errors", &self.parse_errors) @@ -1998,7 +1994,7 @@ pub struct GScannerConfig { impl ::std::fmt::Debug for GScannerConfig { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GScannerConfig @ {:p}", self)) + f.debug_struct(&format!("GScannerConfig @ {self:p}")) .field("cset_skip_characters", &self.cset_skip_characters) .field("cset_identifier_first", &self.cset_identifier_first) .field("cset_identifier_nth", &self.cset_identifier_nth) @@ -2044,7 +2040,7 @@ pub struct GSource { impl ::std::fmt::Debug for GSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSource @ {:p}", self)).finish() + f.debug_struct(&format!("GSource @ {self:p}")).finish() } } @@ -2058,7 +2054,7 @@ pub struct GSourceCallbackFuncs { impl ::std::fmt::Debug for GSourceCallbackFuncs { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSourceCallbackFuncs @ {:p}", self)) + f.debug_struct(&format!("GSourceCallbackFuncs @ {self:p}")) .field("ref_", &self.ref_) .field("unref", &self.unref) .field("get", &self.get) @@ -2079,7 +2075,7 @@ pub struct GSourceFuncs { impl ::std::fmt::Debug for GSourceFuncs { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GSourceFuncs @ {:p}", self)) + f.debug_struct(&format!("GSourceFuncs @ {self:p}")) .field("prepare", &self.prepare) .field("check", &self.check) .field("dispatch", &self.dispatch) @@ -2114,7 +2110,7 @@ pub struct GString { impl ::std::fmt::Debug for GString { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GString @ {:p}", self)) + f.debug_struct(&format!("GString @ {self:p}")) .field("str", &self.str) .field("len", &self.len) .field("allocated_len", &self.allocated_len) @@ -2159,7 +2155,7 @@ pub struct GTestConfig { impl ::std::fmt::Debug for GTestConfig { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTestConfig @ {:p}", self)) + f.debug_struct(&format!("GTestConfig @ {self:p}")) .field("test_initialized", &self.test_initialized) .field("test_quick", &self.test_quick) .field("test_perf", &self.test_perf) @@ -2179,7 +2175,7 @@ pub struct GTestLogBuffer { impl ::std::fmt::Debug for GTestLogBuffer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTestLogBuffer @ {:p}", self)) + f.debug_struct(&format!("GTestLogBuffer @ {self:p}")) .finish() } } @@ -2196,7 +2192,7 @@ pub struct GTestLogMsg { impl ::std::fmt::Debug for GTestLogMsg { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTestLogMsg @ {:p}", self)) + f.debug_struct(&format!("GTestLogMsg @ {self:p}")) .field("log_type", &self.log_type) .field("n_strings", &self.n_strings) .field("strings", &self.strings) @@ -2221,7 +2217,7 @@ pub struct GThread { impl ::std::fmt::Debug for GThread { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GThread @ {:p}", self)).finish() + f.debug_struct(&format!("GThread @ {self:p}")).finish() } } @@ -2235,7 +2231,7 @@ pub struct GThreadPool { impl ::std::fmt::Debug for GThreadPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GThreadPool @ {:p}", self)) + f.debug_struct(&format!("GThreadPool @ {self:p}")) .field("func", &self.func) .field("user_data", &self.user_data) .field("exclusive", &self.exclusive) @@ -2252,7 +2248,7 @@ pub struct GTimeVal { impl ::std::fmt::Debug for GTimeVal { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTimeVal @ {:p}", self)) + f.debug_struct(&format!("GTimeVal @ {self:p}")) .field("tv_sec", &self.tv_sec) .field("tv_usec", &self.tv_usec) .finish() @@ -2267,7 +2263,7 @@ pub struct GTimeZone { impl ::std::fmt::Debug for GTimeZone { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTimeZone @ {:p}", self)).finish() + f.debug_struct(&format!("GTimeZone @ {self:p}")).finish() } } @@ -2287,7 +2283,7 @@ pub struct GTrashStack { impl ::std::fmt::Debug for GTrashStack { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTrashStack @ {:p}", self)) + f.debug_struct(&format!("GTrashStack @ {self:p}")) .field("next", &self.next) .finish() } @@ -2301,7 +2297,7 @@ pub struct GTree { impl ::std::fmt::Debug for GTree { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GTree @ {:p}", self)).finish() + f.debug_struct(&format!("GTree @ {self:p}")).finish() } } @@ -2321,7 +2317,7 @@ pub struct GUri { impl ::std::fmt::Debug for GUri { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUri @ {:p}", self)).finish() + f.debug_struct(&format!("GUri @ {self:p}")).finish() } } @@ -2336,7 +2332,7 @@ pub struct GUriParamsIter { impl ::std::fmt::Debug for GUriParamsIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GUriParamsIter @ {:p}", self)) + f.debug_struct(&format!("GUriParamsIter @ {self:p}")) .finish() } } @@ -2349,7 +2345,7 @@ pub struct GVariant { impl ::std::fmt::Debug for GVariant { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariant @ {:p}", self)).finish() + f.debug_struct(&format!("GVariant @ {self:p}")).finish() } } @@ -2361,7 +2357,7 @@ pub struct GVariantBuilder { impl ::std::fmt::Debug for GVariantBuilder { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantBuilder @ {:p}", self)) + f.debug_struct(&format!("GVariantBuilder @ {self:p}")) .field("u", &self.u) .finish() } @@ -2377,7 +2373,7 @@ pub struct GVariantBuilder_u_s { impl ::std::fmt::Debug for GVariantBuilder_u_s { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantBuilder_u_s @ {:p}", self)) + f.debug_struct(&format!("GVariantBuilder_u_s @ {self:p}")) .field("partial_magic", &self.partial_magic) .field("type_", &self.type_) .field("y", &self.y) @@ -2393,7 +2389,7 @@ pub struct GVariantDict { impl ::std::fmt::Debug for GVariantDict { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantDict @ {:p}", self)) + f.debug_struct(&format!("GVariantDict @ {self:p}")) .field("u", &self.u) .finish() } @@ -2409,7 +2405,7 @@ pub struct GVariantDict_u_s { impl ::std::fmt::Debug for GVariantDict_u_s { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantDict_u_s @ {:p}", self)) + f.debug_struct(&format!("GVariantDict_u_s @ {self:p}")) .field("asv", &self.asv) .field("partial_magic", &self.partial_magic) .field("y", &self.y) @@ -2425,8 +2421,7 @@ pub struct GVariantIter { impl ::std::fmt::Debug for GVariantIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantIter @ {:p}", self)) - .finish() + f.debug_struct(&format!("GVariantIter @ {self:p}")).finish() } } @@ -2438,8 +2433,7 @@ pub struct GVariantType { impl ::std::fmt::Debug for GVariantType { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GVariantType @ {:p}", self)) - .finish() + f.debug_struct(&format!("GVariantType @ {self:p}")).finish() } } diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index 651e606eb1b2..83a0853fbf03 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 952ff416b599) +Generated by gir (https://github.com/gtk-rs/gir @ f0e953c094a5) from gir-files (https://github.com/gtk-rs/gir-files @ 89a11aa6a362) diff --git a/graphene/sys/build.rs b/graphene/sys/build.rs index 631008acdbca..8d181dad8caa 100644 --- a/graphene/sys/build.rs +++ b/graphene/sys/build.rs @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/graphene/sys/src/lib.rs b/graphene/sys/src/lib.rs index d9ccc5c8b09b..d36cd66051b1 100644 --- a/graphene/sys/src/lib.rs +++ b/graphene/sys/src/lib.rs @@ -74,7 +74,7 @@ pub struct graphene_box_t { impl ::std::fmt::Debug for graphene_box_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_box_t @ {:p}", self)) + f.debug_struct(&format!("graphene_box_t @ {self:p}")) .finish() } } @@ -88,7 +88,7 @@ pub struct graphene_euler_t { impl ::std::fmt::Debug for graphene_euler_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_euler_t @ {:p}", self)) + f.debug_struct(&format!("graphene_euler_t @ {self:p}")) .finish() } } @@ -101,7 +101,7 @@ pub struct graphene_frustum_t { impl ::std::fmt::Debug for graphene_frustum_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_frustum_t @ {:p}", self)) + f.debug_struct(&format!("graphene_frustum_t @ {self:p}")) .finish() } } @@ -115,7 +115,7 @@ pub struct graphene_matrix_t { impl ::std::fmt::Debug for graphene_matrix_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_matrix_t @ {:p}", self)) + f.debug_struct(&format!("graphene_matrix_t @ {self:p}")) .finish() } } @@ -129,7 +129,7 @@ pub struct graphene_plane_t { impl ::std::fmt::Debug for graphene_plane_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_plane_t @ {:p}", self)) + f.debug_struct(&format!("graphene_plane_t @ {self:p}")) .finish() } } @@ -144,7 +144,7 @@ pub struct graphene_point3d_t { impl ::std::fmt::Debug for graphene_point3d_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_point3d_t @ {:p}", self)) + f.debug_struct(&format!("graphene_point3d_t @ {self:p}")) .field("x", &self.x) .field("y", &self.y) .field("z", &self.z) @@ -161,7 +161,7 @@ pub struct graphene_point_t { impl ::std::fmt::Debug for graphene_point_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_point_t @ {:p}", self)) + f.debug_struct(&format!("graphene_point_t @ {self:p}")) .field("x", &self.x) .field("y", &self.y) .finish() @@ -176,7 +176,7 @@ pub struct graphene_quad_t { impl ::std::fmt::Debug for graphene_quad_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_quad_t @ {:p}", self)) + f.debug_struct(&format!("graphene_quad_t @ {self:p}")) .finish() } } @@ -192,7 +192,7 @@ pub struct graphene_quaternion_t { impl ::std::fmt::Debug for graphene_quaternion_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_quaternion_t @ {:p}", self)) + f.debug_struct(&format!("graphene_quaternion_t @ {self:p}")) .finish() } } @@ -206,7 +206,7 @@ pub struct graphene_ray_t { impl ::std::fmt::Debug for graphene_ray_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_ray_t @ {:p}", self)) + f.debug_struct(&format!("graphene_ray_t @ {self:p}")) .finish() } } @@ -220,7 +220,7 @@ pub struct graphene_rect_t { impl ::std::fmt::Debug for graphene_rect_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_rect_t @ {:p}", self)) + f.debug_struct(&format!("graphene_rect_t @ {self:p}")) .field("origin", &self.origin) .field("size", &self.size) .finish() @@ -239,7 +239,7 @@ pub struct graphene_simd4f_t { impl ::std::fmt::Debug for graphene_simd4f_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_simd4f_t @ {:p}", self)) + f.debug_struct(&format!("graphene_simd4f_t @ {self:p}")) .finish() } } @@ -256,7 +256,7 @@ pub struct graphene_simd4x4f_t { impl ::std::fmt::Debug for graphene_simd4x4f_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_simd4x4f_t @ {:p}", self)) + f.debug_struct(&format!("graphene_simd4x4f_t @ {self:p}")) .finish() } } @@ -270,7 +270,7 @@ pub struct graphene_size_t { impl ::std::fmt::Debug for graphene_size_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_size_t @ {:p}", self)) + f.debug_struct(&format!("graphene_size_t @ {self:p}")) .field("width", &self.width) .field("height", &self.height) .finish() @@ -286,7 +286,7 @@ pub struct graphene_sphere_t { impl ::std::fmt::Debug for graphene_sphere_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_sphere_t @ {:p}", self)) + f.debug_struct(&format!("graphene_sphere_t @ {self:p}")) .finish() } } @@ -301,7 +301,7 @@ pub struct graphene_triangle_t { impl ::std::fmt::Debug for graphene_triangle_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_triangle_t @ {:p}", self)) + f.debug_struct(&format!("graphene_triangle_t @ {self:p}")) .finish() } } @@ -315,7 +315,7 @@ pub struct graphene_vec2_t { impl ::std::fmt::Debug for graphene_vec2_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_vec2_t @ {:p}", self)) + f.debug_struct(&format!("graphene_vec2_t @ {self:p}")) .finish() } } @@ -329,7 +329,7 @@ pub struct graphene_vec3_t { impl ::std::fmt::Debug for graphene_vec3_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_vec3_t @ {:p}", self)) + f.debug_struct(&format!("graphene_vec3_t @ {self:p}")) .finish() } } @@ -343,7 +343,7 @@ pub struct graphene_vec4_t { impl ::std::fmt::Debug for graphene_vec4_t { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("graphene_vec4_t @ {:p}", self)) + f.debug_struct(&format!("graphene_vec4_t @ {self:p}")) .finish() } } diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index 651e606eb1b2..83a0853fbf03 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 952ff416b599) +Generated by gir (https://github.com/gtk-rs/gir @ f0e953c094a5) from gir-files (https://github.com/gtk-rs/gir-files @ 89a11aa6a362) diff --git a/pango/sys/build.rs b/pango/sys/build.rs index 631008acdbca..8d181dad8caa 100644 --- a/pango/sys/build.rs +++ b/pango/sys/build.rs @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/pango/sys/src/lib.rs b/pango/sys/src/lib.rs index 244fbebb38c0..90c46bb989ac 100644 --- a/pango/sys/src/lib.rs +++ b/pango/sys/src/lib.rs @@ -407,7 +407,7 @@ pub struct PangoAnalysis { impl ::std::fmt::Debug for PangoAnalysis { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAnalysis @ {:p}", self)) + f.debug_struct(&format!("PangoAnalysis @ {self:p}")) .field("shape_engine", &self.shape_engine) .field("lang_engine", &self.lang_engine) .field("font", &self.font) @@ -433,7 +433,7 @@ pub struct PangoAttrClass { impl ::std::fmt::Debug for PangoAttrClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrClass @ {:p}", self)) + f.debug_struct(&format!("PangoAttrClass @ {self:p}")) .field("type_", &self.type_) .field("copy", &self.copy) .field("destroy", &self.destroy) @@ -451,7 +451,7 @@ pub struct PangoAttrColor { impl ::std::fmt::Debug for PangoAttrColor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrColor @ {:p}", self)) + f.debug_struct(&format!("PangoAttrColor @ {self:p}")) .field("attr", &self.attr) .field("color", &self.color) .finish() @@ -467,7 +467,7 @@ pub struct PangoAttrFloat { impl ::std::fmt::Debug for PangoAttrFloat { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrFloat @ {:p}", self)) + f.debug_struct(&format!("PangoAttrFloat @ {self:p}")) .field("attr", &self.attr) .field("value", &self.value) .finish() @@ -483,7 +483,7 @@ pub struct PangoAttrFontDesc { impl ::std::fmt::Debug for PangoAttrFontDesc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrFontDesc @ {:p}", self)) + f.debug_struct(&format!("PangoAttrFontDesc @ {self:p}")) .field("attr", &self.attr) .field("desc", &self.desc) .finish() @@ -499,7 +499,7 @@ pub struct PangoAttrFontFeatures { impl ::std::fmt::Debug for PangoAttrFontFeatures { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrFontFeatures @ {:p}", self)) + f.debug_struct(&format!("PangoAttrFontFeatures @ {self:p}")) .field("attr", &self.attr) .field("features", &self.features) .finish() @@ -515,7 +515,7 @@ pub struct PangoAttrInt { impl ::std::fmt::Debug for PangoAttrInt { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrInt @ {:p}", self)) + f.debug_struct(&format!("PangoAttrInt @ {self:p}")) .field("attr", &self.attr) .field("value", &self.value) .finish() @@ -530,7 +530,7 @@ pub struct PangoAttrIterator { impl ::std::fmt::Debug for PangoAttrIterator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrIterator @ {:p}", self)) + f.debug_struct(&format!("PangoAttrIterator @ {self:p}")) .finish() } } @@ -544,7 +544,7 @@ pub struct PangoAttrLanguage { impl ::std::fmt::Debug for PangoAttrLanguage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrLanguage @ {:p}", self)) + f.debug_struct(&format!("PangoAttrLanguage @ {self:p}")) .field("attr", &self.attr) .field("value", &self.value) .finish() @@ -559,7 +559,7 @@ pub struct PangoAttrList { impl ::std::fmt::Debug for PangoAttrList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrList @ {:p}", self)) + f.debug_struct(&format!("PangoAttrList @ {self:p}")) .finish() } } @@ -577,7 +577,7 @@ pub struct PangoAttrShape { impl ::std::fmt::Debug for PangoAttrShape { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrShape @ {:p}", self)) + f.debug_struct(&format!("PangoAttrShape @ {self:p}")) .field("attr", &self.attr) .field("ink_rect", &self.ink_rect) .field("logical_rect", &self.logical_rect) @@ -598,7 +598,7 @@ pub struct PangoAttrSize { impl ::std::fmt::Debug for PangoAttrSize { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrSize @ {:p}", self)) + f.debug_struct(&format!("PangoAttrSize @ {self:p}")) .field("attr", &self.attr) .field("size", &self.size) .field("absolute", &self.absolute) @@ -615,7 +615,7 @@ pub struct PangoAttrString { impl ::std::fmt::Debug for PangoAttrString { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttrString @ {:p}", self)) + f.debug_struct(&format!("PangoAttrString @ {self:p}")) .field("attr", &self.attr) .field("value", &self.value) .finish() @@ -632,7 +632,7 @@ pub struct PangoAttribute { impl ::std::fmt::Debug for PangoAttribute { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoAttribute @ {:p}", self)) + f.debug_struct(&format!("PangoAttribute @ {self:p}")) .field("klass", &self.klass) .field("start_index", &self.start_index) .field("end_index", &self.end_index) @@ -650,7 +650,7 @@ pub struct PangoColor { impl ::std::fmt::Debug for PangoColor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoColor @ {:p}", self)) + f.debug_struct(&format!("PangoColor @ {self:p}")) .field("red", &self.red) .field("green", &self.green) .field("blue", &self.blue) @@ -688,7 +688,7 @@ pub struct PangoFontClass { impl ::std::fmt::Debug for PangoFontClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontClass @ {:p}", self)) + f.debug_struct(&format!("PangoFontClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("describe", &self.describe) .field("get_coverage", &self.get_coverage) @@ -710,7 +710,7 @@ pub struct PangoFontDescription { impl ::std::fmt::Debug for PangoFontDescription { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontDescription @ {:p}", self)) + f.debug_struct(&format!("PangoFontDescription @ {self:p}")) .finish() } } @@ -730,7 +730,7 @@ pub struct PangoFontFaceClass { impl ::std::fmt::Debug for PangoFontFaceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontFaceClass @ {:p}", self)) + f.debug_struct(&format!("PangoFontFaceClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_face_name", &self.get_face_name) .field("describe", &self.describe) @@ -760,7 +760,7 @@ pub struct PangoFontFamilyClass { impl ::std::fmt::Debug for PangoFontFamilyClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontFamilyClass @ {:p}", self)) + f.debug_struct(&format!("PangoFontFamilyClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("list_faces", &self.list_faces) .field("get_name", &self.get_name) @@ -804,7 +804,7 @@ pub struct PangoFontMapClass { impl ::std::fmt::Debug for PangoFontMapClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontMapClass @ {:p}", self)) + f.debug_struct(&format!("PangoFontMapClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("load_font", &self.load_font) .field("list_families", &self.list_families) @@ -835,7 +835,7 @@ pub struct PangoFontMetrics { impl ::std::fmt::Debug for PangoFontMetrics { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontMetrics @ {:p}", self)) + f.debug_struct(&format!("PangoFontMetrics @ {self:p}")) .finish() } } @@ -856,7 +856,7 @@ pub struct PangoFontsetClass { impl ::std::fmt::Debug for PangoFontsetClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontsetClass @ {:p}", self)) + f.debug_struct(&format!("PangoFontsetClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_font", &self.get_font) .field("get_metrics", &self.get_metrics) @@ -888,7 +888,7 @@ pub struct PangoGlyphGeometry { impl ::std::fmt::Debug for PangoGlyphGeometry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoGlyphGeometry @ {:p}", self)) + f.debug_struct(&format!("PangoGlyphGeometry @ {self:p}")) .field("width", &self.width) .field("x_offset", &self.x_offset) .field("y_offset", &self.y_offset) @@ -906,7 +906,7 @@ pub struct PangoGlyphInfo { impl ::std::fmt::Debug for PangoGlyphInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoGlyphInfo @ {:p}", self)) + f.debug_struct(&format!("PangoGlyphInfo @ {self:p}")) .field("glyph", &self.glyph) .field("geometry", &self.geometry) .field("attr", &self.attr) @@ -926,7 +926,7 @@ pub struct PangoGlyphItem { impl ::std::fmt::Debug for PangoGlyphItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoGlyphItem @ {:p}", self)) + f.debug_struct(&format!("PangoGlyphItem @ {self:p}")) .field("item", &self.item) .field("glyphs", &self.glyphs) .field("y_offset", &self.y_offset) @@ -951,7 +951,7 @@ pub struct PangoGlyphItemIter { impl ::std::fmt::Debug for PangoGlyphItemIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoGlyphItemIter @ {:p}", self)) + f.debug_struct(&format!("PangoGlyphItemIter @ {self:p}")) .field("glyph_item", &self.glyph_item) .field("text", &self.text) .field("start_glyph", &self.start_glyph) @@ -975,7 +975,7 @@ pub struct PangoGlyphString { impl ::std::fmt::Debug for PangoGlyphString { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoGlyphString @ {:p}", self)) + f.debug_struct(&format!("PangoGlyphString @ {self:p}")) .field("num_glyphs", &self.num_glyphs) .field("glyphs", &self.glyphs) .field("log_clusters", &self.log_clusters) @@ -991,7 +991,7 @@ pub struct PangoGlyphVisAttr { impl ::std::fmt::Debug for PangoGlyphVisAttr { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoGlyphVisAttr @ {:p}", self)) + f.debug_struct(&format!("PangoGlyphVisAttr @ {self:p}")) .field("is_cluster_start", &self.is_cluster_start) .finish() } @@ -1008,7 +1008,7 @@ pub struct PangoItem { impl ::std::fmt::Debug for PangoItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoItem @ {:p}", self)) + f.debug_struct(&format!("PangoItem @ {self:p}")) .field("offset", &self.offset) .field("length", &self.length) .field("num_chars", &self.num_chars) @@ -1025,7 +1025,7 @@ pub struct PangoLanguage { impl ::std::fmt::Debug for PangoLanguage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoLanguage @ {:p}", self)) + f.debug_struct(&format!("PangoLanguage @ {self:p}")) .finish() } } @@ -1046,7 +1046,7 @@ pub struct PangoLayoutIter { impl ::std::fmt::Debug for PangoLayoutIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoLayoutIter @ {:p}", self)) + f.debug_struct(&format!("PangoLayoutIter @ {self:p}")) .finish() } } @@ -1064,7 +1064,7 @@ pub struct PangoLayoutLine { impl ::std::fmt::Debug for PangoLayoutLine { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoLayoutLine @ {:p}", self)) + f.debug_struct(&format!("PangoLayoutLine @ {self:p}")) .field("layout", &self.layout) .field("start_index", &self.start_index) .field("length", &self.length) @@ -1083,7 +1083,7 @@ pub struct PangoLogAttr { impl ::std::fmt::Debug for PangoLogAttr { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoLogAttr @ {:p}", self)) + f.debug_struct(&format!("PangoLogAttr @ {self:p}")) .field("is_line_break", &self.is_line_break) .finish() } @@ -1102,7 +1102,7 @@ pub struct PangoMatrix { impl ::std::fmt::Debug for PangoMatrix { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoMatrix @ {:p}", self)) + f.debug_struct(&format!("PangoMatrix @ {self:p}")) .field("xx", &self.xx) .field("xy", &self.xy) .field("yx", &self.yx) @@ -1124,7 +1124,7 @@ pub struct PangoRectangle { impl ::std::fmt::Debug for PangoRectangle { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoRectangle @ {:p}", self)) + f.debug_struct(&format!("PangoRectangle @ {self:p}")) .field("x", &self.x) .field("y", &self.y) .field("width", &self.width) @@ -1182,7 +1182,7 @@ pub struct PangoRendererClass { impl ::std::fmt::Debug for PangoRendererClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoRendererClass @ {:p}", self)) + f.debug_struct(&format!("PangoRendererClass @ {self:p}")) .field("draw_glyphs", &self.draw_glyphs) .field("draw_rectangle", &self.draw_rectangle) .field("draw_error_underline", &self.draw_error_underline) @@ -1217,7 +1217,7 @@ pub struct PangoScriptIter { impl ::std::fmt::Debug for PangoScriptIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoScriptIter @ {:p}", self)) + f.debug_struct(&format!("PangoScriptIter @ {self:p}")) .finish() } } @@ -1230,7 +1230,7 @@ pub struct PangoTabArray { impl ::std::fmt::Debug for PangoTabArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoTabArray @ {:p}", self)) + f.debug_struct(&format!("PangoTabArray @ {self:p}")) .finish() } } @@ -1244,8 +1244,7 @@ pub struct PangoContext { impl ::std::fmt::Debug for PangoContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoContext @ {:p}", self)) - .finish() + f.debug_struct(&format!("PangoContext @ {self:p}")).finish() } } @@ -1257,7 +1256,7 @@ pub struct PangoCoverage { impl ::std::fmt::Debug for PangoCoverage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoCoverage @ {:p}", self)) + f.debug_struct(&format!("PangoCoverage @ {self:p}")) .finish() } } @@ -1270,7 +1269,7 @@ pub struct PangoFont { impl ::std::fmt::Debug for PangoFont { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFont @ {:p}", self)) + f.debug_struct(&format!("PangoFont @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1284,7 +1283,7 @@ pub struct PangoFontFace { impl ::std::fmt::Debug for PangoFontFace { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontFace @ {:p}", self)) + f.debug_struct(&format!("PangoFontFace @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1298,7 +1297,7 @@ pub struct PangoFontFamily { impl ::std::fmt::Debug for PangoFontFamily { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontFamily @ {:p}", self)) + f.debug_struct(&format!("PangoFontFamily @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1312,7 +1311,7 @@ pub struct PangoFontMap { impl ::std::fmt::Debug for PangoFontMap { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontMap @ {:p}", self)) + f.debug_struct(&format!("PangoFontMap @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1326,7 +1325,7 @@ pub struct PangoFontset { impl ::std::fmt::Debug for PangoFontset { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontset @ {:p}", self)) + f.debug_struct(&format!("PangoFontset @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } @@ -1340,7 +1339,7 @@ pub struct PangoFontsetSimple { impl ::std::fmt::Debug for PangoFontsetSimple { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoFontsetSimple @ {:p}", self)) + f.debug_struct(&format!("PangoFontsetSimple @ {self:p}")) .finish() } } @@ -1353,8 +1352,7 @@ pub struct PangoLayout { impl ::std::fmt::Debug for PangoLayout { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoLayout @ {:p}", self)) - .finish() + f.debug_struct(&format!("PangoLayout @ {self:p}")).finish() } } @@ -1371,7 +1369,7 @@ pub struct PangoRenderer { impl ::std::fmt::Debug for PangoRenderer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("PangoRenderer @ {:p}", self)) + f.debug_struct(&format!("PangoRenderer @ {self:p}")) .field("matrix", &self.matrix) .finish() } diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index 651e606eb1b2..83a0853fbf03 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 952ff416b599) +Generated by gir (https://github.com/gtk-rs/gir @ f0e953c094a5) from gir-files (https://github.com/gtk-rs/gir-files @ 89a11aa6a362) diff --git a/pangocairo/src/lib.rs b/pangocairo/src/lib.rs index b7c8471b0b93..8c96fc93cb8b 100644 --- a/pangocairo/src/lib.rs +++ b/pangocairo/src/lib.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +#![allow(clippy::should_implement_trait)] #![cfg_attr(feature = "dox", feature(doc_cfg))] #![doc = include_str!("../README.md")] diff --git a/pangocairo/sys/build.rs b/pangocairo/sys/build.rs index 631008acdbca..8d181dad8caa 100644 --- a/pangocairo/sys/build.rs +++ b/pangocairo/sys/build.rs @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - println!("cargo:warning={}", s); + println!("cargo:warning={s}"); process::exit(1); } } diff --git a/pangocairo/sys/src/lib.rs b/pangocairo/sys/src/lib.rs index 4b42bf3ec502..bd348c490159 100644 --- a/pangocairo/sys/src/lib.rs +++ b/pangocairo/sys/src/lib.rs @@ -34,7 +34,7 @@ pub struct PangoCairoFont { impl ::std::fmt::Debug for PangoCairoFont { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "PangoCairoFont @ {:p}", self) + write!(f, "PangoCairoFont @ {self:p}") } } @@ -46,7 +46,7 @@ pub struct PangoCairoFontMap { impl ::std::fmt::Debug for PangoCairoFontMap { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "PangoCairoFontMap @ {:p}", self) + write!(f, "PangoCairoFontMap @ {self:p}") } } diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index 651e606eb1b2..83a0853fbf03 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 952ff416b599) +Generated by gir (https://github.com/gtk-rs/gir @ f0e953c094a5) from gir-files (https://github.com/gtk-rs/gir-files @ 89a11aa6a362)