diff --git a/cairo/src/context.rs b/cairo/src/context.rs index fd3b7de4ebb8..250fbbfafbf6 100644 --- a/cairo/src/context.rs +++ b/cairo/src/context.rs @@ -53,12 +53,6 @@ impl fmt::Debug for RectangleList { } } -impl fmt::Display for RectangleList { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "RectangleList") - } -} - #[derive(Debug)] #[repr(transparent)] pub struct Context(ptr::NonNull); @@ -955,12 +949,6 @@ impl Context { } } -impl fmt::Display for Context { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Context") - } -} - #[cfg(test)] mod tests { use float_eq::float_eq; @@ -1014,6 +1002,5 @@ mod tests { assert!(float_eq!(first_rect.y(), 0.0, abs <= 0.000_1)); assert!(float_eq!(first_rect.width(), 10.0, abs <= 0.000_1)); assert!(float_eq!(first_rect.height(), 10.0, abs <= 0.000_1)); - assert_eq!(rect.to_string(), "RectangleList"); } } diff --git a/cairo/src/device.rs b/cairo/src/device.rs index b15796ccc607..001ddd816fe0 100644 --- a/cairo/src/device.rs +++ b/cairo/src/device.rs @@ -6,7 +6,7 @@ use std::ffi::CString; use std::marker::PhantomData; #[cfg(feature = "script")] use std::path::Path; -use std::{fmt, ptr}; +use std::ptr; #[cfg(feature = "use_glib")] use glib::translate::*; @@ -236,7 +236,7 @@ impl Device { panic!("you need to enable \"xcb\" feature") } } - d => panic!("invalid device type: {}", d), + d => panic!("invalid device type: {:#?}", d), } } @@ -266,7 +266,7 @@ impl Device { panic!("you need to enable \"xcb\" feature") } } - d => panic!("invalid device type: {}", d), + d => panic!("invalid device type: {:#?}", d), } } @@ -296,7 +296,7 @@ impl Device { panic!("you need to enable \"xcb\" feature") } } - d => panic!("invalid device type: {}", d), + d => panic!("invalid device type: {:#?}", d), } } @@ -387,9 +387,3 @@ impl Drop for Device { } } } - -impl fmt::Display for Device { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Device") - } -} diff --git a/cairo/src/enums.rs b/cairo/src/enums.rs index 65e4d3e12bd0..29cfbcd14673 100644 --- a/cairo/src/enums.rs +++ b/cairo/src/enums.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::fmt::{self, Debug}; +use std::fmt::Debug; #[cfg(feature = "use_glib")] use glib::translate::*; @@ -111,25 +111,6 @@ impl From for Antialias { } } -impl fmt::Display for Antialias { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Default => "Default", - Self::None => "None", - Self::Gray => "Gray", - Self::Subpixel => "Subpixel", - Self::Fast => "Fast", - Self::Good => "Good", - Self::Best => "Best", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(Antialias, ffi::gobject::cairo_gobject_antialias_get_type); @@ -167,20 +148,6 @@ impl From for FillRule { } } -impl fmt::Display for FillRule { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Winding => "Winding", - Self::EvenOdd => "EvenOdd", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(FillRule, ffi::gobject::cairo_gobject_fill_rule_get_type); @@ -222,21 +189,6 @@ impl From for LineCap { } } -impl fmt::Display for LineCap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Butt => "Butt", - Self::Round => "Round", - Self::Square => "Square", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(LineCap, ffi::gobject::cairo_gobject_line_cap_get_type); @@ -278,21 +230,6 @@ impl From for LineJoin { } } -impl fmt::Display for LineJoin { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Miter => "Miter", - Self::Round => "Round", - Self::Bevel => "Bevel", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(LineJoin, ffi::gobject::cairo_gobject_line_join_get_type); @@ -442,47 +379,6 @@ impl From for Operator { } } -impl fmt::Display for Operator { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Clear => "Clear", - Self::Source => "Source", - Self::Over => "Over", - Self::In => "In", - Self::Out => "Out", - Self::Atop => "Atop", - Self::Dest => "Dest", - Self::DestOver => "DestOver", - Self::DestIn => "DestIn", - Self::DestOut => "DestOut", - Self::DestAtop => "DestAtop", - Self::Xor => "Xor", - Self::Add => "Add", - Self::Saturate => "Saturate", - Self::Multiply => "Multiply", - Self::Screen => "Screen", - Self::Overlay => "Overlay", - Self::Darken => "Darken", - Self::Lighten => "Lighten", - Self::ColorDodge => "ColorDodge", - Self::ColorBurn => "ColorBurn", - Self::HardLight => "HardLight", - Self::SoftLight => "SoftLight", - Self::Difference => "Difference", - Self::Exclusion => "Exclusion", - Self::HslHue => "HslHue", - Self::HslSaturation => "HslSaturation", - Self::HslColor => "HslColor", - Self::HslLuminosity => "HslLuminosity", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(Operator, ffi::gobject::cairo_gobject_operator_get_type); @@ -528,22 +424,6 @@ impl From for PathDataType { } } -impl fmt::Display for PathDataType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::MoveTo => "MoveTo", - Self::LineTo => "LineTo", - Self::CurveTo => "CurveTo", - Self::ClosePath => "ClosePath", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!( PathDataType, @@ -588,21 +468,6 @@ impl From for Content { } } -impl fmt::Display for Content { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Color => "Color", - Self::Alpha => "Alpha", - Self::ColorAlpha => "ColorAlpha", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(Content, ffi::gobject::cairo_gobject_content_get_type); @@ -648,22 +513,6 @@ impl From for Extend { } } -impl fmt::Display for Extend { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::None => "None", - Self::Repeat => "Repeat", - Self::Reflect => "Reflect", - Self::Pad => "Pad", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(Extend, ffi::gobject::cairo_gobject_extend_get_type); @@ -717,24 +566,6 @@ impl From for Filter { } } -impl fmt::Display for Filter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Fast => "Fast", - Self::Good => "Good", - Self::Best => "Best", - Self::Nearest => "Nearest", - Self::Bilinear => "Bilinear", - Self::Gaussian => "Gaussian", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(Filter, ffi::gobject::cairo_gobject_filter_get_type); @@ -788,24 +619,6 @@ impl From for PatternType { } } -impl fmt::Display for PatternType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Solid => "Solid", - Self::Surface => "Surface", - Self::LinearGradient => "LinearGradient", - Self::RadialGradient => "RadialGradient", - Self::Mesh => "Mesh", - Self::RasterSource => "RasterSource", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!( PatternType, @@ -850,21 +663,6 @@ impl From for FontSlant { } } -impl fmt::Display for FontSlant { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Normal => "Normal", - Self::Italic => "Italic", - Self::Oblique => "Oblique", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(FontSlant, ffi::gobject::cairo_gobject_font_slant_get_type); @@ -902,20 +700,6 @@ impl From for FontWeight { } } -impl fmt::Display for FontWeight { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Normal => "Normal", - Self::Bold => "Bold", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(FontWeight, ffi::gobject::cairo_gobject_font_weight_get_type); @@ -953,20 +737,6 @@ impl From for TextClusterFlags { } } -impl fmt::Display for TextClusterFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::None => "None", - Self::Backward => "Backward", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!( TextClusterFlags, @@ -1027,25 +797,6 @@ impl From for FontType { } } -impl fmt::Display for FontType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::FontTypeToy => "FontTypeToy", - Self::FontTypeFt => "FontTypeFt", - Self::FontTypeWin32 => "FontTypeWin32", - Self::FontTypeQuartz => "FontTypeQuartz", - Self::FontTypeUser => "FontTypeUser", - #[cfg(feature = "v1_18")] - Self::FontTypeDwrite => "FontTypeDwrite", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(FontType, ffi::gobject::cairo_gobject_font_type_get_type); @@ -1095,23 +846,6 @@ impl From for SubpixelOrder { } } -impl fmt::Display for SubpixelOrder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Default => "Default", - Self::Rgb => "Rgb", - Self::Bgr => "Bgr", - Self::Vrgb => "Vrgb", - Self::Vbgr => "Vbgr", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!( SubpixelOrder, @@ -1164,23 +898,6 @@ impl From for HintStyle { } } -impl fmt::Display for HintStyle { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Default => "Default", - Self::None => "None", - Self::Slight => "Slight", - Self::Medium => "Medium", - Self::Full => "Full", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(HintStyle, ffi::gobject::cairo_gobject_hint_style_get_type); @@ -1222,21 +939,6 @@ impl From for HintMetrics { } } -impl fmt::Display for HintMetrics { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Default => "Default", - Self::Off => "Off", - Self::On => "On", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!( HintMetrics, @@ -1369,43 +1071,6 @@ impl From for SurfaceType { } } -impl fmt::Display for SurfaceType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Image => "Image", - Self::Pdf => "Pdf", - Self::Ps => "Ps", - Self::Xlib => "Xlib", - Self::Xcb => "Xcb", - Self::Glitz => "Glitz", - Self::Quartz => "Quartz", - Self::Win32 => "Win32", - Self::BeOs => "BeOs", - Self::DirectFb => "DirectFb", - Self::Svg => "Svg", - Self::Os2 => "Os2", - Self::Win32Printing => "Win32Printing", - Self::QuartzImage => "QuartzImage", - Self::Script => "Script", - Self::Qt => "Qt", - Self::Recording => "Recording", - Self::Vg => "Vg", - Self::Gl => "Gl", - Self::Drm => "Drm", - Self::Tee => "Tee", - Self::Xml => "Xml", - Self::Skia => "Skia", - Self::Subsurface => "Subsurface", - Self::Cogl => "Cogl", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!( SurfaceType, @@ -1484,30 +1149,6 @@ impl From for SvgUnit { } } -#[cfg(all(feature = "svg", feature = "v1_16"))] -#[cfg_attr(docsrs, doc(cfg(all(feature = "svg", feature = "v1_16"))))] -impl fmt::Display for SvgUnit { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::User => "User", - Self::Em => "Em", - Self::Ex => "Ex", - Self::Px => "Px", - Self::In => "In", - Self::Cm => "Cm", - Self::Mm => "Mm", - Self::Pt => "Pt", - Self::Pc => "Pc", - Self::Percent => "Percent", - _ => "Unknown", - } - ) - } -} - #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[non_exhaustive] #[doc(alias = "cairo_format_t")] @@ -1562,25 +1203,6 @@ impl From for Format { } } -impl fmt::Display for Format { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Invalid => "Invalid", - Self::ARgb32 => "ARgb32", - Self::Rgb24 => "Rgb24", - Self::A8 => "A8", - Self::A1 => "A1", - Self::Rgb16_565 => "Rgb16_565", - Self::Rgb30 => "Rgb30", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(Format, ffi::gobject::cairo_gobject_format_get_type); @@ -1637,21 +1259,6 @@ impl From for RegionOverlap { } } -impl fmt::Display for RegionOverlap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::In => "In", - Self::Out => "Out", - Self::Part => "Part", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!( RegionOverlap, @@ -1730,27 +1337,6 @@ impl From for PdfMetadata { } } -#[cfg(all(feature = "pdf", feature = "v1_16"))] -#[cfg_attr(docsrs, doc(cfg(all(feature = "pdf", feature = "v1_16"))))] -impl fmt::Display for PdfMetadata { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Title => "Title", - Self::Author => "Author", - Self::Subject => "Subject", - Self::Keywords => "Keywords", - Self::Creator => "Creator", - Self::CreateDate => "CreateDate", - Self::ModDate => "ModDate", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "pdf")] #[cfg_attr(docsrs, doc(cfg(feature = "pdf")))] #[derive(Clone, Copy, Debug, PartialEq, Eq)] @@ -1807,26 +1393,6 @@ impl From for PdfVersion { } } -#[cfg(feature = "pdf")] -#[cfg_attr(docsrs, doc(cfg(feature = "pdf")))] -impl fmt::Display for PdfVersion { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::_1_4 => "1_4", - Self::_1_5 => "1_5", - #[cfg(feature = "v1_18")] - Self::_1_6 => "1_6", - #[cfg(feature = "v1_18")] - Self::_1_7 => "1_7", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "svg")] #[cfg_attr(docsrs, doc(cfg(feature = "svg")))] #[derive(Clone, Copy, Debug, PartialEq, Eq)] @@ -1867,22 +1433,6 @@ impl From for SvgVersion { } } -#[cfg(feature = "svg")] -#[cfg_attr(docsrs, doc(cfg(feature = "svg")))] -impl fmt::Display for SvgVersion { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::_1_1 => "1_1", - Self::_1_2 => "1_2", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "ps")] #[cfg_attr(docsrs, doc(cfg(feature = "ps")))] #[derive(Clone, Copy, Debug, PartialEq, Eq)] @@ -1923,22 +1473,6 @@ impl From for PsLevel { } } -#[cfg(feature = "ps")] -#[cfg_attr(docsrs, doc(cfg(feature = "ps")))] -impl fmt::Display for PsLevel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::_2 => "_2", - Self::_3 => "_3", - _ => "Unknown", - } - ) - } -} - #[derive(Clone, PartialEq, Eq, PartialOrd, Copy, Debug)] #[non_exhaustive] #[doc(alias = "cairo_mesh_corner_t")] @@ -1981,22 +1515,6 @@ impl From for MeshCorner { } } -impl fmt::Display for MeshCorner { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::MeshCorner0 => "MeshCorner0", - Self::MeshCorner1 => "MeshCorner1", - Self::MeshCorner2 => "MeshCorner2", - Self::MeshCorner3 => "MeshCorner3", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "freetype")] #[cfg_attr(docsrs, doc(cfg(feature = "freetype")))] #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Copy)] @@ -2037,22 +1555,6 @@ impl From for FtSynthesize { } } -#[cfg(feature = "freetype")] -#[cfg_attr(docsrs, doc(cfg(feature = "freetype")))] -impl fmt::Display for FtSynthesize { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Bold => "Bold", - Self::Oblique => "Oblique", - Self::__Unknown(_) => "Unknown", - } - ) - } -} - #[cfg(feature = "script")] #[cfg_attr(docsrs, doc(cfg(feature = "script")))] #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Copy)] @@ -2093,22 +1595,6 @@ impl From for ScriptMode { } } -#[cfg(feature = "script")] -#[cfg_attr(docsrs, doc(cfg(feature = "script")))] -impl fmt::Display for ScriptMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Ascii => "Ascii", - Self::Binary => "Binary", - Self::__Unknown(_) => "Unknown", - } - ) - } -} - #[derive(Clone, PartialEq, Eq, PartialOrd, Debug, Copy)] #[non_exhaustive] #[doc(alias = "cairo_device_type_t")] @@ -2171,27 +1657,6 @@ impl From for DeviceType { } } -impl fmt::Display for DeviceType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::Ascii => "Ascii", - Self::Binary => "Binary", - Self::Script => "Script", - Self::Xcb => "Xcb", - Self::Xlib => "Xlib", - Self::Xml => "Xml", - Self::Cogl => "Cogl", - Self::Win32 => "Win32", - Self::Invalid => "Invalid", - Self::__Unknown(_) => "Unknown", - } - ) - } -} - #[cfg(feature = "use_glib")] gvalue_impl!(DeviceType, ffi::gobject::cairo_gobject_device_type_get_type); diff --git a/cairo/src/image_surface.rs b/cairo/src/image_surface.rs index 4ebee8880a7b..1f99f5d9cd2e 100644 --- a/cairo/src/image_surface.rs +++ b/cairo/src/image_surface.rs @@ -2,7 +2,6 @@ use std::{ convert::TryFrom, - fmt, ops::{Deref, DerefMut}, rc::Rc, slice, @@ -283,12 +282,6 @@ impl<'a> DerefMut for ImageSurfaceData<'a> { } } -impl<'a> fmt::Display for ImageSurfaceData<'a> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "ImageSurfaceData") - } -} - // Workaround for cairo not having a direct way to check if the surface is finished. // See: https://gitlab.freedesktop.org/cairo/cairo/-/issues/406 fn is_finished(surface: &ImageSurface) -> bool { diff --git a/cairo/src/paths.rs b/cairo/src/paths.rs index 9a5a51293fdd..01190aee266e 100644 --- a/cairo/src/paths.rs +++ b/cairo/src/paths.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{fmt, iter::FusedIterator, ptr}; +use std::{iter::FusedIterator, ptr}; use crate::{ffi::cairo_path_t, PathDataType}; @@ -50,12 +50,6 @@ impl Drop for Path { } } -impl fmt::Display for Path { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Path") - } -} - #[derive(Debug, Clone, Copy, PartialEq)] pub enum PathSegment { MoveTo((f64, f64)), @@ -64,21 +58,6 @@ pub enum PathSegment { ClosePath, } -impl fmt::Display for PathSegment { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Self::{}", - match *self { - Self::MoveTo(_) => "MoveTo", - Self::LineTo(_) => "LineTo", - Self::CurveTo(_, _, _) => "CurveTo", - Self::ClosePath => "ClosePath", - } - ) - } -} - pub struct PathSegments<'a> { data: &'a [ffi::cairo_path_data], i: usize, @@ -115,12 +94,6 @@ impl<'a> Iterator for PathSegments<'a> { impl<'a> FusedIterator for PathSegments<'a> {} -impl<'a> fmt::Display for PathSegments<'a> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "PathSegments") - } -} - fn to_tuple(pair: &[f64; 2]) -> (f64, f64) { (pair[0], pair[1]) } diff --git a/cairo/src/patterns.rs b/cairo/src/patterns.rs index 677b1128f352..df462ee2772f 100644 --- a/cairo/src/patterns.rs +++ b/cairo/src/patterns.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{convert::TryFrom, fmt, ops::Deref, ptr}; +use std::{convert::TryFrom, ops::Deref, ptr}; use libc::{c_double, c_int, c_uint}; @@ -16,12 +16,6 @@ pub struct Pattern { pointer: *mut cairo_pattern_t, } -impl fmt::Display for Pattern { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Pattern") - } -} - impl Pattern { user_data_methods! { ffi::cairo_pattern_get_user_data, @@ -166,12 +160,6 @@ macro_rules! pattern_type( } } - impl fmt::Display for $pattern_type { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, stringify!($pattern_type)) - } - } - $( convert!(Pattern => $pattern_type = $variant); )* @@ -303,12 +291,6 @@ macro_rules! gradient_type { } } - impl fmt::Display for $gradient_type { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, stringify!($gradient_type)) - } - } - convert!(Pattern => $gradient_type = $gradient_type (Gradient)); convert!(Gradient => $gradient_type = $gradient_type); } diff --git a/cairo/src/pdf.rs b/cairo/src/pdf.rs index 099aeb6c560a..d925fc27c7dc 100644 --- a/cairo/src/pdf.rs +++ b/cairo/src/pdf.rs @@ -3,7 +3,7 @@ use std::{ convert::TryFrom, ffi::{CStr, CString}, - fmt, io, mem, + io, mem, ops::Deref, path::Path, ptr, diff --git a/cairo/src/ps.rs b/cairo/src/ps.rs index 6e01d686084c..340e4cbf9d3a 100644 --- a/cairo/src/ps.rs +++ b/cairo/src/ps.rs @@ -3,7 +3,7 @@ use std::{ convert::TryFrom, ffi::{CStr, CString}, - fmt, io, mem, + io, mem, ops::Deref, path::Path, ptr, diff --git a/cairo/src/recording_surface.rs b/cairo/src/recording_surface.rs index 70be12131cf1..de789ca671d5 100644 --- a/cairo/src/recording_surface.rs +++ b/cairo/src/recording_surface.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{convert::TryFrom, fmt, ops::Deref}; +use std::{convert::TryFrom, ops::Deref}; #[cfg(feature = "use_glib")] use glib::translate::*; diff --git a/cairo/src/rectangle.rs b/cairo/src/rectangle.rs index 6ac4aa683811..c440ba5bcad5 100644 --- a/cairo/src/rectangle.rs +++ b/cairo/src/rectangle.rs @@ -146,12 +146,6 @@ impl Rectangle { } } -impl fmt::Display for Rectangle { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Rectangle") - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/cairo/src/rectangle_int.rs b/cairo/src/rectangle_int.rs index f9a96784e1a4..957e2f1ff8d2 100644 --- a/cairo/src/rectangle_int.rs +++ b/cairo/src/rectangle_int.rs @@ -145,9 +145,3 @@ impl RectangleInt { ptr as *mut ffi::cairo_rectangle_int_t } } - -impl fmt::Display for RectangleInt { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "RectangleInt") - } -} diff --git a/cairo/src/region.rs b/cairo/src/region.rs index d3ec278610b0..787459c42666 100644 --- a/cairo/src/region.rs +++ b/cairo/src/region.rs @@ -2,7 +2,7 @@ #[cfg(feature = "use_glib")] use std::marker::PhantomData; -use std::{fmt, ptr}; +use std::ptr; #[cfg(feature = "use_glib")] use glib::translate::*; @@ -163,7 +163,7 @@ impl Region { #[doc(alias = "get_extents")] #[doc(alias = "cairo_region_get_extents")] - pub fn extents(&self, rectangle: &mut RectangleInt) { + pub fn extents(&self, rectangle: &RectangleInt) { unsafe { ffi::cairo_region_get_extents(self.0.as_ptr(), rectangle.to_raw_none()) } } @@ -280,9 +280,3 @@ impl Region { status_to_result(status) } } - -impl fmt::Display for Region { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Region") - } -} diff --git a/cairo/src/surface.rs b/cairo/src/surface.rs index b097c9f6c94f..feecb46dcd57 100644 --- a/cairo/src/surface.rs +++ b/cairo/src/surface.rs @@ -2,7 +2,7 @@ #[cfg(feature = "use_glib")] use std::marker::PhantomData; -use std::{ffi::CString, fmt, ops::Deref, ptr, slice}; +use std::{ffi::CString, ops::Deref, ptr, slice}; #[cfg(feature = "use_glib")] use glib::translate::*; @@ -366,12 +366,6 @@ impl AsRef for Surface { } } -impl fmt::Display for Surface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Surface") - } -} - impl Surface { #[doc(alias = "cairo_surface_flush")] pub fn flush(&self) { @@ -428,12 +422,6 @@ impl Drop for MappedImageSurface { } } -impl fmt::Display for MappedImageSurface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "MappedImageSurface") - } -} - #[cfg(test)] mod tests { use crate::{constants::MIME_TYPE_PNG, Format, ImageSurface}; diff --git a/cairo/src/surface_macros.rs b/cairo/src/surface_macros.rs index 89cf0db9ea74..208c250ec4b7 100644 --- a/cairo/src/surface_macros.rs +++ b/cairo/src/surface_macros.rs @@ -121,11 +121,5 @@ macro_rules! declare_surface { $surf_name(self.0.clone()) } } - - impl fmt::Display for $surf_name { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(stringify!($surf_name)) - } - } }; } diff --git a/cairo/src/svg.rs b/cairo/src/svg.rs index e761dbf59ad6..364bfe219814 100644 --- a/cairo/src/svg.rs +++ b/cairo/src/svg.rs @@ -5,7 +5,7 @@ use std::os::unix::prelude::*; use std::{ convert::TryFrom, ffi::{CStr, CString}, - fmt, io, mem, + io, mem, ops::Deref, path::Path, ptr, diff --git a/cairo/src/win32_surface.rs b/cairo/src/win32_surface.rs index 480da2a1fa9b..5d4dfd490250 100644 --- a/cairo/src/win32_surface.rs +++ b/cairo/src/win32_surface.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{convert::TryFrom, fmt, ops::Deref}; +use std::{convert::TryFrom, ops::Deref}; pub use ffi::winapi; #[cfg(feature = "use_glib")] diff --git a/cairo/src/xcb.rs b/cairo/src/xcb.rs index 74b7c3d25838..bcad165388a3 100644 --- a/cairo/src/xcb.rs +++ b/cairo/src/xcb.rs @@ -2,7 +2,7 @@ #[cfg(feature = "use_glib")] use std::marker::PhantomData; -use std::{convert::TryFrom, fmt, ops::Deref, ptr}; +use std::{convert::TryFrom, ops::Deref, ptr}; #[cfg(feature = "use_glib")] use glib::translate::*; @@ -19,12 +19,6 @@ impl XCBDrawable { } } -impl fmt::Display for XCBDrawable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "XCBDrawable") - } -} - #[derive(Debug)] pub struct XCBPixmap(pub u32); @@ -35,12 +29,6 @@ impl XCBPixmap { } } -impl fmt::Display for XCBPixmap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "XCBPixmap") - } -} - #[derive(Debug)] #[doc(alias = "xcb_connection_t")] pub struct XCBConnection(pub ptr::NonNull); @@ -111,12 +99,6 @@ impl Clone for XCBConnection { } } -impl fmt::Display for XCBConnection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "XCBConnection") - } -} - #[derive(Debug)] #[doc(alias = "xcb_render_pictforminfo_t")] pub struct XCBRenderPictFormInfo(pub ptr::NonNull); @@ -193,12 +175,6 @@ impl Clone for XCBRenderPictFormInfo { } } -impl fmt::Display for XCBRenderPictFormInfo { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "XCBRenderPictFormInfo") - } -} - #[derive(Debug)] #[doc(alias = "xcb_screen_t")] pub struct XCBScreen(pub ptr::NonNull); @@ -269,12 +245,6 @@ impl Clone for XCBScreen { } } -impl fmt::Display for XCBScreen { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "XCBScreen") - } -} - declare_surface!(XCBSurface, SurfaceType::Xcb); impl XCBSurface { @@ -436,12 +406,6 @@ impl Clone for XCBVisualType { } } -impl fmt::Display for XCBVisualType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "XCBVisualType") - } -} - impl crate::device::Device { #[doc(alias = "cairo_xcb_device_get_connection")] #[doc(alias = "get_connection")] diff --git a/gdk-pixbuf/src/auto/enums.rs b/gdk-pixbuf/src/auto/enums.rs index 4bf8c7ef71e8..75643eea87c5 100644 --- a/gdk-pixbuf/src/auto/enums.rs +++ b/gdk-pixbuf/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -15,19 +14,6 @@ pub enum Colorspace { __Unknown(i32), } -impl fmt::Display for Colorspace { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Colorspace::{}", - match *self { - Self::Rgb => "Rgb", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Colorspace { type GlibType = ffi::GdkColorspace; @@ -54,6 +40,7 @@ impl FromGlib for Colorspace { impl StaticType for Colorspace { #[inline] + #[doc(alias = "gdk_colorspace_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_colorspace_get_type()) } } @@ -65,7 +52,7 @@ impl glib::HasParamSpec for Colorspace { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -121,22 +108,6 @@ pub enum InterpType { __Unknown(i32), } -impl fmt::Display for InterpType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "InterpType::{}", - match *self { - Self::Nearest => "Nearest", - Self::Tiles => "Tiles", - Self::Bilinear => "Bilinear", - Self::Hyper => "Hyper", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for InterpType { type GlibType = ffi::GdkInterpType; @@ -169,6 +140,7 @@ impl FromGlib for InterpType { impl StaticType for InterpType { #[inline] + #[doc(alias = "gdk_interp_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_interp_type_get_type()) } } @@ -180,7 +152,7 @@ impl glib::HasParamSpec for InterpType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -233,21 +205,6 @@ pub enum PixbufAlphaMode { __Unknown(i32), } -#[allow(deprecated)] -impl fmt::Display for PixbufAlphaMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PixbufAlphaMode::{}", - match *self { - Self::Bilevel => "Bilevel", - Self::Full => "Full", - _ => "Unknown", - } - ) - } -} - #[allow(deprecated)] #[doc(hidden)] impl IntoGlib for PixbufAlphaMode { @@ -279,6 +236,7 @@ impl FromGlib for PixbufAlphaMode { #[allow(deprecated)] impl StaticType for PixbufAlphaMode { #[inline] + #[doc(alias = "gdk_pixbuf_alpha_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_pixbuf_alpha_mode_get_type()) } } @@ -291,7 +249,7 @@ impl glib::HasParamSpec for PixbufAlphaMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -357,25 +315,6 @@ pub enum PixbufError { __Unknown(i32), } -impl fmt::Display for PixbufError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PixbufError::{}", - match *self { - Self::CorruptImage => "CorruptImage", - Self::InsufficientMemory => "InsufficientMemory", - Self::BadOption => "BadOption", - Self::UnknownType => "UnknownType", - Self::UnsupportedOperation => "UnsupportedOperation", - Self::Failed => "Failed", - Self::IncompleteAnimation => "IncompleteAnimation", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for PixbufError { type GlibType = ffi::GdkPixbufError; @@ -435,6 +374,7 @@ impl glib::error::ErrorDomain for PixbufError { impl StaticType for PixbufError { #[inline] + #[doc(alias = "gdk_pixbuf_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_pixbuf_error_get_type()) } } @@ -446,7 +386,7 @@ impl glib::HasParamSpec for PixbufError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -502,22 +442,6 @@ pub enum PixbufRotation { __Unknown(i32), } -impl fmt::Display for PixbufRotation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PixbufRotation::{}", - match *self { - Self::None => "None", - Self::Counterclockwise => "Counterclockwise", - Self::Upsidedown => "Upsidedown", - Self::Clockwise => "Clockwise", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for PixbufRotation { type GlibType = ffi::GdkPixbufRotation; @@ -550,6 +474,7 @@ impl FromGlib for PixbufRotation { impl StaticType for PixbufRotation { #[inline] + #[doc(alias = "gdk_pixbuf_rotation_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_pixbuf_rotation_get_type()) } } @@ -561,7 +486,7 @@ impl glib::HasParamSpec for PixbufRotation { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gdk-pixbuf/src/auto/flags.rs b/gdk-pixbuf/src/auto/flags.rs index 22ca89484e38..1bac5621cc16 100644 --- a/gdk-pixbuf/src/auto/flags.rs +++ b/gdk-pixbuf/src/auto/flags.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, translate::*}; -use std::fmt; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -18,12 +17,6 @@ bitflags! { } } -impl fmt::Display for PixbufFormatFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for PixbufFormatFlags { type GlibType = ffi::GdkPixbufFormatFlags; diff --git a/gdk-pixbuf/src/auto/mod.rs b/gdk-pixbuf/src/auto/mod.rs index bebf038e131f..2edebd6f4372 100644 --- a/gdk-pixbuf/src/auto/mod.rs +++ b/gdk-pixbuf/src/auto/mod.rs @@ -31,8 +31,7 @@ pub use self::enums::PixbufRotation; mod flags; pub use self::flags::PixbufFormatFlags; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::pixbuf_animation::PixbufAnimationExt; pub use super::pixbuf_loader::PixbufLoaderExt; } diff --git a/gdk-pixbuf/src/auto/pixbuf.rs b/gdk-pixbuf/src/auto/pixbuf.rs index ee9d54c4b3fb..ec68cb2c80a0 100644 --- a/gdk-pixbuf/src/auto/pixbuf.rs +++ b/gdk-pixbuf/src/auto/pixbuf.rs @@ -4,7 +4,6 @@ use crate::{Colorspace, InterpType, PixbufFormat, PixbufRotation}; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GdkPixbuf")] @@ -69,7 +68,7 @@ impl Pixbuf { #[doc(alias = "new_from_file")] pub fn from_file(filename: impl AsRef) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_new_from_file(filename.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -88,7 +87,7 @@ impl Pixbuf { preserve_aspect_ratio: bool, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_new_from_file_at_scale( filename.as_ref().to_glib_none().0, width, @@ -112,7 +111,7 @@ impl Pixbuf { height: i32, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_new_from_file_at_size( filename.as_ref().to_glib_none().0, width, @@ -131,7 +130,7 @@ impl Pixbuf { #[doc(alias = "new_from_resource")] pub fn from_resource(resource_path: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_new_from_resource(resource_path.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -150,7 +149,7 @@ impl Pixbuf { preserve_aspect_ratio: bool, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_new_from_resource_at_scale( resource_path.to_glib_none().0, width, @@ -173,7 +172,7 @@ impl Pixbuf { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_new_from_stream( stream.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -197,7 +196,7 @@ impl Pixbuf { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_new_from_stream_at_scale( stream.as_ref().to_glib_none().0, width, @@ -674,7 +673,7 @@ impl Pixbuf { #[doc(alias = "gdk_pixbuf_init_modules")] pub fn init_modules(path: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gdk_pixbuf_init_modules(path.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -685,9 +684,3 @@ impl Pixbuf { } } } - -impl fmt::Display for Pixbuf { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Pixbuf") - } -} diff --git a/gdk-pixbuf/src/auto/pixbuf_animation.rs b/gdk-pixbuf/src/auto/pixbuf_animation.rs index 21d6d8d2aa12..fb2b5a83e5cc 100644 --- a/gdk-pixbuf/src/auto/pixbuf_animation.rs +++ b/gdk-pixbuf/src/auto/pixbuf_animation.rs @@ -4,7 +4,7 @@ use crate::Pixbuf; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GdkPixbufAnimation")] @@ -24,7 +24,7 @@ impl PixbufAnimation { filename: impl AsRef, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_animation_new_from_file( filename.as_ref().to_glib_none().0, &mut error, @@ -41,7 +41,7 @@ impl PixbufAnimation { #[doc(alias = "new_from_resource")] pub fn from_resource(resource_path: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_animation_new_from_resource( resource_path.to_glib_none().0, &mut error, @@ -61,7 +61,7 @@ impl PixbufAnimation { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_animation_new_from_stream( stream.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -101,7 +101,7 @@ impl PixbufAnimation { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_animation_new_from_stream_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -176,9 +176,3 @@ pub trait PixbufAnimationExt: IsA + sealed::Sealed + 'static { } impl> PixbufAnimationExt for O {} - -impl fmt::Display for PixbufAnimation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PixbufAnimation") - } -} diff --git a/gdk-pixbuf/src/auto/pixbuf_loader.rs b/gdk-pixbuf/src/auto/pixbuf_loader.rs index 7247e3ac897f..83cdb66a6025 100644 --- a/gdk-pixbuf/src/auto/pixbuf_loader.rs +++ b/gdk-pixbuf/src/auto/pixbuf_loader.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkPixbufLoader")] @@ -31,7 +31,7 @@ impl PixbufLoader { #[doc(alias = "new_with_mime_type")] pub fn with_mime_type(mime_type: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_loader_new_with_mime_type(mime_type.to_glib_none().0, &mut error); if error.is_null() { @@ -46,7 +46,7 @@ impl PixbufLoader { #[doc(alias = "new_with_type")] pub fn with_type(image_type: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_pixbuf_loader_new_with_type(image_type.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -72,7 +72,7 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gdk_pixbuf_loader_close")] fn close(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gdk_pixbuf_loader_close(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -124,7 +124,7 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { fn write(&self, buf: &[u8]) -> Result<(), glib::Error> { let count = buf.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gdk_pixbuf_loader_write( self.as_ref().to_glib_none().0, buf.to_glib_none().0, @@ -143,7 +143,7 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gdk_pixbuf_loader_write_bytes")] fn write_bytes(&self, buffer: &glib::Bytes) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gdk_pixbuf_loader_write_bytes( self.as_ref().to_glib_none().0, buffer.to_glib_none().0, @@ -172,7 +172,7 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"area-prepared\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( area_prepared_trampoline:: as *const (), )), Box_::into_raw(f), @@ -210,7 +210,7 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"area-updated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( area_updated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -232,7 +232,7 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"closed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( closed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -263,7 +263,7 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"size-prepared\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( size_prepared_trampoline:: as *const (), )), Box_::into_raw(f), @@ -273,9 +273,3 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { } impl> PixbufLoaderExt for O {} - -impl fmt::Display for PixbufLoader { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PixbufLoader") - } -} diff --git a/gdk-pixbuf/src/auto/pixbuf_non_anim.rs b/gdk-pixbuf/src/auto/pixbuf_non_anim.rs index d9b3bb4484a6..9653d881616f 100644 --- a/gdk-pixbuf/src/auto/pixbuf_non_anim.rs +++ b/gdk-pixbuf/src/auto/pixbuf_non_anim.rs @@ -4,7 +4,6 @@ use crate::{Pixbuf, PixbufAnimation}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkPixbufNonAnim")] @@ -24,9 +23,3 @@ impl PixbufNonAnim { } } } - -impl fmt::Display for PixbufNonAnim { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PixbufNonAnim") - } -} diff --git a/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs b/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs index 005a53407b76..0b69f025d52a 100644 --- a/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs +++ b/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkPixbufSimpleAnim")] @@ -60,7 +60,7 @@ impl PixbufSimpleAnim { connect_raw( self.as_ptr() as *mut _, b"notify::loop\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_loop_trampoline:: as *const (), )), Box_::into_raw(f), @@ -68,9 +68,3 @@ impl PixbufSimpleAnim { } } } - -impl fmt::Display for PixbufSimpleAnim { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PixbufSimpleAnim") - } -} diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index dd6ac754e173..59401b409365 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/gdk-pixbuf/sys/Cargo.toml b/gdk-pixbuf/sys/Cargo.toml index 0a4bfa34d88a..041d0ba7b96f 100644 --- a/gdk-pixbuf/sys/Cargo.toml +++ b/gdk-pixbuf/sys/Cargo.toml @@ -40,12 +40,6 @@ version = "0.19.0" edition = "2021" rust-version = "1.70" -[package.metadata.docs.rs] -all-features = true -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] -features = [] - [package.metadata.system-deps.gdk_pixbuf_2_0] name = "gdk-pixbuf-2.0" version = "2.36.8" @@ -55,3 +49,8 @@ version = "2.40" [package.metadata.system-deps.gdk_pixbuf_2_0.v2_42] version = "2.42" + +[package.metadata.docs.rs] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +all-features = true diff --git a/gdk-pixbuf/sys/tests/abi.rs b/gdk-pixbuf/sys/tests/abi.rs index 278a0c951d09..895b9f28036b 100644 --- a/gdk-pixbuf/sys/tests/abi.rs +++ b/gdk-pixbuf/sys/tests/abi.rs @@ -10,7 +10,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -70,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index dd6ac754e173..59401b409365 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 @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/gio/Gir.toml b/gio/Gir.toml index df470371c1ff..4af54946d391 100644 --- a/gio/Gir.toml +++ b/gio/Gir.toml @@ -827,18 +827,6 @@ status = "generate" name = "set_attribute_stringv" # use strv manual = true - [[object.function]] - name = "get_attribute_file_path" - version = "2.78" - [object.function.return] - nullable = true - type = "filename" - [[object.function]] - name = "set_attribute_file_path" - version = "2.78" - [[object.function.parameter]] - name = "attr_value" - string_type = "filename" [[object]] name = "Gio.FilterOutputStream" @@ -1510,7 +1498,6 @@ manual_traits = ["UnixInputStreamExtManual"] [[object]] name = "Gio.UnixMountEntry" status = "generate" -version = "2.54" concurrency = "send+sync" cfg_condition = "unix" [[object.derive]] @@ -1519,7 +1506,6 @@ cfg_condition = "unix" [[object]] name = "Gio.UnixMountPoint" status = "generate" -version = "2.54" concurrency = "send+sync" cfg_condition = "unix" [[object.derive]] diff --git a/gio/src/auto/action.rs b/gio/src/auto/action.rs index 622e0fa25bd4..7946b27b42c8 100644 --- a/gio/src/auto/action.rs +++ b/gio/src/auto/action.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GAction")] @@ -31,9 +31,9 @@ impl Action { detailed_name: &str, ) -> Result<(glib::GString, Option), glib::Error> { unsafe { - let mut action_name = ptr::null_mut(); - let mut target_value = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut action_name = std::ptr::null_mut(); + let mut target_value = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_action_parse_detailed_name( detailed_name.to_glib_none().0, &mut action_name, @@ -138,7 +138,7 @@ pub trait ActionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::enabled\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_enabled_trampoline:: as *const (), )), Box_::into_raw(f), @@ -161,7 +161,7 @@ pub trait ActionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,7 +187,7 @@ pub trait ActionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::parameter-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_parameter_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -210,7 +210,7 @@ pub trait ActionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -233,7 +233,7 @@ pub trait ActionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::state-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_state_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -243,9 +243,3 @@ pub trait ActionExt: IsA + sealed::Sealed + 'static { } impl> ActionExt for O {} - -impl fmt::Display for Action { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Action") - } -} diff --git a/gio/src/auto/action_group.rs b/gio/src/auto/action_group.rs index cfd81191daab..b13f8a8ad395 100644 --- a/gio/src/auto/action_group.rs +++ b/gio/src/auto/action_group.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GActionGroup")] @@ -195,7 +195,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( action_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -235,7 +235,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( action_enabled_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -272,7 +272,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( action_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -311,7 +311,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( action_state_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -321,9 +321,3 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { } impl> ActionGroupExt for O {} - -impl fmt::Display for ActionGroup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ActionGroup") - } -} diff --git a/gio/src/auto/action_map.rs b/gio/src/auto/action_map.rs index 53147a60fb94..1c1f71beaec5 100644 --- a/gio/src/auto/action_map.rs +++ b/gio/src/auto/action_map.rs @@ -4,7 +4,6 @@ use crate::Action; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GActionMap")] @@ -57,9 +56,3 @@ pub trait ActionMapExt: IsA + sealed::Sealed + 'static { } impl> ActionMapExt for O {} - -impl fmt::Display for ActionMap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ActionMap") - } -} diff --git a/gio/src/auto/app_info.rs b/gio/src/auto/app_info.rs index 4cf085b4ce51..e27b125ffd7c 100644 --- a/gio/src/auto/app_info.rs +++ b/gio/src/auto/app_info.rs @@ -4,7 +4,7 @@ use crate::{AppInfoCreateFlags, AppLaunchContext, AsyncResult, Cancellable, File, Icon}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GAppInfo")] @@ -25,7 +25,7 @@ impl AppInfo { flags: AppInfoCreateFlags, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_app_info_create_from_commandline( commandline.as_ref().to_glib_none().0, application_name.to_glib_none().0, @@ -96,7 +96,7 @@ impl AppInfo { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_app_info_get_default_for_type_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -180,7 +180,7 @@ impl AppInfo { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_app_info_get_default_for_uri_scheme_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -245,7 +245,7 @@ impl AppInfo { context: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_launch_default_for_uri( uri.to_glib_none().0, context.map(|p| p.as_ref()).to_glib_none().0, @@ -286,7 +286,7 @@ impl AppInfo { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_app_info_launch_default_for_uri_finish(res, &mut error); let result = if error.is_null() { Ok(()) @@ -348,7 +348,7 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_app_info_add_supports_type")] fn add_supports_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_add_supports_type( self.as_ref().to_glib_none().0, content_type.to_glib_none().0, @@ -473,7 +473,7 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { context: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_launch( self.as_ref().to_glib_none().0, files.to_glib_none().0, @@ -496,7 +496,7 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { context: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_launch_uris( self.as_ref().to_glib_none().0, uris.to_glib_none().0, @@ -515,7 +515,7 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_app_info_remove_supports_type")] fn remove_supports_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_remove_supports_type( self.as_ref().to_glib_none().0, content_type.to_glib_none().0, @@ -536,7 +536,7 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { extension: impl AsRef, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_set_as_default_for_extension( self.as_ref().to_glib_none().0, extension.as_ref().to_glib_none().0, @@ -554,7 +554,7 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_app_info_set_as_default_for_type")] fn set_as_default_for_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_set_as_default_for_type( self.as_ref().to_glib_none().0, content_type.to_glib_none().0, @@ -572,7 +572,7 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_app_info_set_as_last_used_for_type")] fn set_as_last_used_for_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_app_info_set_as_last_used_for_type( self.as_ref().to_glib_none().0, content_type.to_glib_none().0, @@ -612,9 +612,3 @@ pub trait AppInfoExt: IsA + sealed::Sealed + 'static { } impl> AppInfoExt for O {} - -impl fmt::Display for AppInfo { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppInfo") - } -} diff --git a/gio/src/auto/app_info_monitor.rs b/gio/src/auto/app_info_monitor.rs index 19f0b797f493..121e589b7085 100644 --- a/gio/src/auto/app_info_monitor.rs +++ b/gio/src/auto/app_info_monitor.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GAppInfoMonitor")] @@ -38,7 +38,7 @@ impl AppInfoMonitor { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -46,9 +46,3 @@ impl AppInfoMonitor { } } } - -impl fmt::Display for AppInfoMonitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppInfoMonitor") - } -} diff --git a/gio/src/auto/app_launch_context.rs b/gio/src/auto/app_launch_context.rs index 26310e56e49e..abf5d8e2cfc9 100644 --- a/gio/src/auto/app_launch_context.rs +++ b/gio/src/auto/app_launch_context.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GAppLaunchContext")] @@ -126,7 +126,7 @@ pub trait AppLaunchContextExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"launch-failed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( launch_failed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -164,7 +164,7 @@ pub trait AppLaunchContextExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"launch-started\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( launch_started_trampoline:: as *const (), )), Box_::into_raw(f), @@ -198,7 +198,7 @@ pub trait AppLaunchContextExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"launched\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( launched_trampoline:: as *const (), )), Box_::into_raw(f), @@ -208,9 +208,3 @@ pub trait AppLaunchContextExt: IsA + sealed::Sealed + 'static } impl> AppLaunchContextExt for O {} - -impl fmt::Display for AppLaunchContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppLaunchContext") - } -} diff --git a/gio/src/auto/application.rs b/gio/src/auto/application.rs index 7437112edb42..61a8e3953025 100644 --- a/gio/src/auto/application.rs +++ b/gio/src/auto/application.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GApplication")] @@ -290,7 +290,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_application_register")] fn register(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_application_register( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -430,7 +430,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"activate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( activate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -462,7 +462,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"command-line\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( command_line_trampoline:: as *const (), )), Box_::into_raw(f), @@ -494,7 +494,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"handle-local-options\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( handle_local_options_trampoline:: as *const (), )), Box_::into_raw(f), @@ -521,7 +521,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"name-lost\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( name_lost_trampoline:: as *const (), )), Box_::into_raw(f), @@ -543,7 +543,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"shutdown\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( shutdown_trampoline:: as *const (), )), Box_::into_raw(f), @@ -565,7 +565,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"startup\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( startup_trampoline:: as *const (), )), Box_::into_raw(f), @@ -591,7 +591,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::action-group\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_action_group_trampoline:: as *const (), )), Box_::into_raw(f), @@ -617,7 +617,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::application-id\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_application_id_trampoline:: as *const (), )), Box_::into_raw(f), @@ -640,7 +640,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -666,7 +666,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::inactivity-timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_inactivity_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -689,7 +689,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-busy\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_busy_trampoline:: as *const (), )), Box_::into_raw(f), @@ -715,7 +715,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-registered\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_registered_trampoline:: as *const (), )), Box_::into_raw(f), @@ -741,7 +741,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-remote\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_remote_trampoline:: as *const (), )), Box_::into_raw(f), @@ -767,7 +767,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::resource-base-path\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_resource_base_path_trampoline:: as *const (), )), Box_::into_raw(f), @@ -777,9 +777,3 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { } impl> ApplicationExt for O {} - -impl fmt::Display for Application { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Application") - } -} diff --git a/gio/src/auto/application_command_line.rs b/gio/src/auto/application_command_line.rs index e8f43200f51b..f4cf991fdc88 100644 --- a/gio/src/auto/application_command_line.rs +++ b/gio/src/auto/application_command_line.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GApplicationCommandLine")] @@ -45,7 +45,7 @@ pub trait ApplicationCommandLineExt: #[doc(alias = "get_arguments")] fn arguments(&self) -> Vec { unsafe { - let mut argc = mem::MaybeUninit::uninit(); + let mut argc = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( ffi::g_application_command_line_get_arguments( self.as_ref().to_glib_none().0, @@ -171,7 +171,7 @@ pub trait ApplicationCommandLineExt: connect_raw( self.as_ptr() as *mut _, b"notify::is-remote\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_remote_trampoline:: as *const (), )), Box_::into_raw(f), @@ -181,9 +181,3 @@ pub trait ApplicationCommandLineExt: } impl> ApplicationCommandLineExt for O {} - -impl fmt::Display for ApplicationCommandLine { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ApplicationCommandLine") - } -} diff --git a/gio/src/auto/async_initable.rs b/gio/src/auto/async_initable.rs index 156bcc1cc367..4bcaedd310b6 100644 --- a/gio/src/auto/async_initable.rs +++ b/gio/src/auto/async_initable.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GAsyncInitable")] @@ -49,7 +49,7 @@ pub trait AsyncInitableExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_async_initable_init_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -87,9 +87,3 @@ pub trait AsyncInitableExt: IsA + sealed::Sealed + 'static { } impl> AsyncInitableExt for O {} - -impl fmt::Display for AsyncInitable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AsyncInitable") - } -} diff --git a/gio/src/auto/async_result.rs b/gio/src/auto/async_result.rs index b84006fb20cc..90ebb9203eab 100644 --- a/gio/src/auto/async_result.rs +++ b/gio/src/auto/async_result.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GAsyncResult")] @@ -48,7 +47,7 @@ pub trait AsyncResultExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_async_result_legacy_propagate_error")] fn legacy_propagate_error(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_async_result_legacy_propagate_error( self.as_ref().to_glib_none().0, &mut error, @@ -64,9 +63,3 @@ pub trait AsyncResultExt: IsA + sealed::Sealed + 'static { } impl> AsyncResultExt for O {} - -impl fmt::Display for AsyncResult { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AsyncResult") - } -} diff --git a/gio/src/auto/buffered_input_stream.rs b/gio/src/auto/buffered_input_stream.rs index b161f2531a1c..e6db07b52cae 100644 --- a/gio/src/auto/buffered_input_stream.rs +++ b/gio/src/auto/buffered_input_stream.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GBufferedInputStream")] @@ -117,7 +117,7 @@ pub trait BufferedInputStreamExt: IsA + sealed::Sealed + 's cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_buffered_input_stream_fill( self.as_ref().to_glib_none().0, count, @@ -159,7 +159,7 @@ pub trait BufferedInputStreamExt: IsA + sealed::Sealed + 's res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_buffered_input_stream_fill_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -215,7 +215,7 @@ pub trait BufferedInputStreamExt: IsA + sealed::Sealed + 's #[doc(alias = "g_buffered_input_stream_peek_buffer")] fn peek_buffer(&self) -> Vec { unsafe { - let mut count = mem::MaybeUninit::uninit(); + let mut count = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_none_num( ffi::g_buffered_input_stream_peek_buffer( self.as_ref().to_glib_none().0, @@ -230,7 +230,7 @@ pub trait BufferedInputStreamExt: IsA + sealed::Sealed + 's #[doc(alias = "g_buffered_input_stream_read_byte")] fn read_byte(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_buffered_input_stream_read_byte( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -269,7 +269,7 @@ pub trait BufferedInputStreamExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffer_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -279,9 +279,3 @@ pub trait BufferedInputStreamExt: IsA + sealed::Sealed + 's } impl> BufferedInputStreamExt for O {} - -impl fmt::Display for BufferedInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BufferedInputStream") - } -} diff --git a/gio/src/auto/buffered_output_stream.rs b/gio/src/auto/buffered_output_stream.rs index aa3fae3c892f..bed1051bb4e1 100644 --- a/gio/src/auto/buffered_output_stream.rs +++ b/gio/src/auto/buffered_output_stream.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GBufferedOutputStream")] @@ -167,7 +167,7 @@ pub trait BufferedOutputStreamExt: IsA + sealed::Sealed + connect_raw( self.as_ptr() as *mut _, b"notify::auto-grow\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_auto_grow_trampoline:: as *const (), )), Box_::into_raw(f), @@ -193,7 +193,7 @@ pub trait BufferedOutputStreamExt: IsA + sealed::Sealed + connect_raw( self.as_ptr() as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffer_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -203,9 +203,3 @@ pub trait BufferedOutputStreamExt: IsA + sealed::Sealed + } impl> BufferedOutputStreamExt for O {} - -impl fmt::Display for BufferedOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BufferedOutputStream") - } -} diff --git a/gio/src/auto/bytes_icon.rs b/gio/src/auto/bytes_icon.rs index c114c0be4fbe..7d55aae2ab97 100644 --- a/gio/src/auto/bytes_icon.rs +++ b/gio/src/auto/bytes_icon.rs @@ -4,7 +4,6 @@ use crate::{Icon, LoadableIcon}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GBytesIcon")] @@ -27,9 +26,3 @@ impl BytesIcon { unsafe { from_glib_none(ffi::g_bytes_icon_get_bytes(self.to_glib_none().0)) } } } - -impl fmt::Display for BytesIcon { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BytesIcon") - } -} diff --git a/gio/src/auto/cancellable.rs b/gio/src/auto/cancellable.rs index 8ce71cdc58da..5cd2d9db018e 100644 --- a/gio/src/auto/cancellable.rs +++ b/gio/src/auto/cancellable.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GCancellable")] @@ -94,9 +93,3 @@ pub trait CancellableExt: IsA + sealed::Sealed + 'static { } impl> CancellableExt for O {} - -impl fmt::Display for Cancellable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Cancellable") - } -} diff --git a/gio/src/auto/charset_converter.rs b/gio/src/auto/charset_converter.rs index f004af8307c1..f5386a6c0e1c 100644 --- a/gio/src/auto/charset_converter.rs +++ b/gio/src/auto/charset_converter.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GCharsetConverter")] @@ -23,7 +23,7 @@ impl CharsetConverter { #[doc(alias = "g_charset_converter_new")] pub fn new(to_charset: &str, from_charset: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_charset_converter_new( to_charset.to_glib_none().0, from_charset.to_glib_none().0, @@ -96,7 +96,7 @@ impl CharsetConverter { connect_raw( self.as_ptr() as *mut _, b"notify::use-fallback\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_use_fallback_trampoline:: as *const (), )), Box_::into_raw(f), @@ -152,9 +152,3 @@ impl CharsetConverterBuilder { self.builder.build() } } - -impl fmt::Display for CharsetConverter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("CharsetConverter") - } -} diff --git a/gio/src/auto/converter.rs b/gio/src/auto/converter.rs index 7efd0bc7d167..6216965df473 100644 --- a/gio/src/auto/converter.rs +++ b/gio/src/auto/converter.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GConverter")] @@ -33,9 +32,3 @@ pub trait ConverterExt: IsA + sealed::Sealed + 'static { } impl> ConverterExt for O {} - -impl fmt::Display for Converter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Converter") - } -} diff --git a/gio/src/auto/converter_input_stream.rs b/gio/src/auto/converter_input_stream.rs index 727d25292781..b25b4425dd82 100644 --- a/gio/src/auto/converter_input_stream.rs +++ b/gio/src/auto/converter_input_stream.rs @@ -4,7 +4,6 @@ use crate::{Converter, FilterInputStream, InputStream, PollableInputStream}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GConverterInputStream")] @@ -113,9 +112,3 @@ pub trait ConverterInputStreamExt: IsA + sealed::Sealed + } impl> ConverterInputStreamExt for O {} - -impl fmt::Display for ConverterInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ConverterInputStream") - } -} diff --git a/gio/src/auto/converter_output_stream.rs b/gio/src/auto/converter_output_stream.rs index 77f54274e385..cc581f2dfe48 100644 --- a/gio/src/auto/converter_output_stream.rs +++ b/gio/src/auto/converter_output_stream.rs @@ -4,7 +4,6 @@ use crate::{Converter, FilterOutputStream, OutputStream, PollableOutputStream}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GConverterOutputStream")] @@ -113,9 +112,3 @@ pub trait ConverterOutputStreamExt: IsA + sealed::Sealed } impl> ConverterOutputStreamExt for O {} - -impl fmt::Display for ConverterOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ConverterOutputStream") - } -} diff --git a/gio/src/auto/credentials.rs b/gio/src/auto/credentials.rs index fcc32a671205..b676555bda34 100644 --- a/gio/src/auto/credentials.rs +++ b/gio/src/auto/credentials.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GCredentials")] @@ -32,7 +31,7 @@ impl Credentials { #[doc(alias = "get_unix_pid")] pub fn unix_pid(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_credentials_get_unix_pid(self.to_glib_none().0, &mut error); if error.is_null() { Ok(ret) @@ -48,7 +47,7 @@ impl Credentials { #[doc(alias = "get_unix_user")] pub fn unix_user(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_credentials_get_unix_user(self.to_glib_none().0, &mut error); if error.is_null() { Ok(ret) @@ -61,7 +60,7 @@ impl Credentials { #[doc(alias = "g_credentials_is_same_user")] pub fn is_same_user(&self, other_credentials: &Credentials) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_credentials_is_same_user( self.to_glib_none().0, other_credentials.to_glib_none().0, @@ -86,7 +85,7 @@ impl Credentials { #[doc(alias = "g_credentials_set_unix_user")] pub fn set_unix_user(&self, uid: u32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_credentials_set_unix_user(self.to_glib_none().0, uid, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -110,9 +109,9 @@ impl Default for Credentials { } } -impl fmt::Display for Credentials { +impl std::fmt::Display for Credentials { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/gio/src/auto/data_input_stream.rs b/gio/src/auto/data_input_stream.rs index f2b16c9e309a..df7139ca428d 100644 --- a/gio/src/auto/data_input_stream.rs +++ b/gio/src/auto/data_input_stream.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDataInputStream")] @@ -136,7 +136,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_data_input_stream_read_byte")] fn read_byte(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_data_input_stream_read_byte( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -153,7 +153,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_data_input_stream_read_int16")] fn read_int16(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_data_input_stream_read_int16( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -170,7 +170,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_data_input_stream_read_int32")] fn read_int32(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_data_input_stream_read_int32( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -187,7 +187,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_data_input_stream_read_int64")] fn read_int64(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_data_input_stream_read_int64( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -204,7 +204,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_data_input_stream_read_uint16")] fn read_uint16(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_data_input_stream_read_uint16( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -221,7 +221,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_data_input_stream_read_uint32")] fn read_uint32(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_data_input_stream_read_uint32( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -238,7 +238,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_data_input_stream_read_uint64")] fn read_uint64(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_data_input_stream_read_uint64( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -290,7 +290,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::byte-order\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_byte_order_trampoline:: as *const (), )), Box_::into_raw(f), @@ -316,7 +316,7 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::newline-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_newline_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -326,9 +326,3 @@ pub trait DataInputStreamExt: IsA + sealed::Sealed + 'static { } impl> DataInputStreamExt for O {} - -impl fmt::Display for DataInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DataInputStream") - } -} diff --git a/gio/src/auto/data_output_stream.rs b/gio/src/auto/data_output_stream.rs index 85863534e853..fc325d81a963 100644 --- a/gio/src/auto/data_output_stream.rs +++ b/gio/src/auto/data_output_stream.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDataOutputStream")] @@ -115,7 +115,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_byte( self.as_ref().to_glib_none().0, data, @@ -138,7 +138,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_int16( self.as_ref().to_glib_none().0, data, @@ -161,7 +161,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_int32( self.as_ref().to_glib_none().0, data, @@ -184,7 +184,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_int64( self.as_ref().to_glib_none().0, data, @@ -207,7 +207,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_string( self.as_ref().to_glib_none().0, str.to_glib_none().0, @@ -230,7 +230,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_uint16( self.as_ref().to_glib_none().0, data, @@ -253,7 +253,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_uint32( self.as_ref().to_glib_none().0, data, @@ -276,7 +276,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_data_output_stream_put_uint64( self.as_ref().to_glib_none().0, data, @@ -320,7 +320,7 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::byte-order\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_byte_order_trampoline:: as *const (), )), Box_::into_raw(f), @@ -330,9 +330,3 @@ pub trait DataOutputStreamExt: IsA + sealed::Sealed + 'static } impl> DataOutputStreamExt for O {} - -impl fmt::Display for DataOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DataOutputStream") - } -} diff --git a/gio/src/auto/datagram_based.rs b/gio/src/auto/datagram_based.rs index a715370786e1..c456c9c4abdc 100644 --- a/gio/src/auto/datagram_based.rs +++ b/gio/src/auto/datagram_based.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GDatagramBased")] @@ -36,9 +35,3 @@ pub trait DatagramBasedExt: IsA + sealed::Sealed + 'static { } impl> DatagramBasedExt for O {} - -impl fmt::Display for DatagramBased { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DatagramBased") - } -} diff --git a/gio/src/auto/dbus_action_group.rs b/gio/src/auto/dbus_action_group.rs index 01e0dc322aaa..0e09b48eae82 100644 --- a/gio/src/auto/dbus_action_group.rs +++ b/gio/src/auto/dbus_action_group.rs @@ -4,7 +4,6 @@ use crate::{ActionGroup, DBusConnection, RemoteActionGroup}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GDBusActionGroup")] @@ -31,9 +30,3 @@ impl DBusActionGroup { } } } - -impl fmt::Display for DBusActionGroup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusActionGroup") - } -} diff --git a/gio/src/auto/dbus_auth_observer.rs b/gio/src/auto/dbus_auth_observer.rs index 21bc425c3e6f..c468100961b7 100644 --- a/gio/src/auto/dbus_auth_observer.rs +++ b/gio/src/auto/dbus_auth_observer.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDBusAuthObserver")] @@ -74,7 +74,7 @@ impl DBusAuthObserver { connect_raw( self.as_ptr() as *mut _, b"allow-mechanism\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( allow_mechanism_trampoline:: as *const (), )), Box_::into_raw(f), @@ -112,7 +112,7 @@ impl DBusAuthObserver { connect_raw( self.as_ptr() as *mut _, b"authorize-authenticated-peer\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( authorize_authenticated_peer_trampoline:: as *const (), )), Box_::into_raw(f), @@ -126,9 +126,3 @@ impl Default for DBusAuthObserver { Self::new() } } - -impl fmt::Display for DBusAuthObserver { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusAuthObserver") - } -} diff --git a/gio/src/auto/dbus_connection.rs b/gio/src/auto/dbus_connection.rs index 7c106a72574f..028ff343c2c0 100644 --- a/gio/src/auto/dbus_connection.rs +++ b/gio/src/auto/dbus_connection.rs @@ -15,7 +15,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GDBusConnection")] @@ -36,7 +36,7 @@ impl DBusConnection { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_new_for_address_sync( address.to_glib_none().0, flags.into_glib(), @@ -61,7 +61,7 @@ impl DBusConnection { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_new_sync( stream.as_ref().to_glib_none().0, guid.to_glib_none().0, @@ -111,7 +111,7 @@ impl DBusConnection { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_call_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -195,7 +195,7 @@ impl DBusConnection { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_call_sync( self.to_glib_none().0, bus_name.to_glib_none().0, @@ -255,8 +255,8 @@ impl DBusConnection { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut out_fd_list = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut out_fd_list = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_call_with_unix_fd_list_finish( _source_object as *mut _, &mut out_fd_list, @@ -358,8 +358,8 @@ impl DBusConnection { cancellable: Option<&impl IsA>, ) -> Result<(glib::Variant, UnixFDList), glib::Error> { unsafe { - let mut out_fd_list = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut out_fd_list = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_call_with_unix_fd_list_sync( self.to_glib_none().0, bus_name.to_glib_none().0, @@ -406,7 +406,7 @@ impl DBusConnection { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_dbus_connection_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -448,7 +448,7 @@ impl DBusConnection { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_dbus_connection_close_sync( self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -473,7 +473,7 @@ impl DBusConnection { parameters: Option<&glib::Variant>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_dbus_connection_emit_signal( self.to_glib_none().0, destination_bus_name.to_glib_none().0, @@ -515,7 +515,7 @@ impl DBusConnection { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_dbus_connection_flush_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -557,7 +557,7 @@ impl DBusConnection { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_dbus_connection_flush_sync( self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -655,8 +655,8 @@ impl DBusConnection { flags: DBusSendMessageFlags, ) -> Result { unsafe { - let mut out_serial = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut out_serial = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_dbus_connection_send_message( self.to_glib_none().0, message.to_glib_none().0, @@ -701,7 +701,7 @@ impl DBusConnection { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_send_message_with_reply_finish( _source_object as *mut _, res, @@ -719,7 +719,7 @@ impl DBusConnection { } let callback = send_message_with_reply_trampoline::

; unsafe { - let mut out_serial = mem::MaybeUninit::uninit(); + let mut out_serial = std::mem::MaybeUninit::uninit(); ffi::g_dbus_connection_send_message_with_reply( self.to_glib_none().0, message.to_glib_none().0, @@ -767,8 +767,8 @@ impl DBusConnection { cancellable: Option<&impl IsA>, ) -> Result<(DBusMessage, u32), glib::Error> { unsafe { - let mut out_serial = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut out_serial = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_send_message_with_reply_sync( self.to_glib_none().0, message.to_glib_none().0, @@ -835,7 +835,7 @@ impl DBusConnection { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_new_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -916,7 +916,7 @@ impl DBusConnection { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_connection_new_for_address_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -992,7 +992,7 @@ impl DBusConnection { connect_raw( self.as_ptr() as *mut _, b"closed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( closed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1020,7 +1020,7 @@ impl DBusConnection { connect_raw( self.as_ptr() as *mut _, b"notify::capabilities\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_capabilities_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1048,7 +1048,7 @@ impl DBusConnection { connect_raw( self.as_ptr() as *mut _, b"notify::closed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_closed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1076,7 +1076,7 @@ impl DBusConnection { connect_raw( self.as_ptr() as *mut _, b"notify::exit-on-close\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_exit_on_close_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1104,7 +1104,7 @@ impl DBusConnection { connect_raw( self.as_ptr() as *mut _, b"notify::unique-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_unique_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1115,9 +1115,3 @@ impl DBusConnection { unsafe impl Send for DBusConnection {} unsafe impl Sync for DBusConnection {} - -impl fmt::Display for DBusConnection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusConnection") - } -} diff --git a/gio/src/auto/dbus_interface.rs b/gio/src/auto/dbus_interface.rs index 8587e5b9c1d1..f58afcd89c40 100644 --- a/gio/src/auto/dbus_interface.rs +++ b/gio/src/auto/dbus_interface.rs @@ -4,7 +4,6 @@ use crate::{DBusInterfaceInfo, DBusObject}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GDBusInterface")] @@ -57,9 +56,3 @@ pub trait DBusInterfaceExt: IsA + sealed::Sealed + 'static { } impl> DBusInterfaceExt for O {} - -impl fmt::Display for DBusInterface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusInterface") - } -} diff --git a/gio/src/auto/dbus_interface_skeleton.rs b/gio/src/auto/dbus_interface_skeleton.rs index c9225a73f3f0..bad346ef4f06 100644 --- a/gio/src/auto/dbus_interface_skeleton.rs +++ b/gio/src/auto/dbus_interface_skeleton.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDBusInterfaceSkeleton")] @@ -35,7 +35,7 @@ pub trait DBusInterfaceSkeletonExt: IsA + sealed::Sealed #[doc(alias = "g_dbus_interface_skeleton_export")] fn export(&self, connection: &DBusConnection, object_path: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_dbus_interface_skeleton_export( self.as_ref().to_glib_none().0, connection.to_glib_none().0, @@ -196,7 +196,7 @@ pub trait DBusInterfaceSkeletonExt: IsA + sealed::Sealed connect_raw( self.as_ptr() as *mut _, b"g-authorize-method\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( g_authorize_method_trampoline:: as *const (), )), Box_::into_raw(f), @@ -222,7 +222,7 @@ pub trait DBusInterfaceSkeletonExt: IsA + sealed::Sealed connect_raw( self.as_ptr() as *mut _, b"notify::g-flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_g_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -232,9 +232,3 @@ pub trait DBusInterfaceSkeletonExt: IsA + sealed::Sealed } impl> DBusInterfaceSkeletonExt for O {} - -impl fmt::Display for DBusInterfaceSkeleton { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusInterfaceSkeleton") - } -} diff --git a/gio/src/auto/dbus_menu_model.rs b/gio/src/auto/dbus_menu_model.rs index dad9db8fe336..40eb6ef43122 100644 --- a/gio/src/auto/dbus_menu_model.rs +++ b/gio/src/auto/dbus_menu_model.rs @@ -4,7 +4,6 @@ use crate::{DBusConnection, MenuModel}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GDBusMenuModel")] @@ -31,9 +30,3 @@ impl DBusMenuModel { } } } - -impl fmt::Display for DBusMenuModel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusMenuModel") - } -} diff --git a/gio/src/auto/dbus_message.rs b/gio/src/auto/dbus_message.rs index cdbd5dda2d2b..68c207bcce07 100644 --- a/gio/src/auto/dbus_message.rs +++ b/gio/src/auto/dbus_message.rs @@ -14,7 +14,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDBusMessage")] @@ -39,7 +39,7 @@ impl DBusMessage { ) -> Result { let blob_len = blob.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_message_new_from_blob( blob.to_glib_none().0, blob_len, @@ -85,7 +85,7 @@ impl DBusMessage { #[doc(alias = "g_dbus_message_copy")] pub fn copy(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_message_copy(self.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -380,8 +380,8 @@ impl DBusMessage { #[doc(alias = "g_dbus_message_to_blob")] pub fn to_blob(&self, capabilities: DBusCapabilityFlags) -> Result, glib::Error> { unsafe { - let mut out_size = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut out_size = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_message_to_blob( self.to_glib_none().0, out_size.as_mut_ptr(), @@ -402,7 +402,7 @@ impl DBusMessage { #[doc(alias = "g_dbus_message_to_gerror")] pub fn to_gerror(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_dbus_message_to_gerror(self.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -417,7 +417,7 @@ impl DBusMessage { pub fn bytes_needed(blob: &[u8]) -> Result { let blob_len = blob.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_message_bytes_needed(blob.to_glib_none().0, blob_len, &mut error); if error.is_null() { Ok(ret) @@ -442,7 +442,7 @@ impl DBusMessage { connect_raw( self.as_ptr() as *mut _, b"notify::locked\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_locked_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gio/src/auto/dbus_method_invocation.rs b/gio/src/auto/dbus_method_invocation.rs index 93ebcd27d8b2..658272feddec 100644 --- a/gio/src/auto/dbus_method_invocation.rs +++ b/gio/src/auto/dbus_method_invocation.rs @@ -10,7 +10,6 @@ use crate::{DBusConnection, DBusMessage, DBusMethodInfo, DBusPropertyInfo}; #[cfg_attr(docsrs, doc(cfg(unix)))] use glib::prelude::*; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GDBusMethodInvocation")] @@ -166,9 +165,3 @@ impl DBusMethodInvocation { } } } - -impl fmt::Display for DBusMethodInvocation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusMethodInvocation") - } -} diff --git a/gio/src/auto/dbus_node_info.rs b/gio/src/auto/dbus_node_info.rs index 06a5ea46cd57..6213e7e4f188 100644 --- a/gio/src/auto/dbus_node_info.rs +++ b/gio/src/auto/dbus_node_info.rs @@ -4,7 +4,6 @@ use crate::DBusInterfaceInfo; use glib::translate::*; -use std::ptr; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -22,7 +21,7 @@ impl DBusNodeInfo { #[doc(alias = "new_for_xml")] pub fn for_xml(xml_data: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_node_info_new_for_xml(xml_data.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) diff --git a/gio/src/auto/dbus_object.rs b/gio/src/auto/dbus_object.rs index a9ad1b92dfe1..28c6d7ccc582 100644 --- a/gio/src/auto/dbus_object.rs +++ b/gio/src/auto/dbus_object.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDBusObject")] @@ -84,7 +84,7 @@ pub trait DBusObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"interface-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( interface_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -116,7 +116,7 @@ pub trait DBusObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"interface-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( interface_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -126,9 +126,3 @@ pub trait DBusObjectExt: IsA + sealed::Sealed + 'static { } impl> DBusObjectExt for O {} - -impl fmt::Display for DBusObject { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusObject") - } -} diff --git a/gio/src/auto/dbus_object_manager.rs b/gio/src/auto/dbus_object_manager.rs index ae6421ea6e93..5f6cdb75b741 100644 --- a/gio/src/auto/dbus_object_manager.rs +++ b/gio/src/auto/dbus_object_manager.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDBusObjectManager")] @@ -98,7 +98,7 @@ pub trait DBusObjectManagerExt: IsA + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"interface-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( interface_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -132,7 +132,7 @@ pub trait DBusObjectManagerExt: IsA + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"interface-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( interface_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -161,7 +161,7 @@ pub trait DBusObjectManagerExt: IsA + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"object-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( object_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -190,7 +190,7 @@ pub trait DBusObjectManagerExt: IsA + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"object-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( object_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -200,9 +200,3 @@ pub trait DBusObjectManagerExt: IsA + sealed::Sealed + 'stati } impl> DBusObjectManagerExt for O {} - -impl fmt::Display for DBusObjectManager { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusObjectManager") - } -} diff --git a/gio/src/auto/dbus_proxy.rs b/gio/src/auto/dbus_proxy.rs index 9ae2506285f9..750dac9a85f0 100644 --- a/gio/src/auto/dbus_proxy.rs +++ b/gio/src/auto/dbus_proxy.rs @@ -14,7 +14,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GDBusProxy")] @@ -40,7 +40,7 @@ impl DBusProxy { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_new_for_bus_sync( bus_type.into_glib(), flags.into_glib(), @@ -70,7 +70,7 @@ impl DBusProxy { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_new_sync( connection.to_glib_none().0, flags.into_glib(), @@ -117,7 +117,7 @@ impl DBusProxy { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_new_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -208,7 +208,7 @@ impl DBusProxy { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_new_for_bus_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -306,7 +306,7 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_call_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -370,7 +370,7 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_call_sync( self.as_ref().to_glib_none().0, method_name.to_glib_none().0, @@ -422,8 +422,8 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut out_fd_list = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut out_fd_list = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_call_with_unix_fd_list_finish( _source_object as *mut _, &mut out_fd_list, @@ -505,8 +505,8 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(glib::Variant, UnixFDList), glib::Error> { unsafe { - let mut out_fd_list = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut out_fd_list = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_proxy_call_with_unix_fd_list_sync( self.as_ref().to_glib_none().0, method_name.to_glib_none().0, @@ -714,7 +714,7 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::g-default-timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_g_default_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -743,7 +743,7 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::g-interface-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_g_interface_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -772,7 +772,7 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::g-name-owner\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_g_name_owner_trampoline:: as *const (), )), Box_::into_raw(f), @@ -782,9 +782,3 @@ pub trait DBusProxyExt: IsA + sealed::Sealed + 'static { } impl> DBusProxyExt for O {} - -impl fmt::Display for DBusProxy { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusProxy") - } -} diff --git a/gio/src/auto/dbus_server.rs b/gio/src/auto/dbus_server.rs index cc26e2c34af0..d09e97d65c8e 100644 --- a/gio/src/auto/dbus_server.rs +++ b/gio/src/auto/dbus_server.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDBusServer")] @@ -29,7 +29,7 @@ impl DBusServer { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_server_new_sync( address.to_glib_none().0, flags.into_glib(), @@ -112,7 +112,7 @@ impl DBusServer { connect_raw( self.as_ptr() as *mut _, b"new-connection\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( new_connection_trampoline:: as *const (), )), Box_::into_raw(f), @@ -135,7 +135,7 @@ impl DBusServer { connect_raw( self.as_ptr() as *mut _, b"notify::active\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_active_trampoline:: as *const (), )), Box_::into_raw(f), @@ -158,7 +158,7 @@ impl DBusServer { connect_raw( self.as_ptr() as *mut _, b"notify::client-address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_client_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -166,9 +166,3 @@ impl DBusServer { } } } - -impl fmt::Display for DBusServer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DBusServer") - } -} diff --git a/gio/src/auto/debug_controller.rs b/gio/src/auto/debug_controller.rs index a6ae10aebea1..6b6981cfe2cb 100644 --- a/gio/src/auto/debug_controller.rs +++ b/gio/src/auto/debug_controller.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDebugController")] @@ -69,7 +69,7 @@ pub trait DebugControllerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::debug-enabled\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_debug_enabled_trampoline:: as *const (), )), Box_::into_raw(f), @@ -79,9 +79,3 @@ pub trait DebugControllerExt: IsA + sealed::Sealed + 'static { } impl> DebugControllerExt for O {} - -impl fmt::Display for DebugController { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DebugController") - } -} diff --git a/gio/src/auto/debug_controller_dbus.rs b/gio/src/auto/debug_controller_dbus.rs index f51b0d8b36f2..5e2dfed72a26 100644 --- a/gio/src/auto/debug_controller_dbus.rs +++ b/gio/src/auto/debug_controller_dbus.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDebugControllerDBus")] @@ -28,7 +28,7 @@ impl DebugControllerDBus { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_debug_controller_dbus_new( connection.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -83,7 +83,7 @@ pub trait DebugControllerDBusExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"authorize\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( authorize_trampoline:: as *const (), )), Box_::into_raw(f), @@ -93,9 +93,3 @@ pub trait DebugControllerDBusExt: IsA + sealed::Sealed + 's } impl> DebugControllerDBusExt for O {} - -impl fmt::Display for DebugControllerDBus { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DebugControllerDBus") - } -} diff --git a/gio/src/auto/desktop_app_info.rs b/gio/src/auto/desktop_app_info.rs index 1d3419ffc45a..2394c3f50f14 100644 --- a/gio/src/auto/desktop_app_info.rs +++ b/gio/src/auto/desktop_app_info.rs @@ -4,10 +4,7 @@ use crate::{AppInfo, AppLaunchContext}; use glib::{prelude::*, translate::*}; -#[cfg(feature = "v2_60")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] -use std::mem; -use std::{boxed::Box as Box_, fmt, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GDesktopAppInfo")] @@ -163,7 +160,7 @@ impl DesktopAppInfo { #[doc(alias = "get_string_list")] pub fn string_list(&self, key: &str) -> Vec { unsafe { - let mut length = mem::MaybeUninit::uninit(); + let mut length = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( ffi::g_desktop_app_info_get_string_list( self.to_glib_none().0, @@ -248,7 +245,7 @@ impl DesktopAppInfo { let super_callback1: &Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))> = &pid_callback_data; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_desktop_app_info_launch_uris_as_manager( self.to_glib_none().0, uris.to_glib_none().0, @@ -288,9 +285,3 @@ impl DesktopAppInfo { } } } - -impl fmt::Display for DesktopAppInfo { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DesktopAppInfo") - } -} diff --git a/gio/src/auto/drive.rs b/gio/src/auto/drive.rs index 472c1a0cce42..4124e7aad9c0 100644 --- a/gio/src/auto/drive.rs +++ b/gio/src/auto/drive.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GDrive")] @@ -92,7 +92,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_drive_eject_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -265,7 +265,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_drive_poll_for_media_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -326,7 +326,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_drive_start_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -397,7 +397,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_drive_stop_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -457,7 +457,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -479,7 +479,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"disconnected\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( disconnected_trampoline:: as *const (), )), Box_::into_raw(f), @@ -501,7 +501,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"eject-button\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( eject_button_trampoline:: as *const (), )), Box_::into_raw(f), @@ -523,7 +523,7 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"stop-button\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( stop_button_trampoline:: as *const (), )), Box_::into_raw(f), @@ -533,9 +533,3 @@ pub trait DriveExt: IsA + sealed::Sealed + 'static { } impl> DriveExt for O {} - -impl fmt::Display for Drive { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Drive") - } -} diff --git a/gio/src/auto/emblem.rs b/gio/src/auto/emblem.rs index 736dec8c1c33..3d1b00f3687d 100644 --- a/gio/src/auto/emblem.rs +++ b/gio/src/auto/emblem.rs @@ -4,7 +4,6 @@ use crate::{EmblemOrigin, Icon}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GEmblem")] @@ -44,9 +43,3 @@ impl Emblem { unsafe { from_glib(ffi::g_emblem_get_origin(self.to_glib_none().0)) } } } - -impl fmt::Display for Emblem { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Emblem") - } -} diff --git a/gio/src/auto/emblemed_icon.rs b/gio/src/auto/emblemed_icon.rs index 6c75b02cb8ed..fad5260eb638 100644 --- a/gio/src/auto/emblemed_icon.rs +++ b/gio/src/auto/emblemed_icon.rs @@ -4,7 +4,6 @@ use crate::{Emblem, Icon}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GEmblemedIcon")] @@ -78,9 +77,3 @@ pub trait EmblemedIconExt: IsA + sealed::Sealed + 'static { } impl> EmblemedIconExt for O {} - -impl fmt::Display for EmblemedIcon { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("EmblemedIcon") - } -} diff --git a/gio/src/auto/enums.rs b/gio/src/auto/enums.rs index 878a5e18ea34..a94d71d6ef12 100644 --- a/gio/src/auto/enums.rs +++ b/gio/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -21,22 +20,6 @@ pub enum BusType { __Unknown(i32), } -impl fmt::Display for BusType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "BusType::{}", - match *self { - Self::Starter => "Starter", - Self::None => "None", - Self::System => "System", - Self::Session => "Session", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for BusType { type GlibType = ffi::GBusType; @@ -69,6 +52,7 @@ impl FromGlib for BusType { impl StaticType for BusType { #[inline] + #[doc(alias = "g_bus_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_bus_type_get_type()) } } @@ -80,7 +64,7 @@ impl glib::HasParamSpec for BusType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -136,22 +120,6 @@ pub enum ConverterResult { __Unknown(i32), } -impl fmt::Display for ConverterResult { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ConverterResult::{}", - match *self { - Self::Error => "Error", - Self::Converted => "Converted", - Self::Finished => "Finished", - Self::Flushed => "Flushed", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ConverterResult { type GlibType = ffi::GConverterResult; @@ -184,6 +152,7 @@ impl FromGlib for ConverterResult { impl StaticType for ConverterResult { #[inline] + #[doc(alias = "g_converter_result_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_converter_result_get_type()) } } @@ -195,7 +164,7 @@ impl glib::HasParamSpec for ConverterResult { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -261,27 +230,6 @@ pub enum CredentialsType { __Unknown(i32), } -impl fmt::Display for CredentialsType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "CredentialsType::{}", - match *self { - Self::Invalid => "Invalid", - Self::LinuxUcred => "LinuxUcred", - Self::FreebsdCmsgcred => "FreebsdCmsgcred", - Self::OpenbsdSockpeercred => "OpenbsdSockpeercred", - Self::SolarisUcred => "SolarisUcred", - Self::NetbsdUnpcbid => "NetbsdUnpcbid", - Self::AppleXucred => "AppleXucred", - #[cfg(feature = "v2_72")] - Self::Win32Pid => "Win32Pid", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for CredentialsType { type GlibType = ffi::GCredentialsType; @@ -324,6 +272,7 @@ impl FromGlib for CredentialsType { impl StaticType for CredentialsType { #[inline] + #[doc(alias = "g_credentials_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_credentials_type_get_type()) } } @@ -335,7 +284,7 @@ impl glib::HasParamSpec for CredentialsType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -387,20 +336,6 @@ pub enum DBusMessageByteOrder { __Unknown(i32), } -impl fmt::Display for DBusMessageByteOrder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DBusMessageByteOrder::{}", - match *self { - Self::BigEndian => "BigEndian", - Self::LittleEndian => "LittleEndian", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DBusMessageByteOrder { type GlibType = ffi::GDBusMessageByteOrder; @@ -429,6 +364,7 @@ impl FromGlib for DBusMessageByteOrder { impl StaticType for DBusMessageByteOrder { #[inline] + #[doc(alias = "g_dbus_message_byte_order_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_message_byte_order_get_type()) } } @@ -440,7 +376,7 @@ impl glib::HasParamSpec for DBusMessageByteOrder { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -508,28 +444,6 @@ pub enum DBusMessageHeaderField { __Unknown(i32), } -impl fmt::Display for DBusMessageHeaderField { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DBusMessageHeaderField::{}", - match *self { - Self::Invalid => "Invalid", - Self::Path => "Path", - Self::Interface => "Interface", - Self::Member => "Member", - Self::ErrorName => "ErrorName", - Self::ReplySerial => "ReplySerial", - Self::Destination => "Destination", - Self::Sender => "Sender", - Self::Signature => "Signature", - Self::NumUnixFds => "NumUnixFds", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DBusMessageHeaderField { type GlibType = ffi::GDBusMessageHeaderField; @@ -574,6 +488,7 @@ impl FromGlib for DBusMessageHeaderField { impl StaticType for DBusMessageHeaderField { #[inline] + #[doc(alias = "g_dbus_message_header_field_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_message_header_field_get_type()) } } @@ -585,7 +500,7 @@ impl glib::HasParamSpec for DBusMessageHeaderField { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -643,23 +558,6 @@ pub enum DBusMessageType { __Unknown(i32), } -impl fmt::Display for DBusMessageType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DBusMessageType::{}", - match *self { - Self::Invalid => "Invalid", - Self::MethodCall => "MethodCall", - Self::MethodReturn => "MethodReturn", - Self::Error => "Error", - Self::Signal => "Signal", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DBusMessageType { type GlibType = ffi::GDBusMessageType; @@ -694,6 +592,7 @@ impl FromGlib for DBusMessageType { impl StaticType for DBusMessageType { #[inline] + #[doc(alias = "g_dbus_message_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_message_type_get_type()) } } @@ -705,7 +604,7 @@ impl glib::HasParamSpec for DBusMessageType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -759,21 +658,6 @@ pub enum DataStreamByteOrder { __Unknown(i32), } -impl fmt::Display for DataStreamByteOrder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DataStreamByteOrder::{}", - match *self { - Self::BigEndian => "BigEndian", - Self::LittleEndian => "LittleEndian", - Self::HostEndian => "HostEndian", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DataStreamByteOrder { type GlibType = ffi::GDataStreamByteOrder; @@ -804,6 +688,7 @@ impl FromGlib for DataStreamByteOrder { impl StaticType for DataStreamByteOrder { #[inline] + #[doc(alias = "g_data_stream_byte_order_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_data_stream_byte_order_get_type()) } } @@ -815,7 +700,7 @@ impl glib::HasParamSpec for DataStreamByteOrder { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -871,22 +756,6 @@ pub enum DataStreamNewlineType { __Unknown(i32), } -impl fmt::Display for DataStreamNewlineType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DataStreamNewlineType::{}", - match *self { - Self::Lf => "Lf", - Self::Cr => "Cr", - Self::CrLf => "CrLf", - Self::Any => "Any", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DataStreamNewlineType { type GlibType = ffi::GDataStreamNewlineType; @@ -919,6 +788,7 @@ impl FromGlib for DataStreamNewlineType { impl StaticType for DataStreamNewlineType { #[inline] + #[doc(alias = "g_data_stream_newline_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_data_stream_newline_type_get_type()) } } @@ -930,7 +800,7 @@ impl glib::HasParamSpec for DataStreamNewlineType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -988,23 +858,6 @@ pub enum DriveStartStopType { __Unknown(i32), } -impl fmt::Display for DriveStartStopType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DriveStartStopType::{}", - match *self { - Self::Unknown => "Unknown", - Self::Shutdown => "Shutdown", - Self::Network => "Network", - Self::Multidisk => "Multidisk", - Self::Password => "Password", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DriveStartStopType { type GlibType = ffi::GDriveStartStopType; @@ -1039,6 +892,7 @@ impl FromGlib for DriveStartStopType { impl StaticType for DriveStartStopType { #[inline] + #[doc(alias = "g_drive_start_stop_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_drive_start_stop_type_get_type()) } } @@ -1050,7 +904,7 @@ impl glib::HasParamSpec for DriveStartStopType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1106,22 +960,6 @@ pub enum EmblemOrigin { __Unknown(i32), } -impl fmt::Display for EmblemOrigin { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "EmblemOrigin::{}", - match *self { - Self::Unknown => "Unknown", - Self::Device => "Device", - Self::Livemetadata => "Livemetadata", - Self::Tag => "Tag", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for EmblemOrigin { type GlibType = ffi::GEmblemOrigin; @@ -1154,6 +992,7 @@ impl FromGlib for EmblemOrigin { impl StaticType for EmblemOrigin { #[inline] + #[doc(alias = "g_emblem_origin_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_emblem_origin_get_type()) } } @@ -1165,7 +1004,7 @@ impl glib::HasParamSpec for EmblemOrigin { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1219,21 +1058,6 @@ pub enum FileAttributeStatus { __Unknown(i32), } -impl fmt::Display for FileAttributeStatus { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FileAttributeStatus::{}", - match *self { - Self::Unset => "Unset", - Self::Set => "Set", - Self::ErrorSetting => "ErrorSetting", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FileAttributeStatus { type GlibType = ffi::GFileAttributeStatus; @@ -1264,6 +1088,7 @@ impl FromGlib for FileAttributeStatus { impl StaticType for FileAttributeStatus { #[inline] + #[doc(alias = "g_file_attribute_status_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_attribute_status_get_type()) } } @@ -1275,7 +1100,7 @@ impl glib::HasParamSpec for FileAttributeStatus { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1343,28 +1168,6 @@ pub enum FileAttributeType { __Unknown(i32), } -impl fmt::Display for FileAttributeType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FileAttributeType::{}", - match *self { - Self::Invalid => "Invalid", - Self::String => "String", - Self::ByteString => "ByteString", - Self::Boolean => "Boolean", - Self::Uint32 => "Uint32", - Self::Int32 => "Int32", - Self::Uint64 => "Uint64", - Self::Int64 => "Int64", - Self::Object => "Object", - Self::Stringv => "Stringv", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FileAttributeType { type GlibType = ffi::GFileAttributeType; @@ -1409,6 +1212,7 @@ impl FromGlib for FileAttributeType { impl StaticType for FileAttributeType { #[inline] + #[doc(alias = "g_file_attribute_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_attribute_type_get_type()) } } @@ -1420,7 +1224,7 @@ impl glib::HasParamSpec for FileAttributeType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1490,29 +1294,6 @@ pub enum FileMonitorEvent { __Unknown(i32), } -impl fmt::Display for FileMonitorEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FileMonitorEvent::{}", - match *self { - Self::Changed => "Changed", - Self::ChangesDoneHint => "ChangesDoneHint", - Self::Deleted => "Deleted", - Self::Created => "Created", - Self::AttributeChanged => "AttributeChanged", - Self::PreUnmount => "PreUnmount", - Self::Unmounted => "Unmounted", - Self::Moved => "Moved", - Self::Renamed => "Renamed", - Self::MovedIn => "MovedIn", - Self::MovedOut => "MovedOut", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FileMonitorEvent { type GlibType = ffi::GFileMonitorEvent; @@ -1559,6 +1340,7 @@ impl FromGlib for FileMonitorEvent { impl StaticType for FileMonitorEvent { #[inline] + #[doc(alias = "g_file_monitor_event_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_monitor_event_get_type()) } } @@ -1570,7 +1352,7 @@ impl glib::HasParamSpec for FileMonitorEvent { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1632,25 +1414,6 @@ pub enum FileType { __Unknown(i32), } -impl fmt::Display for FileType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FileType::{}", - match *self { - Self::Unknown => "Unknown", - Self::Regular => "Regular", - Self::Directory => "Directory", - Self::SymbolicLink => "SymbolicLink", - Self::Special => "Special", - Self::Shortcut => "Shortcut", - Self::Mountable => "Mountable", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FileType { type GlibType = ffi::GFileType; @@ -1689,6 +1452,7 @@ impl FromGlib for FileType { impl StaticType for FileType { #[inline] + #[doc(alias = "g_file_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_type_get_type()) } } @@ -1700,7 +1464,7 @@ impl glib::HasParamSpec for FileType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1846,67 +1610,6 @@ pub enum IOErrorEnum { __Unknown(i32), } -impl fmt::Display for IOErrorEnum { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "IOErrorEnum::{}", - match *self { - Self::Failed => "Failed", - Self::NotFound => "NotFound", - Self::Exists => "Exists", - Self::IsDirectory => "IsDirectory", - Self::NotDirectory => "NotDirectory", - Self::NotEmpty => "NotEmpty", - Self::NotRegularFile => "NotRegularFile", - Self::NotSymbolicLink => "NotSymbolicLink", - Self::NotMountableFile => "NotMountableFile", - Self::FilenameTooLong => "FilenameTooLong", - Self::InvalidFilename => "InvalidFilename", - Self::TooManyLinks => "TooManyLinks", - Self::NoSpace => "NoSpace", - Self::InvalidArgument => "InvalidArgument", - Self::PermissionDenied => "PermissionDenied", - Self::NotSupported => "NotSupported", - Self::NotMounted => "NotMounted", - Self::AlreadyMounted => "AlreadyMounted", - Self::Closed => "Closed", - Self::Cancelled => "Cancelled", - Self::Pending => "Pending", - Self::ReadOnly => "ReadOnly", - Self::CantCreateBackup => "CantCreateBackup", - Self::WrongEtag => "WrongEtag", - Self::TimedOut => "TimedOut", - Self::WouldRecurse => "WouldRecurse", - Self::Busy => "Busy", - Self::WouldBlock => "WouldBlock", - Self::HostNotFound => "HostNotFound", - Self::WouldMerge => "WouldMerge", - Self::FailedHandled => "FailedHandled", - Self::TooManyOpenFiles => "TooManyOpenFiles", - Self::NotInitialized => "NotInitialized", - Self::AddressInUse => "AddressInUse", - Self::PartialInput => "PartialInput", - Self::InvalidData => "InvalidData", - Self::DbusError => "DbusError", - Self::HostUnreachable => "HostUnreachable", - Self::NetworkUnreachable => "NetworkUnreachable", - Self::ConnectionRefused => "ConnectionRefused", - Self::ProxyFailed => "ProxyFailed", - Self::ProxyAuthFailed => "ProxyAuthFailed", - Self::ProxyNeedAuth => "ProxyNeedAuth", - Self::ProxyNotAllowed => "ProxyNotAllowed", - Self::BrokenPipe => "BrokenPipe", - Self::NotConnected => "NotConnected", - Self::MessageTooLarge => "MessageTooLarge", - #[cfg(feature = "v2_72")] - Self::NoSuchDevice => "NoSuchDevice", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for IOErrorEnum { type GlibType = ffi::GIOErrorEnum; @@ -2048,6 +1751,7 @@ impl glib::error::ErrorDomain for IOErrorEnum { impl StaticType for IOErrorEnum { #[inline] + #[doc(alias = "g_io_error_enum_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_io_error_enum_get_type()) } } @@ -2059,7 +1763,7 @@ impl glib::HasParamSpec for IOErrorEnum { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2115,23 +1819,6 @@ pub enum MemoryMonitorWarningLevel { __Unknown(i32), } -#[cfg(feature = "v2_64")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] -impl fmt::Display for MemoryMonitorWarningLevel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "MemoryMonitorWarningLevel::{}", - match *self { - Self::Low => "Low", - Self::Medium => "Medium", - Self::Critical => "Critical", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[doc(hidden)] @@ -2168,6 +1855,7 @@ impl FromGlib for MemoryMonitorWarningLevel { #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] impl StaticType for MemoryMonitorWarningLevel { #[inline] + #[doc(alias = "g_memory_monitor_warning_level_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_memory_monitor_warning_level_get_type()) } } @@ -2181,7 +1869,7 @@ impl glib::HasParamSpec for MemoryMonitorWarningLevel { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2243,21 +1931,6 @@ pub enum MountOperationResult { __Unknown(i32), } -impl fmt::Display for MountOperationResult { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "MountOperationResult::{}", - match *self { - Self::Handled => "Handled", - Self::Aborted => "Aborted", - Self::Unhandled => "Unhandled", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for MountOperationResult { type GlibType = ffi::GMountOperationResult; @@ -2288,6 +1961,7 @@ impl FromGlib for MountOperationResult { impl StaticType for MountOperationResult { #[inline] + #[doc(alias = "g_mount_operation_result_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_mount_operation_result_get_type()) } } @@ -2299,7 +1973,7 @@ impl glib::HasParamSpec for MountOperationResult { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2355,22 +2029,6 @@ pub enum NetworkConnectivity { __Unknown(i32), } -impl fmt::Display for NetworkConnectivity { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "NetworkConnectivity::{}", - match *self { - Self::Local => "Local", - Self::Limited => "Limited", - Self::Portal => "Portal", - Self::Full => "Full", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for NetworkConnectivity { type GlibType = ffi::GNetworkConnectivity; @@ -2403,6 +2061,7 @@ impl FromGlib for NetworkConnectivity { impl StaticType for NetworkConnectivity { #[inline] + #[doc(alias = "g_network_connectivity_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_network_connectivity_get_type()) } } @@ -2414,7 +2073,7 @@ impl glib::HasParamSpec for NetworkConnectivity { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2470,22 +2129,6 @@ pub enum NotificationPriority { __Unknown(i32), } -impl fmt::Display for NotificationPriority { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "NotificationPriority::{}", - match *self { - Self::Normal => "Normal", - Self::Low => "Low", - Self::High => "High", - Self::Urgent => "Urgent", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for NotificationPriority { type GlibType = ffi::GNotificationPriority; @@ -2518,6 +2161,7 @@ impl FromGlib for NotificationPriority { impl StaticType for NotificationPriority { #[inline] + #[doc(alias = "g_notification_priority_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_notification_priority_get_type()) } } @@ -2529,7 +2173,7 @@ impl glib::HasParamSpec for NotificationPriority { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2583,21 +2227,6 @@ pub enum PasswordSave { __Unknown(i32), } -impl fmt::Display for PasswordSave { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PasswordSave::{}", - match *self { - Self::Never => "Never", - Self::ForSession => "ForSession", - Self::Permanently => "Permanently", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for PasswordSave { type GlibType = ffi::GPasswordSave; @@ -2628,6 +2257,7 @@ impl FromGlib for PasswordSave { impl StaticType for PasswordSave { #[inline] + #[doc(alias = "g_password_save_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_password_save_get_type()) } } @@ -2639,7 +2269,7 @@ impl glib::HasParamSpec for PasswordSave { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2695,23 +2325,6 @@ pub enum PollableReturn { __Unknown(i32), } -#[cfg(feature = "v2_60")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] -impl fmt::Display for PollableReturn { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PollableReturn::{}", - match *self { - Self::Failed => "Failed", - Self::Ok => "Ok", - Self::WouldBlock => "WouldBlock", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(hidden)] @@ -2748,6 +2361,7 @@ impl FromGlib for PollableReturn { #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl StaticType for PollableReturn { #[inline] + #[doc(alias = "g_pollable_return_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_pollable_return_get_type()) } } @@ -2761,7 +2375,7 @@ impl glib::HasParamSpec for PollableReturn { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2823,21 +2437,6 @@ pub enum ResolverError { __Unknown(i32), } -impl fmt::Display for ResolverError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ResolverError::{}", - match *self { - Self::NotFound => "NotFound", - Self::TemporaryFailure => "TemporaryFailure", - Self::Internal => "Internal", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ResolverError { type GlibType = ffi::GResolverError; @@ -2888,6 +2487,7 @@ impl glib::error::ErrorDomain for ResolverError { impl StaticType for ResolverError { #[inline] + #[doc(alias = "g_resolver_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_resolver_error_get_type()) } } @@ -2899,7 +2499,7 @@ impl glib::HasParamSpec for ResolverError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2957,23 +2557,6 @@ pub enum ResolverRecordType { __Unknown(i32), } -impl fmt::Display for ResolverRecordType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ResolverRecordType::{}", - match *self { - Self::Srv => "Srv", - Self::Mx => "Mx", - Self::Txt => "Txt", - Self::Soa => "Soa", - Self::Ns => "Ns", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ResolverRecordType { type GlibType = ffi::GResolverRecordType; @@ -3008,6 +2591,7 @@ impl FromGlib for ResolverRecordType { impl StaticType for ResolverRecordType { #[inline] + #[doc(alias = "g_resolver_record_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_resolver_record_type_get_type()) } } @@ -3019,7 +2603,7 @@ impl glib::HasParamSpec for ResolverRecordType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3071,20 +2655,6 @@ pub enum ResourceError { __Unknown(i32), } -impl fmt::Display for ResourceError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ResourceError::{}", - match *self { - Self::NotFound => "NotFound", - Self::Internal => "Internal", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ResourceError { type GlibType = ffi::GResourceError; @@ -3133,6 +2703,7 @@ impl glib::error::ErrorDomain for ResourceError { impl StaticType for ResourceError { #[inline] + #[doc(alias = "g_resource_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_resource_error_get_type()) } } @@ -3144,7 +2715,7 @@ impl glib::HasParamSpec for ResourceError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3210,27 +2781,6 @@ pub enum SocketClientEvent { __Unknown(i32), } -impl fmt::Display for SocketClientEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SocketClientEvent::{}", - match *self { - Self::Resolving => "Resolving", - Self::Resolved => "Resolved", - Self::Connecting => "Connecting", - Self::Connected => "Connected", - Self::ProxyNegotiating => "ProxyNegotiating", - Self::ProxyNegotiated => "ProxyNegotiated", - Self::TlsHandshaking => "TlsHandshaking", - Self::TlsHandshaked => "TlsHandshaked", - Self::Complete => "Complete", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SocketClientEvent { type GlibType = ffi::GSocketClientEvent; @@ -3273,6 +2823,7 @@ impl FromGlib for SocketClientEvent { impl StaticType for SocketClientEvent { #[inline] + #[doc(alias = "g_socket_client_event_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_socket_client_event_get_type()) } } @@ -3284,7 +2835,7 @@ impl glib::HasParamSpec for SocketClientEvent { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3340,22 +2891,6 @@ pub enum SocketFamily { __Unknown(i32), } -impl fmt::Display for SocketFamily { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SocketFamily::{}", - match *self { - Self::Invalid => "Invalid", - Self::Unix => "Unix", - Self::Ipv4 => "Ipv4", - Self::Ipv6 => "Ipv6", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SocketFamily { type GlibType = ffi::GSocketFamily; @@ -3388,6 +2923,7 @@ impl FromGlib for SocketFamily { impl StaticType for SocketFamily { #[inline] + #[doc(alias = "g_socket_family_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_socket_family_get_type()) } } @@ -3399,7 +2935,7 @@ impl glib::HasParamSpec for SocketFamily { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3455,22 +2991,6 @@ pub enum SocketListenerEvent { __Unknown(i32), } -impl fmt::Display for SocketListenerEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SocketListenerEvent::{}", - match *self { - Self::Binding => "Binding", - Self::Bound => "Bound", - Self::Listening => "Listening", - Self::Listened => "Listened", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SocketListenerEvent { type GlibType = ffi::GSocketListenerEvent; @@ -3503,6 +3023,7 @@ impl FromGlib for SocketListenerEvent { impl StaticType for SocketListenerEvent { #[inline] + #[doc(alias = "g_socket_listener_event_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_socket_listener_event_get_type()) } } @@ -3514,7 +3035,7 @@ impl glib::HasParamSpec for SocketListenerEvent { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3572,23 +3093,6 @@ pub enum SocketProtocol { __Unknown(i32), } -impl fmt::Display for SocketProtocol { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SocketProtocol::{}", - match *self { - Self::Unknown => "Unknown", - Self::Default => "Default", - Self::Tcp => "Tcp", - Self::Udp => "Udp", - Self::Sctp => "Sctp", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SocketProtocol { type GlibType = ffi::GSocketProtocol; @@ -3623,6 +3127,7 @@ impl FromGlib for SocketProtocol { impl StaticType for SocketProtocol { #[inline] + #[doc(alias = "g_socket_protocol_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_socket_protocol_get_type()) } } @@ -3634,7 +3139,7 @@ impl glib::HasParamSpec for SocketProtocol { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3690,22 +3195,6 @@ pub enum SocketType { __Unknown(i32), } -impl fmt::Display for SocketType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SocketType::{}", - match *self { - Self::Invalid => "Invalid", - Self::Stream => "Stream", - Self::Datagram => "Datagram", - Self::Seqpacket => "Seqpacket", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SocketType { type GlibType = ffi::GSocketType; @@ -3738,6 +3227,7 @@ impl FromGlib for SocketType { impl StaticType for SocketType { #[inline] + #[doc(alias = "g_socket_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_socket_type_get_type()) } } @@ -3749,7 +3239,7 @@ impl glib::HasParamSpec for SocketType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3803,21 +3293,6 @@ pub enum TlsAuthenticationMode { __Unknown(i32), } -impl fmt::Display for TlsAuthenticationMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsAuthenticationMode::{}", - match *self { - Self::None => "None", - Self::Requested => "Requested", - Self::Required => "Required", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TlsAuthenticationMode { type GlibType = ffi::GTlsAuthenticationMode; @@ -3848,6 +3323,7 @@ impl FromGlib for TlsAuthenticationMode { impl StaticType for TlsAuthenticationMode { #[inline] + #[doc(alias = "g_tls_authentication_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_authentication_mode_get_type()) } } @@ -3859,7 +3335,7 @@ impl glib::HasParamSpec for TlsAuthenticationMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3909,19 +3385,6 @@ pub enum TlsCertificateRequestFlags { __Unknown(i32), } -impl fmt::Display for TlsCertificateRequestFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsCertificateRequestFlags::{}", - match *self { - Self::None => "None", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TlsCertificateRequestFlags { type GlibType = ffi::GTlsCertificateRequestFlags; @@ -3948,6 +3411,7 @@ impl FromGlib for TlsCertificateRequestFlags { impl StaticType for TlsCertificateRequestFlags { #[inline] + #[doc(alias = "g_tls_certificate_request_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_certificate_request_flags_get_type()) } } @@ -3959,7 +3423,7 @@ impl glib::HasParamSpec for TlsCertificateRequestFlags { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4017,24 +3481,6 @@ pub enum TlsChannelBindingType { __Unknown(i32), } -#[cfg(feature = "v2_66")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] -impl fmt::Display for TlsChannelBindingType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsChannelBindingType::{}", - match *self { - Self::Unique => "Unique", - Self::ServerEndPoint => "ServerEndPoint", - #[cfg(feature = "v2_74")] - Self::Exporter => "Exporter", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] @@ -4073,6 +3519,7 @@ impl FromGlib for TlsChannelBindingType { #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl StaticType for TlsChannelBindingType { #[inline] + #[doc(alias = "g_tls_channel_binding_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_channel_binding_type_get_type()) } } @@ -4086,7 +3533,7 @@ impl glib::HasParamSpec for TlsChannelBindingType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4146,20 +3593,6 @@ pub enum TlsDatabaseLookupFlags { __Unknown(i32), } -impl fmt::Display for TlsDatabaseLookupFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsDatabaseLookupFlags::{}", - match *self { - Self::None => "None", - Self::Keypair => "Keypair", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TlsDatabaseLookupFlags { type GlibType = ffi::GTlsDatabaseLookupFlags; @@ -4188,6 +3621,7 @@ impl FromGlib for TlsDatabaseLookupFlags { impl StaticType for TlsDatabaseLookupFlags { #[inline] + #[doc(alias = "g_tls_database_lookup_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_database_lookup_flags_get_type()) } } @@ -4199,7 +3633,7 @@ impl glib::HasParamSpec for TlsDatabaseLookupFlags { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4267,28 +3701,6 @@ pub enum TlsError { __Unknown(i32), } -impl fmt::Display for TlsError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsError::{}", - match *self { - Self::Unavailable => "Unavailable", - Self::Misc => "Misc", - Self::BadCertificate => "BadCertificate", - Self::NotTls => "NotTls", - Self::Handshake => "Handshake", - Self::CertificateRequired => "CertificateRequired", - Self::Eof => "Eof", - Self::InappropriateFallback => "InappropriateFallback", - #[cfg(feature = "v2_72")] - Self::BadCertificatePassword => "BadCertificatePassword", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TlsError { type GlibType = ffi::GTlsError; @@ -4353,6 +3765,7 @@ impl glib::error::ErrorDomain for TlsError { impl StaticType for TlsError { #[inline] + #[doc(alias = "g_tls_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_error_get_type()) } } @@ -4364,7 +3777,7 @@ impl glib::HasParamSpec for TlsError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4418,21 +3831,6 @@ pub enum TlsInteractionResult { __Unknown(i32), } -impl fmt::Display for TlsInteractionResult { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsInteractionResult::{}", - match *self { - Self::Unhandled => "Unhandled", - Self::Handled => "Handled", - Self::Failed => "Failed", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TlsInteractionResult { type GlibType = ffi::GTlsInteractionResult; @@ -4463,6 +3861,7 @@ impl FromGlib for TlsInteractionResult { impl StaticType for TlsInteractionResult { #[inline] + #[doc(alias = "g_tls_interaction_result_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_interaction_result_get_type()) } } @@ -4474,7 +3873,7 @@ impl glib::HasParamSpec for TlsInteractionResult { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4540,28 +3939,6 @@ pub enum TlsProtocolVersion { __Unknown(i32), } -#[cfg(feature = "v2_70")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] -impl fmt::Display for TlsProtocolVersion { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsProtocolVersion::{}", - match *self { - Self::Unknown => "Unknown", - Self::Ssl30 => "Ssl30", - Self::Tls10 => "Tls10", - Self::Tls11 => "Tls11", - Self::Tls12 => "Tls12", - Self::Tls13 => "Tls13", - Self::Dtls10 => "Dtls10", - Self::Dtls12 => "Dtls12", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(hidden)] @@ -4608,6 +3985,7 @@ impl FromGlib for TlsProtocolVersion { #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] impl StaticType for TlsProtocolVersion { #[inline] + #[doc(alias = "g_tls_protocol_version_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_protocol_version_get_type()) } } @@ -4621,7 +3999,7 @@ impl glib::HasParamSpec for TlsProtocolVersion { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4684,22 +4062,6 @@ pub enum TlsRehandshakeMode { __Unknown(i32), } -#[allow(deprecated)] -impl fmt::Display for TlsRehandshakeMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TlsRehandshakeMode::{}", - match *self { - Self::Never => "Never", - Self::Safely => "Safely", - Self::Unsafely => "Unsafely", - _ => "Unknown", - } - ) - } -} - #[allow(deprecated)] #[doc(hidden)] impl IntoGlib for TlsRehandshakeMode { @@ -4733,6 +4095,7 @@ impl FromGlib for TlsRehandshakeMode { #[allow(deprecated)] impl StaticType for TlsRehandshakeMode { #[inline] + #[doc(alias = "g_tls_rehandshake_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_rehandshake_mode_get_type()) } } @@ -4745,7 +4108,7 @@ impl glib::HasParamSpec for TlsRehandshakeMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4809,24 +4172,6 @@ pub enum UnixSocketAddressType { __Unknown(i32), } -#[cfg(unix)] -impl fmt::Display for UnixSocketAddressType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "UnixSocketAddressType::{}", - match *self { - Self::Invalid => "Invalid", - Self::Anonymous => "Anonymous", - Self::Path => "Path", - Self::Abstract => "Abstract", - Self::AbstractPadded => "AbstractPadded", - _ => "Unknown", - } - ) - } -} - #[cfg(unix)] #[doc(hidden)] impl IntoGlib for UnixSocketAddressType { @@ -4864,6 +4209,7 @@ impl FromGlib for UnixSocketAddressType { #[cfg(unix)] impl StaticType for UnixSocketAddressType { #[inline] + #[doc(alias = "g_unix_socket_address_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_unix_socket_address_type_get_type()) } } @@ -4876,7 +4222,7 @@ impl glib::HasParamSpec for UnixSocketAddressType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4934,21 +4280,6 @@ pub enum ZlibCompressorFormat { __Unknown(i32), } -impl fmt::Display for ZlibCompressorFormat { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ZlibCompressorFormat::{}", - match *self { - Self::Zlib => "Zlib", - Self::Gzip => "Gzip", - Self::Raw => "Raw", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ZlibCompressorFormat { type GlibType = ffi::GZlibCompressorFormat; @@ -4979,6 +4310,7 @@ impl FromGlib for ZlibCompressorFormat { impl StaticType for ZlibCompressorFormat { #[inline] + #[doc(alias = "g_zlib_compressor_format_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_zlib_compressor_format_get_type()) } } @@ -4990,7 +4322,7 @@ impl glib::HasParamSpec for ZlibCompressorFormat { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gio/src/auto/file.rs b/gio/src/auto/file.rs index 2b3f62c952cb..6006dfdd5f01 100644 --- a/gio/src/auto/file.rs +++ b/gio/src/auto/file.rs @@ -9,7 +9,7 @@ use crate::{ MountOperation, MountUnmountFlags, }; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, mem, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GFile")] @@ -76,8 +76,8 @@ impl File { tmpl: Option>, ) -> Result<(File, FileIOStream), glib::Error> { unsafe { - let mut iostream = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut iostream = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_new_tmp( tmpl.as_ref().map(|p| p.as_ref()).to_glib_none().0, &mut iostream, @@ -114,7 +114,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_append_to( self.as_ref().to_glib_none().0, flags.into_glib(), @@ -156,7 +156,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_append_to_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -206,7 +206,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_build_attribute_list_for_copy( self.as_ref().to_glib_none().0, flags.into_glib(), @@ -250,7 +250,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { }; let super_callback0: &Option<&mut dyn (FnMut(i64, i64))> = &progress_callback_data; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_copy( self.as_ref().to_glib_none().0, destination.as_ref().to_glib_none().0, @@ -277,7 +277,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_copy_attributes( self.as_ref().to_glib_none().0, destination.as_ref().to_glib_none().0, @@ -301,7 +301,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_create( self.as_ref().to_glib_none().0, flags.into_glib(), @@ -343,7 +343,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_create_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -391,7 +391,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_create_readwrite( self.as_ref().to_glib_none().0, flags.into_glib(), @@ -433,7 +433,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_create_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -478,7 +478,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_file_delete")] fn delete(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_delete( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -519,7 +519,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_delete_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -590,7 +590,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_eject_mountable_with_operation_finish( _source_object as *mut _, res, @@ -648,7 +648,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_enumerate_children( self.as_ref().to_glib_none().0, attributes.to_glib_none().0, @@ -680,7 +680,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_find_enclosing_mount( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -716,7 +716,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_child_for_display_name")] fn child_for_display_name(&self, display_name: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_get_child_for_display_name( self.as_ref().to_glib_none().0, display_name.to_glib_none().0, @@ -813,8 +813,8 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(glib::Bytes, Option), glib::Error> { unsafe { - let mut etag_out = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut etag_out = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_load_bytes( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -856,8 +856,8 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut etag_out = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut etag_out = std::ptr::null_mut(); let ret = ffi::g_file_load_bytes_finish( _source_object as *mut _, res, @@ -910,10 +910,10 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(Vec, Option), glib::Error> { unsafe { - let mut contents = ptr::null_mut(); - let mut length = mem::MaybeUninit::uninit(); - let mut etag_out = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut contents = std::ptr::null_mut(); + let mut length = std::mem::MaybeUninit::uninit(); + let mut etag_out = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_load_contents( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -961,10 +961,10 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut contents = ptr::null_mut(); - let mut length = mem::MaybeUninit::uninit(); - let mut etag_out = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut contents = std::ptr::null_mut(); + let mut length = std::mem::MaybeUninit::uninit(); + let mut etag_out = std::ptr::null_mut(); let _ = ffi::g_file_load_contents_finish( _source_object as *mut _, res, @@ -1021,7 +1021,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_make_directory( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -1062,7 +1062,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_make_directory_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -1106,7 +1106,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_make_directory_with_parents( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -1128,7 +1128,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_make_symbolic_link( self.as_ref().to_glib_none().0, symlink_value.as_ref().to_glib_none().0, @@ -1151,7 +1151,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_monitor( self.as_ref().to_glib_none().0, flags.into_glib(), @@ -1173,7 +1173,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_monitor_directory( self.as_ref().to_glib_none().0, flags.into_glib(), @@ -1195,7 +1195,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_monitor_file( self.as_ref().to_glib_none().0, flags.into_glib(), @@ -1237,7 +1237,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_mount_enclosing_volume_finish( _source_object as *mut _, res, @@ -1314,7 +1314,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_mount_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -1390,7 +1390,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { }; let super_callback0: &Option<&mut dyn (FnMut(i64, i64))> = &progress_callback_data; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_move( self.as_ref().to_glib_none().0, destination.as_ref().to_glib_none().0, @@ -1415,7 +1415,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_open_readwrite( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -1455,7 +1455,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_open_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -1524,7 +1524,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_poll_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -1566,7 +1566,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_default_handler( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -1608,7 +1608,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_default_handler_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -1681,7 +1681,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_filesystem_info( self.as_ref().to_glib_none().0, attributes.to_glib_none().0, @@ -1723,7 +1723,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_filesystem_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -1778,7 +1778,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_info( self.as_ref().to_glib_none().0, attributes.to_glib_none().0, @@ -1822,7 +1822,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -1877,7 +1877,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_settable_attributes( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -1897,7 +1897,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_query_writable_namespaces( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -1917,7 +1917,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_read( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -1957,7 +1957,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_read_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -2005,7 +2005,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_replace( self.as_ref().to_glib_none().0, etag.to_glib_none().0, @@ -2051,7 +2051,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_replace_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -2115,8 +2115,8 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { ) -> Result, glib::Error> { let length = contents.len() as _; unsafe { - let mut new_etag = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut new_etag = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_replace_contents( self.as_ref().to_glib_none().0, contents.to_glib_none().0, @@ -2151,7 +2151,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_replace_readwrite( self.as_ref().to_glib_none().0, etag.to_glib_none().0, @@ -2197,7 +2197,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_replace_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -2276,7 +2276,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_attribute_byte_string( self.as_ref().to_glib_none().0, attribute.to_glib_none().0, @@ -2303,7 +2303,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_attribute_int32( self.as_ref().to_glib_none().0, attribute.to_glib_none().0, @@ -2330,7 +2330,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_attribute_int64( self.as_ref().to_glib_none().0, attribute.to_glib_none().0, @@ -2357,7 +2357,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_attribute_string( self.as_ref().to_glib_none().0, attribute.to_glib_none().0, @@ -2384,7 +2384,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_attribute_uint32( self.as_ref().to_glib_none().0, attribute.to_glib_none().0, @@ -2411,7 +2411,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_attribute_uint64( self.as_ref().to_glib_none().0, attribute.to_glib_none().0, @@ -2457,8 +2457,8 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut info = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut info = std::ptr::null_mut(); let _ = ffi::g_file_set_attributes_finish( _source_object as *mut _, res, @@ -2520,7 +2520,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_attributes_from_info( self.as_ref().to_glib_none().0, info.to_glib_none().0, @@ -2544,7 +2544,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_set_display_name( self.as_ref().to_glib_none().0, display_name.to_glib_none().0, @@ -2586,7 +2586,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_set_display_name_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -2660,7 +2660,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_start_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -2733,7 +2733,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_stop_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -2791,7 +2791,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_file_trash")] fn trash(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_trash( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -2832,7 +2832,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_trash_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -2897,7 +2897,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_unmount_mountable_with_operation_finish( _source_object as *mut _, res, @@ -2949,9 +2949,3 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { } impl> FileExt for O {} - -impl fmt::Display for File { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("File") - } -} diff --git a/gio/src/auto/file_attribute_matcher.rs b/gio/src/auto/file_attribute_matcher.rs index 8938b64ce22d..7676094bde81 100644 --- a/gio/src/auto/file_attribute_matcher.rs +++ b/gio/src/auto/file_attribute_matcher.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -81,9 +80,9 @@ impl FileAttributeMatcher { } } -impl fmt::Display for FileAttributeMatcher { +impl std::fmt::Display for FileAttributeMatcher { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/gio/src/auto/file_enumerator.rs b/gio/src/auto/file_enumerator.rs index 0fb0553ee8d4..ab5f4420143b 100644 --- a/gio/src/auto/file_enumerator.rs +++ b/gio/src/auto/file_enumerator.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, File, FileInfo}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GFileEnumerator")] @@ -28,7 +28,7 @@ pub trait FileEnumeratorExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_file_enumerator_close")] fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_enumerator_close( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -69,7 +69,7 @@ pub trait FileEnumeratorExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_file_enumerator_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -152,7 +152,7 @@ pub trait FileEnumeratorExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_enumerator_next_file( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -193,7 +193,7 @@ pub trait FileEnumeratorExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_enumerator_next_files_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -244,9 +244,3 @@ pub trait FileEnumeratorExt: IsA + sealed::Sealed + 'static { } impl> FileEnumeratorExt for O {} - -impl fmt::Display for FileEnumerator { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileEnumerator") - } -} diff --git a/gio/src/auto/file_icon.rs b/gio/src/auto/file_icon.rs index d27cd7d95436..70ea64602453 100644 --- a/gio/src/auto/file_icon.rs +++ b/gio/src/auto/file_icon.rs @@ -4,7 +4,6 @@ use crate::{File, Icon, LoadableIcon}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GFileIcon")] @@ -27,9 +26,3 @@ impl FileIcon { unsafe { from_glib_none(ffi::g_file_icon_get_file(self.to_glib_none().0)) } } } - -impl fmt::Display for FileIcon { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileIcon") - } -} diff --git a/gio/src/auto/file_info.rs b/gio/src/auto/file_info.rs index 42806d827792..b9b3d2ae73bc 100644 --- a/gio/src/auto/file_info.rs +++ b/gio/src/auto/file_info.rs @@ -5,7 +5,6 @@ use crate::{FileAttributeMatcher, FileAttributeStatus, FileAttributeType, FileType, Icon}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GFileInfo")] @@ -593,9 +592,3 @@ impl Default for FileInfo { Self::new() } } - -impl fmt::Display for FileInfo { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileInfo") - } -} diff --git a/gio/src/auto/file_input_stream.rs b/gio/src/auto/file_input_stream.rs index b8d895d027e8..55fff6fd6016 100644 --- a/gio/src/auto/file_input_stream.rs +++ b/gio/src/auto/file_input_stream.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, FileInfo, InputStream, Seekable}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GFileInputStream")] @@ -32,7 +32,7 @@ pub trait FileInputStreamExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_input_stream_query_info( self.as_ref().to_glib_none().0, attributes.to_glib_none().0, @@ -74,7 +74,7 @@ pub trait FileInputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_input_stream_query_info_finish( _source_object as *mut _, res, @@ -121,9 +121,3 @@ pub trait FileInputStreamExt: IsA + sealed::Sealed + 'static { } impl> FileInputStreamExt for O {} - -impl fmt::Display for FileInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileInputStream") - } -} diff --git a/gio/src/auto/file_io_stream.rs b/gio/src/auto/file_io_stream.rs index f78fa5b24be2..6fd2b4be9a2b 100644 --- a/gio/src/auto/file_io_stream.rs +++ b/gio/src/auto/file_io_stream.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, FileInfo, IOStream, Seekable}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GFileIOStream")] @@ -42,7 +42,7 @@ pub trait FileIOStreamExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_io_stream_query_info( self.as_ref().to_glib_none().0, attributes.to_glib_none().0, @@ -84,7 +84,7 @@ pub trait FileIOStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_io_stream_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -128,9 +128,3 @@ pub trait FileIOStreamExt: IsA + sealed::Sealed + 'static { } impl> FileIOStreamExt for O {} - -impl fmt::Display for FileIOStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileIOStream") - } -} diff --git a/gio/src/auto/file_monitor.rs b/gio/src/auto/file_monitor.rs index 4d49beb9a48a..2316a785e13b 100644 --- a/gio/src/auto/file_monitor.rs +++ b/gio/src/auto/file_monitor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GFileMonitor")] @@ -102,7 +102,7 @@ pub trait FileMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -128,7 +128,7 @@ pub trait FileMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::cancelled\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_cancelled_trampoline:: as *const (), )), Box_::into_raw(f), @@ -154,7 +154,7 @@ pub trait FileMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::rate-limit\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_rate_limit_trampoline:: as *const (), )), Box_::into_raw(f), @@ -164,9 +164,3 @@ pub trait FileMonitorExt: IsA + sealed::Sealed + 'static { } impl> FileMonitorExt for O {} - -impl fmt::Display for FileMonitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileMonitor") - } -} diff --git a/gio/src/auto/file_output_stream.rs b/gio/src/auto/file_output_stream.rs index c05b129af57d..2884070fc20e 100644 --- a/gio/src/auto/file_output_stream.rs +++ b/gio/src/auto/file_output_stream.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, FileInfo, OutputStream, Seekable}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GFileOutputStream")] @@ -42,7 +42,7 @@ pub trait FileOutputStreamExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_output_stream_query_info( self.as_ref().to_glib_none().0, attributes.to_glib_none().0, @@ -84,7 +84,7 @@ pub trait FileOutputStreamExt: IsA + sealed::Sealed + 'static res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_file_output_stream_query_info_finish( _source_object as *mut _, res, @@ -131,9 +131,3 @@ pub trait FileOutputStreamExt: IsA + sealed::Sealed + 'static } impl> FileOutputStreamExt for O {} - -impl fmt::Display for FileOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileOutputStream") - } -} diff --git a/gio/src/auto/filename_completer.rs b/gio/src/auto/filename_completer.rs index e1ef4e1de37e..1f162591724a 100644 --- a/gio/src/auto/filename_completer.rs +++ b/gio/src/auto/filename_completer.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GFilenameCompleter")] @@ -67,7 +67,7 @@ impl FilenameCompleter { connect_raw( self.as_ptr() as *mut _, b"got-completion-data\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( got_completion_data_trampoline:: as *const (), )), Box_::into_raw(f), @@ -81,9 +81,3 @@ impl Default for FilenameCompleter { Self::new() } } - -impl fmt::Display for FilenameCompleter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FilenameCompleter") - } -} diff --git a/gio/src/auto/filter_input_stream.rs b/gio/src/auto/filter_input_stream.rs index ad464825ad00..fe92acf5c744 100644 --- a/gio/src/auto/filter_input_stream.rs +++ b/gio/src/auto/filter_input_stream.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GFilterInputStream")] @@ -77,7 +77,7 @@ pub trait FilterInputStreamExt: IsA + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"notify::close-base-stream\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_close_base_stream_trampoline:: as *const (), )), Box_::into_raw(f), @@ -87,9 +87,3 @@ pub trait FilterInputStreamExt: IsA + sealed::Sealed + 'stati } impl> FilterInputStreamExt for O {} - -impl fmt::Display for FilterInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FilterInputStream") - } -} diff --git a/gio/src/auto/filter_output_stream.rs b/gio/src/auto/filter_output_stream.rs index d146acde5950..4ca327373fe1 100644 --- a/gio/src/auto/filter_output_stream.rs +++ b/gio/src/auto/filter_output_stream.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GFilterOutputStream")] @@ -77,7 +77,7 @@ pub trait FilterOutputStreamExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::close-base-stream\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_close_base_stream_trampoline:: as *const (), )), Box_::into_raw(f), @@ -87,9 +87,3 @@ pub trait FilterOutputStreamExt: IsA + sealed::Sealed + 'sta } impl> FilterOutputStreamExt for O {} - -impl fmt::Display for FilterOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FilterOutputStream") - } -} diff --git a/gio/src/auto/flags.rs b/gio/src/auto/flags.rs index 184ca1dc7340..d965b678a945 100644 --- a/gio/src/auto/flags.rs +++ b/gio/src/auto/flags.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -20,12 +19,6 @@ bitflags! { } } -impl fmt::Display for AppInfoCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for AppInfoCreateFlags { type GlibType = ffi::GAppInfoCreateFlags; @@ -46,6 +39,7 @@ impl FromGlib for AppInfoCreateFlags { impl StaticType for AppInfoCreateFlags { #[inline] + #[doc(alias = "g_app_info_create_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_app_info_create_flags_get_type()) } } @@ -57,7 +51,7 @@ impl glib::HasParamSpec for AppInfoCreateFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -124,12 +118,6 @@ bitflags! { } } -impl fmt::Display for ApplicationFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for ApplicationFlags { type GlibType = ffi::GApplicationFlags; @@ -150,6 +138,7 @@ impl FromGlib for ApplicationFlags { impl StaticType for ApplicationFlags { #[inline] + #[doc(alias = "g_application_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_application_flags_get_type()) } } @@ -161,7 +150,7 @@ impl glib::HasParamSpec for ApplicationFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -220,12 +209,6 @@ bitflags! { } } -impl fmt::Display for AskPasswordFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for AskPasswordFlags { type GlibType = ffi::GAskPasswordFlags; @@ -246,6 +229,7 @@ impl FromGlib for AskPasswordFlags { impl StaticType for AskPasswordFlags { #[inline] + #[doc(alias = "g_ask_password_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_ask_password_flags_get_type()) } } @@ -257,7 +241,7 @@ impl glib::HasParamSpec for AskPasswordFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -312,12 +296,6 @@ bitflags! { } } -impl fmt::Display for BusNameOwnerFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for BusNameOwnerFlags { type GlibType = ffi::GBusNameOwnerFlags; @@ -338,6 +316,7 @@ impl FromGlib for BusNameOwnerFlags { impl StaticType for BusNameOwnerFlags { #[inline] + #[doc(alias = "g_bus_name_owner_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_bus_name_owner_flags_get_type()) } } @@ -349,7 +328,7 @@ impl glib::HasParamSpec for BusNameOwnerFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -400,12 +379,6 @@ bitflags! { } } -impl fmt::Display for BusNameWatcherFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for BusNameWatcherFlags { type GlibType = ffi::GBusNameWatcherFlags; @@ -426,6 +399,7 @@ impl FromGlib for BusNameWatcherFlags { impl StaticType for BusNameWatcherFlags { #[inline] + #[doc(alias = "g_bus_name_watcher_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_bus_name_watcher_flags_get_type()) } } @@ -437,7 +411,7 @@ impl glib::HasParamSpec for BusNameWatcherFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -490,12 +464,6 @@ bitflags! { } } -impl fmt::Display for ConverterFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for ConverterFlags { type GlibType = ffi::GConverterFlags; @@ -516,6 +484,7 @@ impl FromGlib for ConverterFlags { impl StaticType for ConverterFlags { #[inline] + #[doc(alias = "g_converter_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_converter_flags_get_type()) } } @@ -527,7 +496,7 @@ impl glib::HasParamSpec for ConverterFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -580,12 +549,6 @@ bitflags! { } } -impl fmt::Display for DBusCallFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusCallFlags { type GlibType = ffi::GDBusCallFlags; @@ -606,6 +569,7 @@ impl FromGlib for DBusCallFlags { impl StaticType for DBusCallFlags { #[inline] + #[doc(alias = "g_dbus_call_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_call_flags_get_type()) } } @@ -617,7 +581,7 @@ impl glib::HasParamSpec for DBusCallFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -668,12 +632,6 @@ bitflags! { } } -impl fmt::Display for DBusCapabilityFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusCapabilityFlags { type GlibType = ffi::GDBusCapabilityFlags; @@ -694,6 +652,7 @@ impl FromGlib for DBusCapabilityFlags { impl StaticType for DBusCapabilityFlags { #[inline] + #[doc(alias = "g_dbus_capability_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_capability_flags_get_type()) } } @@ -705,7 +664,7 @@ impl glib::HasParamSpec for DBusCapabilityFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -770,12 +729,6 @@ bitflags! { } } -impl fmt::Display for DBusConnectionFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusConnectionFlags { type GlibType = ffi::GDBusConnectionFlags; @@ -796,6 +749,7 @@ impl FromGlib for DBusConnectionFlags { impl StaticType for DBusConnectionFlags { #[inline] + #[doc(alias = "g_dbus_connection_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_connection_flags_get_type()) } } @@ -807,7 +761,7 @@ impl glib::HasParamSpec for DBusConnectionFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -858,12 +812,6 @@ bitflags! { } } -impl fmt::Display for DBusInterfaceSkeletonFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusInterfaceSkeletonFlags { type GlibType = ffi::GDBusInterfaceSkeletonFlags; @@ -884,6 +832,7 @@ impl FromGlib for DBusInterfaceSkeletonFlags { impl StaticType for DBusInterfaceSkeletonFlags { #[inline] + #[doc(alias = "g_dbus_interface_skeleton_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_interface_skeleton_flags_get_type()) } } @@ -895,7 +844,7 @@ impl glib::HasParamSpec for DBusInterfaceSkeletonFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -950,12 +899,6 @@ bitflags! { } } -impl fmt::Display for DBusMessageFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusMessageFlags { type GlibType = ffi::GDBusMessageFlags; @@ -976,6 +919,7 @@ impl FromGlib for DBusMessageFlags { impl StaticType for DBusMessageFlags { #[inline] + #[doc(alias = "g_dbus_message_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_message_flags_get_type()) } } @@ -987,7 +931,7 @@ impl glib::HasParamSpec for DBusMessageFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1038,12 +982,6 @@ bitflags! { } } -impl fmt::Display for DBusObjectManagerClientFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusObjectManagerClientFlags { type GlibType = ffi::GDBusObjectManagerClientFlags; @@ -1064,6 +1002,7 @@ impl FromGlib for DBusObjectManagerClientFla impl StaticType for DBusObjectManagerClientFlags { #[inline] + #[doc(alias = "g_dbus_object_manager_client_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_object_manager_client_flags_get_type()) } } @@ -1075,7 +1014,7 @@ impl glib::HasParamSpec for DBusObjectManagerClientFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1138,12 +1077,6 @@ bitflags! { } } -impl fmt::Display for DBusProxyFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusProxyFlags { type GlibType = ffi::GDBusProxyFlags; @@ -1164,6 +1097,7 @@ impl FromGlib for DBusProxyFlags { impl StaticType for DBusProxyFlags { #[inline] + #[doc(alias = "g_dbus_proxy_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_proxy_flags_get_type()) } } @@ -1175,7 +1109,7 @@ impl glib::HasParamSpec for DBusProxyFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1226,12 +1160,6 @@ bitflags! { } } -impl fmt::Display for DBusSendMessageFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusSendMessageFlags { type GlibType = ffi::GDBusSendMessageFlags; @@ -1252,6 +1180,7 @@ impl FromGlib for DBusSendMessageFlags { impl StaticType for DBusSendMessageFlags { #[inline] + #[doc(alias = "g_dbus_send_message_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_send_message_flags_get_type()) } } @@ -1263,7 +1192,7 @@ impl glib::HasParamSpec for DBusSendMessageFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1318,12 +1247,6 @@ bitflags! { } } -impl fmt::Display for DBusServerFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusServerFlags { type GlibType = ffi::GDBusServerFlags; @@ -1344,6 +1267,7 @@ impl FromGlib for DBusServerFlags { impl StaticType for DBusServerFlags { #[inline] + #[doc(alias = "g_dbus_server_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_server_flags_get_type()) } } @@ -1355,7 +1279,7 @@ impl glib::HasParamSpec for DBusServerFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1410,12 +1334,6 @@ bitflags! { } } -impl fmt::Display for DBusSignalFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DBusSignalFlags { type GlibType = ffi::GDBusSignalFlags; @@ -1436,6 +1354,7 @@ impl FromGlib for DBusSignalFlags { impl StaticType for DBusSignalFlags { #[inline] + #[doc(alias = "g_dbus_signal_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_dbus_signal_flags_get_type()) } } @@ -1447,7 +1366,7 @@ impl glib::HasParamSpec for DBusSignalFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1496,12 +1415,6 @@ bitflags! { } } -impl fmt::Display for DriveStartFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DriveStartFlags { type GlibType = ffi::GDriveStartFlags; @@ -1522,6 +1435,7 @@ impl FromGlib for DriveStartFlags { impl StaticType for DriveStartFlags { #[inline] + #[doc(alias = "g_drive_start_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_drive_start_flags_get_type()) } } @@ -1533,7 +1447,7 @@ impl glib::HasParamSpec for DriveStartFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1586,12 +1500,6 @@ bitflags! { } } -impl fmt::Display for FileAttributeInfoFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FileAttributeInfoFlags { type GlibType = ffi::GFileAttributeInfoFlags; @@ -1612,6 +1520,7 @@ impl FromGlib for FileAttributeInfoFlags { impl StaticType for FileAttributeInfoFlags { #[inline] + #[doc(alias = "g_file_attribute_info_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_attribute_info_flags_get_type()) } } @@ -1623,7 +1532,7 @@ impl glib::HasParamSpec for FileAttributeInfoFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1684,12 +1593,6 @@ bitflags! { } } -impl fmt::Display for FileCopyFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FileCopyFlags { type GlibType = ffi::GFileCopyFlags; @@ -1710,6 +1613,7 @@ impl FromGlib for FileCopyFlags { impl StaticType for FileCopyFlags { #[inline] + #[doc(alias = "g_file_copy_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_copy_flags_get_type()) } } @@ -1721,7 +1625,7 @@ impl glib::HasParamSpec for FileCopyFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1774,12 +1678,6 @@ bitflags! { } } -impl fmt::Display for FileCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FileCreateFlags { type GlibType = ffi::GFileCreateFlags; @@ -1800,6 +1698,7 @@ impl FromGlib for FileCreateFlags { impl StaticType for FileCreateFlags { #[inline] + #[doc(alias = "g_file_create_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_create_flags_get_type()) } } @@ -1811,7 +1710,7 @@ impl glib::HasParamSpec for FileCreateFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1866,12 +1765,6 @@ bitflags! { } } -impl fmt::Display for FileMeasureFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FileMeasureFlags { type GlibType = ffi::GFileMeasureFlags; @@ -1892,6 +1785,7 @@ impl FromGlib for FileMeasureFlags { impl StaticType for FileMeasureFlags { #[inline] + #[doc(alias = "g_file_measure_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_measure_flags_get_type()) } } @@ -1903,7 +1797,7 @@ impl glib::HasParamSpec for FileMeasureFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1960,12 +1854,6 @@ bitflags! { } } -impl fmt::Display for FileMonitorFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FileMonitorFlags { type GlibType = ffi::GFileMonitorFlags; @@ -1986,6 +1874,7 @@ impl FromGlib for FileMonitorFlags { impl StaticType for FileMonitorFlags { #[inline] + #[doc(alias = "g_file_monitor_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_monitor_flags_get_type()) } } @@ -1997,7 +1886,7 @@ impl glib::HasParamSpec for FileMonitorFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2048,12 +1937,6 @@ bitflags! { } } -impl fmt::Display for FileQueryInfoFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FileQueryInfoFlags { type GlibType = ffi::GFileQueryInfoFlags; @@ -2074,6 +1957,7 @@ impl FromGlib for FileQueryInfoFlags { impl StaticType for FileQueryInfoFlags { #[inline] + #[doc(alias = "g_file_query_info_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_file_query_info_flags_get_type()) } } @@ -2085,7 +1969,7 @@ impl glib::HasParamSpec for FileQueryInfoFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2140,12 +2024,6 @@ bitflags! { } } -impl fmt::Display for IOStreamSpliceFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for IOStreamSpliceFlags { type GlibType = ffi::GIOStreamSpliceFlags; @@ -2166,6 +2044,7 @@ impl FromGlib for IOStreamSpliceFlags { impl StaticType for IOStreamSpliceFlags { #[inline] + #[doc(alias = "g_io_stream_splice_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_io_stream_splice_flags_get_type()) } } @@ -2177,7 +2056,7 @@ impl glib::HasParamSpec for IOStreamSpliceFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2226,12 +2105,6 @@ bitflags! { } } -impl fmt::Display for MountMountFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for MountMountFlags { type GlibType = ffi::GMountMountFlags; @@ -2252,6 +2125,7 @@ impl FromGlib for MountMountFlags { impl StaticType for MountMountFlags { #[inline] + #[doc(alias = "g_mount_mount_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_mount_mount_flags_get_type()) } } @@ -2263,7 +2137,7 @@ impl glib::HasParamSpec for MountMountFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2314,12 +2188,6 @@ bitflags! { } } -impl fmt::Display for MountUnmountFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for MountUnmountFlags { type GlibType = ffi::GMountUnmountFlags; @@ -2340,6 +2208,7 @@ impl FromGlib for MountUnmountFlags { impl StaticType for MountUnmountFlags { #[inline] + #[doc(alias = "g_mount_unmount_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_mount_unmount_flags_get_type()) } } @@ -2351,7 +2220,7 @@ impl glib::HasParamSpec for MountUnmountFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2404,12 +2273,6 @@ bitflags! { } } -impl fmt::Display for OutputStreamSpliceFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for OutputStreamSpliceFlags { type GlibType = ffi::GOutputStreamSpliceFlags; @@ -2430,6 +2293,7 @@ impl FromGlib for OutputStreamSpliceFlags { impl StaticType for OutputStreamSpliceFlags { #[inline] + #[doc(alias = "g_output_stream_splice_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_output_stream_splice_flags_get_type()) } } @@ -2441,7 +2305,7 @@ impl glib::HasParamSpec for OutputStreamSpliceFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2496,14 +2360,6 @@ bitflags! { } } -#[cfg(feature = "v2_60")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] -impl fmt::Display for ResolverNameLookupFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(hidden)] @@ -2530,6 +2386,7 @@ impl FromGlib for ResolverNameLookupFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl StaticType for ResolverNameLookupFlags { #[inline] + #[doc(alias = "g_resolver_name_lookup_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_resolver_name_lookup_flags_get_type()) } } @@ -2543,7 +2400,7 @@ impl glib::HasParamSpec for ResolverNameLookupFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2600,12 +2457,6 @@ bitflags! { } } -impl fmt::Display for ResourceLookupFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for ResourceLookupFlags { type GlibType = ffi::GResourceLookupFlags; @@ -2626,6 +2477,7 @@ impl FromGlib for ResourceLookupFlags { impl StaticType for ResourceLookupFlags { #[inline] + #[doc(alias = "g_resource_lookup_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_resource_lookup_flags_get_type()) } } @@ -2637,7 +2489,7 @@ impl glib::HasParamSpec for ResourceLookupFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2696,12 +2548,6 @@ bitflags! { } } -impl fmt::Display for SettingsBindFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for SettingsBindFlags { type GlibType = ffi::GSettingsBindFlags; @@ -2722,6 +2568,7 @@ impl FromGlib for SettingsBindFlags { impl StaticType for SettingsBindFlags { #[inline] + #[doc(alias = "g_settings_bind_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_settings_bind_flags_get_type()) } } @@ -2733,7 +2580,7 @@ impl glib::HasParamSpec for SettingsBindFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2802,12 +2649,6 @@ bitflags! { } } -impl fmt::Display for SubprocessFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for SubprocessFlags { type GlibType = ffi::GSubprocessFlags; @@ -2828,6 +2669,7 @@ impl FromGlib for SubprocessFlags { impl StaticType for SubprocessFlags { #[inline] + #[doc(alias = "g_subprocess_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_subprocess_flags_get_type()) } } @@ -2839,7 +2681,7 @@ impl glib::HasParamSpec for SubprocessFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2902,12 +2744,6 @@ bitflags! { } } -impl fmt::Display for TlsCertificateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for TlsCertificateFlags { type GlibType = ffi::GTlsCertificateFlags; @@ -2928,6 +2764,7 @@ impl FromGlib for TlsCertificateFlags { impl StaticType for TlsCertificateFlags { #[inline] + #[doc(alias = "g_tls_certificate_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_certificate_flags_get_type()) } } @@ -2939,7 +2776,7 @@ impl glib::HasParamSpec for TlsCertificateFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2988,12 +2825,6 @@ bitflags! { } } -impl fmt::Display for TlsDatabaseVerifyFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for TlsDatabaseVerifyFlags { type GlibType = ffi::GTlsDatabaseVerifyFlags; @@ -3014,6 +2845,7 @@ impl FromGlib for TlsDatabaseVerifyFlags { impl StaticType for TlsDatabaseVerifyFlags { #[inline] + #[doc(alias = "g_tls_database_verify_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_database_verify_flags_get_type()) } } @@ -3025,7 +2857,7 @@ impl glib::HasParamSpec for TlsDatabaseVerifyFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -3086,12 +2918,6 @@ bitflags! { } } -impl fmt::Display for TlsPasswordFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for TlsPasswordFlags { type GlibType = ffi::GTlsPasswordFlags; @@ -3112,6 +2938,7 @@ impl FromGlib for TlsPasswordFlags { impl StaticType for TlsPasswordFlags { #[inline] + #[doc(alias = "g_tls_password_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::g_tls_password_flags_get_type()) } } @@ -3123,7 +2950,7 @@ impl glib::HasParamSpec for TlsPasswordFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gio/src/auto/functions.rs b/gio/src/auto/functions.rs index c5d5266d481d..48195c8d83ba 100644 --- a/gio/src/auto/functions.rs +++ b/gio/src/auto/functions.rs @@ -7,7 +7,7 @@ use crate::{ InputStream, Resource, ResourceLookupFlags, SettingsBackend, }; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, mem, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; #[doc(alias = "g_bus_get")] pub fn bus_get) + 'static>( @@ -34,7 +34,7 @@ pub fn bus_get) + 'static>( res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_bus_get_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -76,7 +76,7 @@ pub fn bus_get_sync( cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_bus_get_sync( bus_type.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -185,7 +185,7 @@ pub fn content_type_guess( ) -> (glib::GString, bool) { let data_size = data.len() as _; unsafe { - let mut result_uncertain = mem::MaybeUninit::uninit(); + let mut result_uncertain = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::g_content_type_guess( filename.as_ref().map(|p| p.as_ref()).to_glib_none().0, data.to_glib_none().0, @@ -255,7 +255,7 @@ pub fn dbus_address_get_for_bus_sync( cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_address_get_for_bus_sync( bus_type.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -296,8 +296,8 @@ pub fn dbus_address_get_stream< res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut out_guid = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut out_guid = std::ptr::null_mut(); let ret = ffi::g_dbus_address_get_stream_finish(res, &mut out_guid, &mut error); let result = if error.is_null() { Ok((from_glib_full(ret), from_glib_full(out_guid))) @@ -345,8 +345,8 @@ pub fn dbus_address_get_stream_sync( cancellable: Option<&impl IsA>, ) -> Result<(IOStream, Option), glib::Error> { unsafe { - let mut out_guid = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut out_guid = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_dbus_address_get_stream_sync( address.to_glib_none().0, &mut out_guid, @@ -434,7 +434,7 @@ pub fn dbus_is_name(string: &str) -> bool { #[doc(alias = "g_dbus_is_supported_address")] pub fn dbus_is_supported_address(string: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_dbus_is_supported_address(string.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -508,7 +508,7 @@ pub fn resources_enumerate_children( lookup_flags: ResourceLookupFlags, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resources_enumerate_children( path.to_glib_none().0, lookup_flags.into_glib(), @@ -528,9 +528,9 @@ pub fn resources_get_info( lookup_flags: ResourceLookupFlags, ) -> Result<(usize, u32), glib::Error> { unsafe { - let mut size = mem::MaybeUninit::uninit(); - let mut flags = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut size = std::mem::MaybeUninit::uninit(); + let mut flags = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_resources_get_info( path.to_glib_none().0, lookup_flags.into_glib(), @@ -553,7 +553,7 @@ pub fn resources_lookup_data( lookup_flags: ResourceLookupFlags, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resources_lookup_data( path.to_glib_none().0, lookup_flags.into_glib(), @@ -573,7 +573,7 @@ pub fn resources_open_stream( lookup_flags: ResourceLookupFlags, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resources_open_stream( path.to_glib_none().0, lookup_flags.into_glib(), diff --git a/gio/src/auto/icon.rs b/gio/src/auto/icon.rs index bb02b43e2b9d..65927bb08ffd 100644 --- a/gio/src/auto/icon.rs +++ b/gio/src/auto/icon.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GIcon")] @@ -26,7 +25,7 @@ impl Icon { #[doc(alias = "new_for_string")] pub fn for_string(str: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_icon_new_for_string(str.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -75,9 +74,3 @@ pub trait IconExt: IsA + sealed::Sealed + 'static { } impl> IconExt for O {} - -impl fmt::Display for Icon { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Icon") - } -} diff --git a/gio/src/auto/inet_address.rs b/gio/src/auto/inet_address.rs index 15748fa0182b..8b57a2c95aad 100644 --- a/gio/src/auto/inet_address.rs +++ b/gio/src/auto/inet_address.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GInetAddress")] @@ -39,9 +39,9 @@ impl InetAddress { } } -impl fmt::Display for InetAddress { +impl std::fmt::Display for InetAddress { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&InetAddressExt::to_str(self)) } } @@ -213,7 +213,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-any\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_any_trampoline:: as *const (), )), Box_::into_raw(f), @@ -242,7 +242,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-link-local\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_link_local_trampoline:: as *const (), )), Box_::into_raw(f), @@ -271,7 +271,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-loopback\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_loopback_trampoline:: as *const (), )), Box_::into_raw(f), @@ -300,7 +300,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-mc-global\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_mc_global_trampoline:: as *const (), )), Box_::into_raw(f), @@ -329,7 +329,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-mc-link-local\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_mc_link_local_trampoline:: as *const (), )), Box_::into_raw(f), @@ -358,7 +358,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-mc-node-local\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_mc_node_local_trampoline:: as *const (), )), Box_::into_raw(f), @@ -387,7 +387,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-mc-org-local\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_mc_org_local_trampoline:: as *const (), )), Box_::into_raw(f), @@ -416,7 +416,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-mc-site-local\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_mc_site_local_trampoline:: as *const (), )), Box_::into_raw(f), @@ -445,7 +445,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-multicast\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_multicast_trampoline:: as *const (), )), Box_::into_raw(f), @@ -474,7 +474,7 @@ pub trait InetAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-site-local\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_site_local_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gio/src/auto/inet_address_mask.rs b/gio/src/auto/inet_address_mask.rs index 5bcba4111e5d..5973b49eaacd 100644 --- a/gio/src/auto/inet_address_mask.rs +++ b/gio/src/auto/inet_address_mask.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GInetAddressMask")] @@ -25,7 +25,7 @@ impl InetAddressMask { #[doc(alias = "g_inet_address_mask_new")] pub fn new(addr: &impl IsA, length: u32) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_inet_address_mask_new(addr.as_ref().to_glib_none().0, length, &mut error); if error.is_null() { @@ -40,7 +40,7 @@ impl InetAddressMask { #[doc(alias = "new_from_string")] pub fn from_string(mask_string: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_inet_address_mask_new_from_string(mask_string.to_glib_none().0, &mut error); if error.is_null() { @@ -52,9 +52,9 @@ impl InetAddressMask { } } -impl fmt::Display for InetAddressMask { +impl std::fmt::Display for InetAddressMask { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&InetAddressMaskExt::to_str(self)) } } @@ -153,7 +153,7 @@ pub trait InetAddressMaskExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -179,7 +179,7 @@ pub trait InetAddressMaskExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::family\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_family_trampoline:: as *const (), )), Box_::into_raw(f), @@ -205,7 +205,7 @@ pub trait InetAddressMaskExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::length\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_length_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gio/src/auto/inet_socket_address.rs b/gio/src/auto/inet_socket_address.rs index cc61da8ffbf7..33c34516adb7 100644 --- a/gio/src/auto/inet_socket_address.rs +++ b/gio/src/auto/inet_socket_address.rs @@ -4,7 +4,6 @@ use crate::{InetAddress, SocketAddress, SocketConnectable}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GInetSocketAddress")] @@ -81,9 +80,3 @@ pub trait InetSocketAddressExt: IsA + sealed::Sealed + 'stati } impl> InetSocketAddressExt for O {} - -impl fmt::Display for InetSocketAddress { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("InetSocketAddress") - } -} diff --git a/gio/src/auto/initable.rs b/gio/src/auto/initable.rs index 0a94c56f5736..1b0d825f2b31 100644 --- a/gio/src/auto/initable.rs +++ b/gio/src/auto/initable.rs @@ -4,7 +4,6 @@ use crate::Cancellable; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GInitable")] @@ -27,7 +26,7 @@ mod sealed { pub trait InitableExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_initable_init")] unsafe fn init(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_initable_init( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -43,9 +42,3 @@ pub trait InitableExt: IsA + sealed::Sealed + 'static { } impl> InitableExt for O {} - -impl fmt::Display for Initable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Initable") - } -} diff --git a/gio/src/auto/input_stream.rs b/gio/src/auto/input_stream.rs index b0adc2413da4..ee79d8617c04 100644 --- a/gio/src/auto/input_stream.rs +++ b/gio/src/auto/input_stream.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, mem, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GInputStream")] @@ -35,7 +35,7 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_input_stream_close")] fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_input_stream_close( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -76,7 +76,7 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_input_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -139,7 +139,7 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_input_stream_read_bytes( self.as_ref().to_glib_none().0, count, @@ -181,7 +181,7 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_input_stream_read_bytes_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -226,7 +226,7 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_input_stream_set_pending")] fn set_pending(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_input_stream_set_pending(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -244,7 +244,7 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_input_stream_skip( self.as_ref().to_glib_none().0, count, @@ -286,7 +286,7 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_input_stream_skip_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) @@ -328,9 +328,3 @@ pub trait InputStreamExt: IsA + sealed::Sealed + 'static { } impl> InputStreamExt for O {} - -impl fmt::Display for InputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("InputStream") - } -} diff --git a/gio/src/auto/io_stream.rs b/gio/src/auto/io_stream.rs index 60d10f40e143..a1abaeda85d7 100644 --- a/gio/src/auto/io_stream.rs +++ b/gio/src/auto/io_stream.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GIOStream")] @@ -39,7 +39,7 @@ pub trait IOStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_io_stream_close")] fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_io_stream_close( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -80,7 +80,7 @@ pub trait IOStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_io_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -151,7 +151,7 @@ pub trait IOStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_io_stream_set_pending")] fn set_pending(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_io_stream_set_pending(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -177,7 +177,7 @@ pub trait IOStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::closed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_closed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,9 +187,3 @@ pub trait IOStreamExt: IsA + sealed::Sealed + 'static { } impl> IOStreamExt for O {} - -impl fmt::Display for IOStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("IOStream") - } -} diff --git a/gio/src/auto/list_model.rs b/gio/src/auto/list_model.rs index adfbc55124be..9e64284cdf04 100644 --- a/gio/src/auto/list_model.rs +++ b/gio/src/auto/list_model.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GListModel")] @@ -95,7 +95,7 @@ pub trait ListModelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"items-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( items_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -105,9 +105,3 @@ pub trait ListModelExt: IsA + sealed::Sealed + 'static { } impl> ListModelExt for O {} - -impl fmt::Display for ListModel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ListModel") - } -} diff --git a/gio/src/auto/list_store.rs b/gio/src/auto/list_store.rs index 446767512e76..d76274bfcfa9 100644 --- a/gio/src/auto/list_store.rs +++ b/gio/src/auto/list_store.rs @@ -4,10 +4,6 @@ use crate::ListModel; use glib::{prelude::*, translate::*}; -use std::fmt; -#[cfg(feature = "v2_64")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] -use std::mem; glib::wrapper! { #[doc(alias = "GListStore")] @@ -39,7 +35,7 @@ impl ListStore { #[doc(alias = "g_list_store_find")] pub fn find(&self, item: &impl IsA) -> Option { unsafe { - let mut position = mem::MaybeUninit::uninit(); + let mut position = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::g_list_store_find( self.to_glib_none().0, item.as_ref().to_glib_none().0, @@ -108,9 +104,3 @@ impl ListStoreBuilder { self.builder.build() } } - -impl fmt::Display for ListStore { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ListStore") - } -} diff --git a/gio/src/auto/loadable_icon.rs b/gio/src/auto/loadable_icon.rs index d2a57be4fa1f..c3928b7ff1ee 100644 --- a/gio/src/auto/loadable_icon.rs +++ b/gio/src/auto/loadable_icon.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, Icon, InputStream}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GLoadableIcon")] @@ -32,8 +32,8 @@ pub trait LoadableIconExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(InputStream, glib::GString), glib::Error> { unsafe { - let mut type_ = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut type_ = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_loadable_icon_load( self.as_ref().to_glib_none().0, size, @@ -75,8 +75,8 @@ pub trait LoadableIconExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut type_ = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut type_ = std::ptr::null_mut(); let ret = ffi::g_loadable_icon_load_finish( _source_object as *mut _, res, @@ -126,9 +126,3 @@ pub trait LoadableIconExt: IsA + sealed::Sealed + 'static { } impl> LoadableIconExt for O {} - -impl fmt::Display for LoadableIcon { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("LoadableIcon") - } -} diff --git a/gio/src/auto/memory_input_stream.rs b/gio/src/auto/memory_input_stream.rs index 5f4448e7e530..5ba3837f1ffa 100644 --- a/gio/src/auto/memory_input_stream.rs +++ b/gio/src/auto/memory_input_stream.rs @@ -4,7 +4,6 @@ use crate::{InputStream, PollableInputStream, Seekable}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GMemoryInputStream")] @@ -59,9 +58,3 @@ pub trait MemoryInputStreamExt: IsA + sealed::Sealed + 'stati } impl> MemoryInputStreamExt for O {} - -impl fmt::Display for MemoryInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MemoryInputStream") - } -} diff --git a/gio/src/auto/memory_monitor.rs b/gio/src/auto/memory_monitor.rs index 075489f1fa31..c32e7bc3cd01 100644 --- a/gio/src/auto/memory_monitor.rs +++ b/gio/src/auto/memory_monitor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GMemoryMonitor")] @@ -60,7 +60,7 @@ pub trait MemoryMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"low-memory-warning\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( low_memory_warning_trampoline:: as *const (), )), Box_::into_raw(f), @@ -70,9 +70,3 @@ pub trait MemoryMonitorExt: IsA + sealed::Sealed + 'static { } impl> MemoryMonitorExt for O {} - -impl fmt::Display for MemoryMonitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MemoryMonitor") - } -} diff --git a/gio/src/auto/memory_output_stream.rs b/gio/src/auto/memory_output_stream.rs index b70b55776c75..266c4eaf9573 100644 --- a/gio/src/auto/memory_output_stream.rs +++ b/gio/src/auto/memory_output_stream.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GMemoryOutputStream")] @@ -69,7 +69,7 @@ pub trait MemoryOutputStreamExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::data-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_data_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -79,9 +79,3 @@ pub trait MemoryOutputStreamExt: IsA + sealed::Sealed + 'sta } impl> MemoryOutputStreamExt for O {} - -impl fmt::Display for MemoryOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MemoryOutputStream") - } -} diff --git a/gio/src/auto/menu.rs b/gio/src/auto/menu.rs index 117210e97ba8..d1886831cf9c 100644 --- a/gio/src/auto/menu.rs +++ b/gio/src/auto/menu.rs @@ -4,7 +4,6 @@ use crate::{MenuItem, MenuModel}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GMenu")] @@ -181,9 +180,3 @@ impl Default for Menu { Self::new() } } - -impl fmt::Display for Menu { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Menu") - } -} diff --git a/gio/src/auto/menu_attribute_iter.rs b/gio/src/auto/menu_attribute_iter.rs index 38d426d3666f..7d3a16198c48 100644 --- a/gio/src/auto/menu_attribute_iter.rs +++ b/gio/src/auto/menu_attribute_iter.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GMenuAttributeIter")] @@ -28,8 +27,8 @@ pub trait MenuAttributeIterExt: IsA + sealed::Sealed + 'stati #[doc(alias = "get_next")] fn next(&self) -> Option<(glib::GString, glib::Variant)> { unsafe { - let mut out_name = ptr::null(); - let mut value = ptr::null_mut(); + let mut out_name = std::ptr::null(); + let mut value = std::ptr::null_mut(); let ret = from_glib(ffi::g_menu_attribute_iter_get_next( self.as_ref().to_glib_none().0, &mut out_name, @@ -45,9 +44,3 @@ pub trait MenuAttributeIterExt: IsA + sealed::Sealed + 'stati } impl> MenuAttributeIterExt for O {} - -impl fmt::Display for MenuAttributeIter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MenuAttributeIter") - } -} diff --git a/gio/src/auto/menu_item.rs b/gio/src/auto/menu_item.rs index 8f3ca4cd1762..7923f75ad11d 100644 --- a/gio/src/auto/menu_item.rs +++ b/gio/src/auto/menu_item.rs @@ -4,7 +4,6 @@ use crate::{Icon, MenuModel}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GMenuItem")] @@ -181,9 +180,3 @@ impl MenuItem { } } } - -impl fmt::Display for MenuItem { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MenuItem") - } -} diff --git a/gio/src/auto/menu_link_iter.rs b/gio/src/auto/menu_link_iter.rs index 3b1f4560ee37..ced9b328fa56 100644 --- a/gio/src/auto/menu_link_iter.rs +++ b/gio/src/auto/menu_link_iter.rs @@ -4,7 +4,6 @@ use crate::MenuModel; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GMenuLinkIter")] @@ -29,8 +28,8 @@ pub trait MenuLinkIterExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_next")] fn next(&self) -> Option<(glib::GString, MenuModel)> { unsafe { - let mut out_link = ptr::null(); - let mut value = ptr::null_mut(); + let mut out_link = std::ptr::null(); + let mut value = std::ptr::null_mut(); let ret = from_glib(ffi::g_menu_link_iter_get_next( self.as_ref().to_glib_none().0, &mut out_link, @@ -46,9 +45,3 @@ pub trait MenuLinkIterExt: IsA + sealed::Sealed + 'static { } impl> MenuLinkIterExt for O {} - -impl fmt::Display for MenuLinkIter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MenuLinkIter") - } -} diff --git a/gio/src/auto/menu_model.rs b/gio/src/auto/menu_model.rs index d42c183fd6e7..3f9f49393168 100644 --- a/gio/src/auto/menu_model.rs +++ b/gio/src/auto/menu_model.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GMenuModel")] @@ -137,7 +137,7 @@ pub trait MenuModelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"items-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( items_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -147,9 +147,3 @@ pub trait MenuModelExt: IsA + sealed::Sealed + 'static { } impl> MenuModelExt for O {} - -impl fmt::Display for MenuModel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MenuModel") - } -} diff --git a/gio/src/auto/mod.rs b/gio/src/auto/mod.rs index 72dc8022510f..909490e7abcb 100644 --- a/gio/src/auto/mod.rs +++ b/gio/src/auto/mod.rs @@ -573,7 +573,7 @@ pub use self::flags::TlsCertificateFlags; pub use self::flags::TlsDatabaseVerifyFlags; pub use self::flags::TlsPasswordFlags; -pub mod functions; +pub(crate) mod functions; mod constants; #[cfg(feature = "v2_72")] @@ -748,8 +748,7 @@ pub use self::constants::VOLUME_IDENTIFIER_KIND_UNIX_DEVICE; pub use self::constants::VOLUME_IDENTIFIER_KIND_UUID; pub use self::constants::VOLUME_MONITOR_EXTENSION_POINT_NAME; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::action::ActionExt; pub use super::action_group::ActionGroupExt; pub use super::action_map::ActionMapExt; @@ -869,8 +868,7 @@ pub mod traits { pub use super::volume::VolumeExt; pub use super::volume_monitor::VolumeMonitorExt; } -#[doc(hidden)] -pub mod builders { +pub(crate) mod builders { pub use super::application::ApplicationBuilder; pub use super::buffered_input_stream::BufferedInputStreamBuilder; pub use super::buffered_output_stream::BufferedOutputStreamBuilder; diff --git a/gio/src/auto/mount.rs b/gio/src/auto/mount.rs index 5cd5e491e2eb..b33d377493e3 100644 --- a/gio/src/auto/mount.rs +++ b/gio/src/auto/mount.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GMount")] @@ -69,7 +69,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_mount_eject_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -204,7 +204,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_mount_guess_content_type_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -252,7 +252,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_mount_guess_content_type_sync( self.as_ref().to_glib_none().0, force_rescan.into_glib(), @@ -297,7 +297,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_mount_remount_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -377,7 +377,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_mount_unmount_with_operation_finish( _source_object as *mut _, res, @@ -448,7 +448,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -470,7 +470,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-unmount\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_unmount_trampoline:: as *const (), )), Box_::into_raw(f), @@ -492,7 +492,7 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"unmounted\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( unmounted_trampoline:: as *const (), )), Box_::into_raw(f), @@ -502,9 +502,3 @@ pub trait MountExt: IsA + sealed::Sealed + 'static { } impl> MountExt for O {} - -impl fmt::Display for Mount { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Mount") - } -} diff --git a/gio/src/auto/mount_operation.rs b/gio/src/auto/mount_operation.rs index 67d3b25524a9..b77921401e4a 100644 --- a/gio/src/auto/mount_operation.rs +++ b/gio/src/auto/mount_operation.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GMountOperation")] @@ -239,7 +239,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"aborted\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( aborted_trampoline:: as *const (), )), Box_::into_raw(f), @@ -277,7 +277,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"ask-password\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( ask_password_trampoline:: as *const (), )), Box_::into_raw(f), @@ -311,7 +311,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"reply\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( reply_trampoline:: as *const (), )), Box_::into_raw(f), @@ -353,7 +353,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"show-unmount-progress\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( show_unmount_progress_trampoline:: as *const (), )), Box_::into_raw(f), @@ -379,7 +379,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::anonymous\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_anonymous_trampoline:: as *const (), )), Box_::into_raw(f), @@ -405,7 +405,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::choice\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_choice_trampoline:: as *const (), )), Box_::into_raw(f), @@ -431,7 +431,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::domain\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_domain_trampoline:: as *const (), )), Box_::into_raw(f), @@ -462,7 +462,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-tcrypt-hidden-volume\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_tcrypt_hidden_volume_trampoline:: as *const (), )), Box_::into_raw(f), @@ -493,7 +493,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-tcrypt-system-volume\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_tcrypt_system_volume_trampoline:: as *const (), )), Box_::into_raw(f), @@ -519,7 +519,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::password\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_password_trampoline:: as *const (), )), Box_::into_raw(f), @@ -545,7 +545,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::password-save\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_password_save_trampoline:: as *const (), )), Box_::into_raw(f), @@ -570,7 +570,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::pim\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_pim_trampoline:: as *const (), )), Box_::into_raw(f), @@ -596,7 +596,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::username\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_username_trampoline:: as *const (), )), Box_::into_raw(f), @@ -606,9 +606,3 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { } impl> MountOperationExt for O {} - -impl fmt::Display for MountOperation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MountOperation") - } -} diff --git a/gio/src/auto/network_address.rs b/gio/src/auto/network_address.rs index a7790fcf40ed..f805abeeb3f7 100644 --- a/gio/src/auto/network_address.rs +++ b/gio/src/auto/network_address.rs @@ -4,7 +4,6 @@ use crate::SocketConnectable; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GNetworkAddress")] @@ -31,7 +30,7 @@ impl NetworkAddress { #[doc(alias = "g_network_address_parse")] pub fn parse(host_and_port: &str, default_port: u16) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_network_address_parse( host_and_port.to_glib_none().0, default_port, @@ -48,7 +47,7 @@ impl NetworkAddress { #[doc(alias = "g_network_address_parse_uri")] pub fn parse_uri(uri: &str, default_port: u16) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_network_address_parse_uri(uri.to_glib_none().0, default_port, &mut error); if error.is_null() { @@ -97,9 +96,3 @@ pub trait NetworkAddressExt: IsA + sealed::Sealed + 'static { } impl> NetworkAddressExt for O {} - -impl fmt::Display for NetworkAddress { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("NetworkAddress") - } -} diff --git a/gio/src/auto/network_monitor.rs b/gio/src/auto/network_monitor.rs index 131ddac179f7..b569531db007 100644 --- a/gio/src/auto/network_monitor.rs +++ b/gio/src/auto/network_monitor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GNetworkMonitor")] @@ -43,7 +43,7 @@ pub trait NetworkMonitorExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_network_monitor_can_reach( self.as_ref().to_glib_none().0, connectable.as_ref().to_glib_none().0, @@ -85,7 +85,7 @@ pub trait NetworkMonitorExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_network_monitor_can_reach_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -176,7 +176,7 @@ pub trait NetworkMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"network-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( network_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -202,7 +202,7 @@ pub trait NetworkMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::connectivity\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_connectivity_trampoline:: as *const (), )), Box_::into_raw(f), @@ -228,7 +228,7 @@ pub trait NetworkMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::network-available\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_network_available_trampoline:: as *const (), )), Box_::into_raw(f), @@ -254,7 +254,7 @@ pub trait NetworkMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::network-metered\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_network_metered_trampoline:: as *const (), )), Box_::into_raw(f), @@ -264,9 +264,3 @@ pub trait NetworkMonitorExt: IsA + sealed::Sealed + 'static { } impl> NetworkMonitorExt for O {} - -impl fmt::Display for NetworkMonitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("NetworkMonitor") - } -} diff --git a/gio/src/auto/network_service.rs b/gio/src/auto/network_service.rs index bb2d1dd056be..e693b695996c 100644 --- a/gio/src/auto/network_service.rs +++ b/gio/src/auto/network_service.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GNetworkService")] @@ -108,7 +108,7 @@ pub trait NetworkServiceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::scheme\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_scheme_trampoline:: as *const (), )), Box_::into_raw(f), @@ -118,9 +118,3 @@ pub trait NetworkServiceExt: IsA + sealed::Sealed + 'static { } impl> NetworkServiceExt for O {} - -impl fmt::Display for NetworkService { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("NetworkService") - } -} diff --git a/gio/src/auto/notification.rs b/gio/src/auto/notification.rs index de26b3274b27..077f20f2b726 100644 --- a/gio/src/auto/notification.rs +++ b/gio/src/auto/notification.rs @@ -4,7 +4,6 @@ use crate::{Icon, NotificationPriority}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GNotification")] @@ -121,9 +120,3 @@ impl Notification { } } } - -impl fmt::Display for Notification { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Notification") - } -} diff --git a/gio/src/auto/output_stream.rs b/gio/src/auto/output_stream.rs index e013724df1b0..9d3d3bee8919 100644 --- a/gio/src/auto/output_stream.rs +++ b/gio/src/auto/output_stream.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, InputStream, OutputStreamSpliceFlags}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, mem, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GOutputStream")] @@ -35,7 +35,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_output_stream_close")] fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_output_stream_close( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -76,7 +76,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_output_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -117,7 +117,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_output_stream_flush")] fn flush(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_output_stream_flush( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -158,7 +158,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_output_stream_flush_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -231,7 +231,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_output_stream_set_pending")] fn set_pending(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_output_stream_set_pending(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); @@ -251,7 +251,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_output_stream_splice( self.as_ref().to_glib_none().0, source.as_ref().to_glib_none().0, @@ -295,7 +295,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_output_stream_splice_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) @@ -351,7 +351,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { ) -> Result { let count = buffer.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_output_stream_write( self.as_ref().to_glib_none().0, buffer.to_glib_none().0, @@ -374,7 +374,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_output_stream_write_bytes( self.as_ref().to_glib_none().0, bytes.to_glib_none().0, @@ -416,7 +416,7 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_output_stream_write_bytes_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -460,9 +460,3 @@ pub trait OutputStreamExt: IsA + sealed::Sealed + 'static { } impl> OutputStreamExt for O {} - -impl fmt::Display for OutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("OutputStream") - } -} diff --git a/gio/src/auto/permission.rs b/gio/src/auto/permission.rs index e15484e44a4d..d97c0c148bbd 100644 --- a/gio/src/auto/permission.rs +++ b/gio/src/auto/permission.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GPermission")] @@ -32,7 +32,7 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_permission_acquire")] fn acquire(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_permission_acquire( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -72,7 +72,7 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_permission_acquire_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -153,7 +153,7 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_permission_release")] fn release(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_permission_release( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -193,7 +193,7 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_permission_release_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -244,7 +244,7 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::allowed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_allowed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -270,7 +270,7 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::can-acquire\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_can_acquire_trampoline:: as *const (), )), Box_::into_raw(f), @@ -296,7 +296,7 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::can-release\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_can_release_trampoline:: as *const (), )), Box_::into_raw(f), @@ -306,9 +306,3 @@ pub trait PermissionExt: IsA + sealed::Sealed + 'static { } impl> PermissionExt for O {} - -impl fmt::Display for Permission { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Permission") - } -} diff --git a/gio/src/auto/pollable_input_stream.rs b/gio/src/auto/pollable_input_stream.rs index 4a32c9d4f874..efd744d6cbcd 100644 --- a/gio/src/auto/pollable_input_stream.rs +++ b/gio/src/auto/pollable_input_stream.rs @@ -4,7 +4,6 @@ use crate::InputStream; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GPollableInputStream")] @@ -45,9 +44,3 @@ pub trait PollableInputStreamExt: IsA + sealed::Sealed + 's } impl> PollableInputStreamExt for O {} - -impl fmt::Display for PollableInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PollableInputStream") - } -} diff --git a/gio/src/auto/pollable_output_stream.rs b/gio/src/auto/pollable_output_stream.rs index 07ea9d7b9e68..15bda4d5a920 100644 --- a/gio/src/auto/pollable_output_stream.rs +++ b/gio/src/auto/pollable_output_stream.rs @@ -4,7 +4,6 @@ use crate::{Cancellable, OutputStream}; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GPollableOutputStream")] @@ -51,7 +50,7 @@ pub trait PollableOutputStreamExt: IsA + sealed::Sealed + ) -> Result { let count = buffer.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_pollable_output_stream_write_nonblocking( self.as_ref().to_glib_none().0, buffer.to_glib_none().0, @@ -69,9 +68,3 @@ pub trait PollableOutputStreamExt: IsA + sealed::Sealed + } impl> PollableOutputStreamExt for O {} - -impl fmt::Display for PollableOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PollableOutputStream") - } -} diff --git a/gio/src/auto/power_profile_monitor.rs b/gio/src/auto/power_profile_monitor.rs index 69d95d181ed4..0370d2f993cf 100644 --- a/gio/src/auto/power_profile_monitor.rs +++ b/gio/src/auto/power_profile_monitor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GPowerProfileMonitor")] @@ -65,7 +65,7 @@ pub trait PowerProfileMonitorExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::power-saver-enabled\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_power_saver_enabled_trampoline:: as *const (), )), Box_::into_raw(f), @@ -75,9 +75,3 @@ pub trait PowerProfileMonitorExt: IsA + sealed::Sealed + 's } impl> PowerProfileMonitorExt for O {} - -impl fmt::Display for PowerProfileMonitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PowerProfileMonitor") - } -} diff --git a/gio/src/auto/property_action.rs b/gio/src/auto/property_action.rs index 62c0cf3e6432..e777c78fa2ce 100644 --- a/gio/src/auto/property_action.rs +++ b/gio/src/auto/property_action.rs @@ -4,7 +4,6 @@ use crate::Action; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GPropertyAction")] @@ -32,9 +31,3 @@ impl PropertyAction { ObjectExt::property(self, "invert-boolean") } } - -impl fmt::Display for PropertyAction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PropertyAction") - } -} diff --git a/gio/src/auto/proxy.rs b/gio/src/auto/proxy.rs index ac9eda0ed782..799f47735668 100644 --- a/gio/src/auto/proxy.rs +++ b/gio/src/auto/proxy.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, IOStream, ProxyAddress}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GProxy")] @@ -43,7 +43,7 @@ pub trait ProxyExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_proxy_connect( self.as_ref().to_glib_none().0, connection.as_ref().to_glib_none().0, @@ -86,7 +86,7 @@ pub trait ProxyExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_proxy_connect_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -139,9 +139,3 @@ pub trait ProxyExt: IsA + sealed::Sealed + 'static { } impl> ProxyExt for O {} - -impl fmt::Display for Proxy { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Proxy") - } -} diff --git a/gio/src/auto/proxy_address.rs b/gio/src/auto/proxy_address.rs index 39a0080afc92..12687cf849d9 100644 --- a/gio/src/auto/proxy_address.rs +++ b/gio/src/auto/proxy_address.rs @@ -4,7 +4,6 @@ use crate::{InetAddress, InetSocketAddress, SocketAddress, SocketConnectable}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GProxyAddress")] @@ -116,9 +115,3 @@ pub trait ProxyAddressExt: IsA + sealed::Sealed + 'static { } impl> ProxyAddressExt for O {} - -impl fmt::Display for ProxyAddress { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ProxyAddress") - } -} diff --git a/gio/src/auto/proxy_resolver.rs b/gio/src/auto/proxy_resolver.rs index 93c192bd51ee..47ecce1c58b1 100644 --- a/gio/src/auto/proxy_resolver.rs +++ b/gio/src/auto/proxy_resolver.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GProxyResolver")] @@ -48,7 +48,7 @@ pub trait ProxyResolverExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_proxy_resolver_lookup( self.as_ref().to_glib_none().0, uri.to_glib_none().0, @@ -89,7 +89,7 @@ pub trait ProxyResolverExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_proxy_resolver_lookup_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -133,9 +133,3 @@ pub trait ProxyResolverExt: IsA + sealed::Sealed + 'static { } impl> ProxyResolverExt for O {} - -impl fmt::Display for ProxyResolver { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ProxyResolver") - } -} diff --git a/gio/src/auto/remote_action_group.rs b/gio/src/auto/remote_action_group.rs index 842182c31c6e..1a2bd9069af2 100644 --- a/gio/src/auto/remote_action_group.rs +++ b/gio/src/auto/remote_action_group.rs @@ -4,7 +4,6 @@ use crate::ActionGroup; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GRemoteActionGroup")] @@ -61,9 +60,3 @@ pub trait RemoteActionGroupExt: IsA + sealed::Sealed + 'stati } impl> RemoteActionGroupExt for O {} - -impl fmt::Display for RemoteActionGroup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RemoteActionGroup") - } -} diff --git a/gio/src/auto/resolver.rs b/gio/src/auto/resolver.rs index 3cc731de3106..67840652d6e7 100644 --- a/gio/src/auto/resolver.rs +++ b/gio/src/auto/resolver.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GResolver")] @@ -64,7 +64,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_address( self.as_ref().to_glib_none().0, address.as_ref().to_glib_none().0, @@ -105,7 +105,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_address_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -153,7 +153,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_name( self.as_ref().to_glib_none().0, hostname.to_glib_none().0, @@ -194,7 +194,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_name_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -245,7 +245,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_name_with_flags( self.as_ref().to_glib_none().0, hostname.to_glib_none().0, @@ -292,7 +292,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_name_with_flags_finish( _source_object as *mut _, res, @@ -353,7 +353,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_records( self.as_ref().to_glib_none().0, rrname.to_glib_none().0, @@ -396,7 +396,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_records_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -449,7 +449,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_service( self.as_ref().to_glib_none().0, service.to_glib_none().0, @@ -494,7 +494,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resolver_lookup_service_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -577,7 +577,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"reload\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( reload_trampoline:: as *const (), )), Box_::into_raw(f), @@ -602,7 +602,7 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -612,9 +612,3 @@ pub trait ResolverExt: IsA + sealed::Sealed + 'static { } impl> ResolverExt for O {} - -impl fmt::Display for Resolver { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Resolver") - } -} diff --git a/gio/src/auto/resource.rs b/gio/src/auto/resource.rs index 8b7db0d23adc..2d80d7bbf2fd 100644 --- a/gio/src/auto/resource.rs +++ b/gio/src/auto/resource.rs @@ -4,7 +4,6 @@ use crate::{InputStream, ResourceLookupFlags}; use glib::translate::*; -use std::{mem, ptr}; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -25,7 +24,7 @@ impl Resource { lookup_flags: ResourceLookupFlags, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resource_enumerate_children( self.to_glib_none().0, path.to_glib_none().0, @@ -48,9 +47,9 @@ impl Resource { lookup_flags: ResourceLookupFlags, ) -> Result<(usize, u32), glib::Error> { unsafe { - let mut size = mem::MaybeUninit::uninit(); - let mut flags = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut size = std::mem::MaybeUninit::uninit(); + let mut flags = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_resource_get_info( self.to_glib_none().0, path.to_glib_none().0, @@ -75,7 +74,7 @@ impl Resource { lookup_flags: ResourceLookupFlags, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resource_lookup_data( self.to_glib_none().0, path.to_glib_none().0, @@ -97,7 +96,7 @@ impl Resource { lookup_flags: ResourceLookupFlags, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resource_open_stream( self.to_glib_none().0, path.to_glib_none().0, @@ -115,7 +114,7 @@ impl Resource { #[doc(alias = "g_resource_load")] pub fn load(filename: impl AsRef) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_resource_load(filename.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) diff --git a/gio/src/auto/seekable.rs b/gio/src/auto/seekable.rs index 9fa996502590..f1703a7f98e2 100644 --- a/gio/src/auto/seekable.rs +++ b/gio/src/auto/seekable.rs @@ -4,7 +4,6 @@ use crate::Cancellable; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GSeekable")] @@ -43,7 +42,7 @@ pub trait SeekableExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_seekable_seek( self.as_ref().to_glib_none().0, offset, @@ -72,7 +71,7 @@ pub trait SeekableExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_seekable_truncate( self.as_ref().to_glib_none().0, offset, @@ -90,9 +89,3 @@ pub trait SeekableExt: IsA + sealed::Sealed + 'static { } impl> SeekableExt for O {} - -impl fmt::Display for Seekable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Seekable") - } -} diff --git a/gio/src/auto/settings.rs b/gio/src/auto/settings.rs index 9666819ef93a..5e1174fb441a 100644 --- a/gio/src/auto/settings.rs +++ b/gio/src/auto/settings.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GSettings")] @@ -506,7 +506,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -535,7 +535,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"writable-change-event\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( writable_change_event_trampoline:: as *const (), )), Box_::into_raw(f), @@ -572,7 +572,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( writable_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -598,7 +598,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::delay-apply\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_delay_apply_trampoline:: as *const (), )), Box_::into_raw(f), @@ -624,7 +624,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::has-unapplied\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_has_unapplied_trampoline:: as *const (), )), Box_::into_raw(f), @@ -634,9 +634,3 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { } impl> SettingsExt for O {} - -impl fmt::Display for Settings { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Settings") - } -} diff --git a/gio/src/auto/settings_backend.rs b/gio/src/auto/settings_backend.rs index d031708d4216..52d97e5a76b6 100644 --- a/gio/src/auto/settings_backend.rs +++ b/gio/src/auto/settings_backend.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GSettingsBackend")] @@ -78,9 +77,3 @@ pub trait SettingsBackendExt: IsA + sealed::Sealed + 'static { } impl> SettingsBackendExt for O {} - -impl fmt::Display for SettingsBackend { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SettingsBackend") - } -} diff --git a/gio/src/auto/settings_schema_key.rs b/gio/src/auto/settings_schema_key.rs index 179c401649ca..a872c1e0b3d7 100644 --- a/gio/src/auto/settings_schema_key.rs +++ b/gio/src/auto/settings_schema_key.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -80,9 +79,9 @@ impl SettingsSchemaKey { } } -impl fmt::Display for SettingsSchemaKey { +impl std::fmt::Display for SettingsSchemaKey { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } diff --git a/gio/src/auto/settings_schema_source.rs b/gio/src/auto/settings_schema_source.rs index 4e4b33d12751..74b11846e500 100644 --- a/gio/src/auto/settings_schema_source.rs +++ b/gio/src/auto/settings_schema_source.rs @@ -4,7 +4,6 @@ use crate::SettingsSchema; use glib::translate::*; -use std::ptr; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -26,7 +25,7 @@ impl SettingsSchemaSource { trusted: bool, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_settings_schema_source_new_from_directory( directory.as_ref().to_glib_none().0, parent.to_glib_none().0, @@ -44,8 +43,8 @@ impl SettingsSchemaSource { #[doc(alias = "g_settings_schema_source_list_schemas")] pub fn list_schemas(&self, recursive: bool) -> (Vec, Vec) { unsafe { - let mut non_relocatable = ptr::null_mut(); - let mut relocatable = ptr::null_mut(); + let mut non_relocatable = std::ptr::null_mut(); + let mut relocatable = std::ptr::null_mut(); ffi::g_settings_schema_source_list_schemas( self.to_glib_none().0, recursive.into_glib(), diff --git a/gio/src/auto/simple_action.rs b/gio/src/auto/simple_action.rs index 5521a5cab70b..db69e53f08bb 100644 --- a/gio/src/auto/simple_action.rs +++ b/gio/src/auto/simple_action.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GSimpleAction")] @@ -91,7 +91,7 @@ impl SimpleAction { connect_raw( self.as_ptr() as *mut _, b"activate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( activate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -124,7 +124,7 @@ impl SimpleAction { connect_raw( self.as_ptr() as *mut _, b"change-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( change_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -132,9 +132,3 @@ impl SimpleAction { } } } - -impl fmt::Display for SimpleAction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SimpleAction") - } -} diff --git a/gio/src/auto/simple_action_group.rs b/gio/src/auto/simple_action_group.rs index f5483fe022af..c175a2034791 100644 --- a/gio/src/auto/simple_action_group.rs +++ b/gio/src/auto/simple_action_group.rs @@ -4,7 +4,6 @@ use crate::{ActionGroup, ActionMap}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GSimpleActionGroup")] @@ -29,9 +28,3 @@ impl Default for SimpleActionGroup { Self::new() } } - -impl fmt::Display for SimpleActionGroup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SimpleActionGroup") - } -} diff --git a/gio/src/auto/simple_io_stream.rs b/gio/src/auto/simple_io_stream.rs index 9dba74b029ce..fbb70f004232 100644 --- a/gio/src/auto/simple_io_stream.rs +++ b/gio/src/auto/simple_io_stream.rs @@ -4,7 +4,6 @@ use crate::{IOStream, InputStream, OutputStream}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GSimpleIOStream")] @@ -30,9 +29,3 @@ impl SimpleIOStream { } } } - -impl fmt::Display for SimpleIOStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SimpleIOStream") - } -} diff --git a/gio/src/auto/simple_permission.rs b/gio/src/auto/simple_permission.rs index 4997a45d1cb2..9fb973173610 100644 --- a/gio/src/auto/simple_permission.rs +++ b/gio/src/auto/simple_permission.rs @@ -4,7 +4,6 @@ use crate::Permission; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GSimplePermission")] @@ -24,9 +23,3 @@ impl SimplePermission { } } } - -impl fmt::Display for SimplePermission { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SimplePermission") - } -} diff --git a/gio/src/auto/simple_proxy_resolver.rs b/gio/src/auto/simple_proxy_resolver.rs index d7b68f5a3b61..9d15cf85a548 100644 --- a/gio/src/auto/simple_proxy_resolver.rs +++ b/gio/src/auto/simple_proxy_resolver.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GSimpleProxyResolver")] @@ -78,7 +78,7 @@ pub trait SimpleProxyResolverExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::default-proxy\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_default_proxy_trampoline:: as *const (), )), Box_::into_raw(f), @@ -104,7 +104,7 @@ pub trait SimpleProxyResolverExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::ignore-hosts\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ignore_hosts_trampoline:: as *const (), )), Box_::into_raw(f), @@ -114,9 +114,3 @@ pub trait SimpleProxyResolverExt: IsA + sealed::Sealed + 's } impl> SimpleProxyResolverExt for O {} - -impl fmt::Display for SimpleProxyResolver { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SimpleProxyResolver") - } -} diff --git a/gio/src/auto/socket.rs b/gio/src/auto/socket.rs index f4f75751c1f2..9223eb480bba 100644 --- a/gio/src/auto/socket.rs +++ b/gio/src/auto/socket.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GSocket")] @@ -32,7 +32,7 @@ impl Socket { protocol: SocketProtocol, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_new( family.into_glib(), type_.into_glib(), @@ -57,7 +57,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_socket_accept")] fn accept(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_accept( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -78,7 +78,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { allow_reuse: bool, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_bind( self.as_ref().to_glib_none().0, address.as_ref().to_glib_none().0, @@ -97,7 +97,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_socket_check_connect_result")] fn check_connect_result(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_check_connect_result(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); @@ -112,7 +112,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_socket_close")] fn close(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_close(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -141,7 +141,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_condition_timed_wait( self.as_ref().to_glib_none().0, condition.into_glib(), @@ -165,7 +165,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_condition_wait( self.as_ref().to_glib_none().0, condition.into_glib(), @@ -188,7 +188,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_connect( self.as_ref().to_glib_none().0, address.as_ref().to_glib_none().0, @@ -235,7 +235,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_credentials")] fn credentials(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_get_credentials(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -267,7 +267,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_local_address")] fn local_address(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_get_local_address(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -297,8 +297,8 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_option")] fn option(&self, level: i32, optname: i32) -> Result { unsafe { - let mut value = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut value = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_get_option( self.as_ref().to_glib_none().0, level, @@ -325,7 +325,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_remote_address")] fn remote_address(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_get_remote_address(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -375,7 +375,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { iface: Option<&str>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_join_multicast_group( self.as_ref().to_glib_none().0, group.as_ref().to_glib_none().0, @@ -400,7 +400,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { iface: Option<&str>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_join_multicast_group_ssm( self.as_ref().to_glib_none().0, group.as_ref().to_glib_none().0, @@ -425,7 +425,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { iface: Option<&str>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_leave_multicast_group( self.as_ref().to_glib_none().0, group.as_ref().to_glib_none().0, @@ -450,7 +450,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { iface: Option<&str>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_leave_multicast_group_ssm( self.as_ref().to_glib_none().0, group.as_ref().to_glib_none().0, @@ -470,7 +470,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_socket_listen")] fn listen(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_listen(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -529,7 +529,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_socket_set_option")] fn set_option(&self, level: i32, optname: i32, value: i32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_set_option( self.as_ref().to_glib_none().0, level, @@ -563,7 +563,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_socket_shutdown")] fn shutdown(&self, shutdown_read: bool, shutdown_write: bool) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_shutdown( self.as_ref().to_glib_none().0, shutdown_read.into_glib(), @@ -604,7 +604,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::blocking\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_blocking_trampoline:: as *const (), )), Box_::into_raw(f), @@ -627,7 +627,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::broadcast\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_broadcast_trampoline:: as *const (), )), Box_::into_raw(f), @@ -650,7 +650,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::keepalive\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_keepalive_trampoline:: as *const (), )), Box_::into_raw(f), @@ -676,7 +676,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::listen-backlog\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_listen_backlog_trampoline:: as *const (), )), Box_::into_raw(f), @@ -702,7 +702,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::local-address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_local_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -728,7 +728,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::multicast-loopback\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_multicast_loopback_trampoline:: as *const (), )), Box_::into_raw(f), @@ -754,7 +754,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::multicast-ttl\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_multicast_ttl_trampoline:: as *const (), )), Box_::into_raw(f), @@ -780,7 +780,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::remote-address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_remote_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -803,7 +803,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -826,7 +826,7 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ttl\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ttl_trampoline:: as *const (), )), Box_::into_raw(f), @@ -836,9 +836,3 @@ pub trait SocketExt: IsA + sealed::Sealed + 'static { } impl> SocketExt for O {} - -impl fmt::Display for Socket { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Socket") - } -} diff --git a/gio/src/auto/socket_address.rs b/gio/src/auto/socket_address.rs index 063278a1cbeb..3ab755ff41a3 100644 --- a/gio/src/auto/socket_address.rs +++ b/gio/src/auto/socket_address.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GSocketAddress")] @@ -77,7 +77,7 @@ pub trait SocketAddressExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::family\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_family_trampoline:: as *const (), )), Box_::into_raw(f), @@ -87,9 +87,3 @@ pub trait SocketAddressExt: IsA + sealed::Sealed + 'static { } impl> SocketAddressExt for O {} - -impl fmt::Display for SocketAddress { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketAddress") - } -} diff --git a/gio/src/auto/socket_address_enumerator.rs b/gio/src/auto/socket_address_enumerator.rs index 2157cfa42f71..e42f8be25f7b 100644 --- a/gio/src/auto/socket_address_enumerator.rs +++ b/gio/src/auto/socket_address_enumerator.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, SocketAddress}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GSocketAddressEnumerator")] @@ -33,7 +33,7 @@ pub trait SocketAddressEnumeratorExt: cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_address_enumerator_next( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -72,7 +72,7 @@ pub trait SocketAddressEnumeratorExt: res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_address_enumerator_next_finish( _source_object as *mut _, res, @@ -118,9 +118,3 @@ pub trait SocketAddressEnumeratorExt: } impl> SocketAddressEnumeratorExt for O {} - -impl fmt::Display for SocketAddressEnumerator { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketAddressEnumerator") - } -} diff --git a/gio/src/auto/socket_client.rs b/gio/src/auto/socket_client.rs index 6769566840e9..d3bfa8a61711 100644 --- a/gio/src/auto/socket_client.rs +++ b/gio/src/auto/socket_client.rs @@ -13,7 +13,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GSocketClient")] @@ -62,7 +62,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect( self.as_ref().to_glib_none().0, connectable.as_ref().to_glib_none().0, @@ -103,7 +103,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -152,7 +152,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_host( self.as_ref().to_glib_none().0, host_and_port.to_glib_none().0, @@ -195,7 +195,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_host_finish( _source_object as *mut _, res, @@ -254,7 +254,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_service( self.as_ref().to_glib_none().0, domain.to_glib_none().0, @@ -297,7 +297,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_service_finish( _source_object as *mut _, res, @@ -352,7 +352,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_uri( self.as_ref().to_glib_none().0, uri.to_glib_none().0, @@ -395,7 +395,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_uri_finish( _source_object as *mut _, res, @@ -644,7 +644,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"event\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( event_trampoline:: as *const (), )), Box_::into_raw(f), @@ -670,7 +670,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::enable-proxy\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_enable_proxy_trampoline:: as *const (), )), Box_::into_raw(f), @@ -693,7 +693,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::family\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_family_trampoline:: as *const (), )), Box_::into_raw(f), @@ -719,7 +719,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::local-address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_local_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -745,7 +745,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::protocol\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_protocol_trampoline:: as *const (), )), Box_::into_raw(f), @@ -771,7 +771,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::proxy-resolver\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_proxy_resolver_trampoline:: as *const (), )), Box_::into_raw(f), @@ -797,7 +797,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -820,7 +820,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::tls\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_tls_trampoline:: as *const (), )), Box_::into_raw(f), @@ -847,7 +847,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::tls-validation-flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_tls_validation_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -870,7 +870,7 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -880,9 +880,3 @@ pub trait SocketClientExt: IsA + sealed::Sealed + 'static { } impl> SocketClientExt for O {} - -impl fmt::Display for SocketClient { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketClient") - } -} diff --git a/gio/src/auto/socket_connectable.rs b/gio/src/auto/socket_connectable.rs index e12d5beefea1..41f95f18acbf 100644 --- a/gio/src/auto/socket_connectable.rs +++ b/gio/src/auto/socket_connectable.rs @@ -4,7 +4,6 @@ use crate::SocketAddressEnumerator; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GSocketConnectable")] @@ -54,9 +53,3 @@ pub trait SocketConnectableExt: IsA + sealed::Sealed + 'stati } impl> SocketConnectableExt for O {} - -impl fmt::Display for SocketConnectable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketConnectable") - } -} diff --git a/gio/src/auto/socket_connection.rs b/gio/src/auto/socket_connection.rs index ae0b2a587dde..e15516c2441a 100644 --- a/gio/src/auto/socket_connection.rs +++ b/gio/src/auto/socket_connection.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, IOStream, Socket, SocketAddress, SocketFamily, SocketType}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GSocketConnection")] @@ -64,7 +64,7 @@ pub trait SocketConnectionExt: IsA + sealed::Sealed + 'static cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_connection_connect( self.as_ref().to_glib_none().0, address.as_ref().to_glib_none().0, @@ -106,7 +106,7 @@ pub trait SocketConnectionExt: IsA + sealed::Sealed + 'static res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_socket_connection_connect_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -150,7 +150,7 @@ pub trait SocketConnectionExt: IsA + sealed::Sealed + 'static #[doc(alias = "get_local_address")] fn local_address(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_connection_get_local_address( self.as_ref().to_glib_none().0, &mut error, @@ -167,7 +167,7 @@ pub trait SocketConnectionExt: IsA + sealed::Sealed + 'static #[doc(alias = "get_remote_address")] fn remote_address(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_connection_get_remote_address( self.as_ref().to_glib_none().0, &mut error, @@ -201,9 +201,3 @@ pub trait SocketConnectionExt: IsA + sealed::Sealed + 'static } impl> SocketConnectionExt for O {} - -impl fmt::Display for SocketConnection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketConnection") - } -} diff --git a/gio/src/auto/socket_control_message.rs b/gio/src/auto/socket_control_message.rs index 37963a3ebd5a..e89446e29794 100644 --- a/gio/src/auto/socket_control_message.rs +++ b/gio/src/auto/socket_control_message.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GSocketControlMessage")] @@ -57,9 +56,3 @@ pub trait SocketControlMessageExt: IsA + sealed::Sealed + } impl> SocketControlMessageExt for O {} - -impl fmt::Display for SocketControlMessage { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketControlMessage") - } -} diff --git a/gio/src/auto/socket_listener.rs b/gio/src/auto/socket_listener.rs index 0a2469771018..3c42df7336bc 100644 --- a/gio/src/auto/socket_listener.rs +++ b/gio/src/auto/socket_listener.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GSocketListener")] @@ -49,8 +49,8 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(SocketConnection, Option), glib::Error> { unsafe { - let mut source_object = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut source_object = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_listener_accept( self.as_ref().to_glib_none().0, &mut source_object, @@ -92,8 +92,8 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut source_object = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut source_object = std::ptr::null_mut(); let ret = ffi::g_socket_listener_accept_finish( _source_object as *mut _, res, @@ -146,8 +146,8 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result<(Socket, Option), glib::Error> { unsafe { - let mut source_object = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut source_object = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_listener_accept_socket( self.as_ref().to_glib_none().0, &mut source_object, @@ -189,8 +189,8 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut source_object = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut source_object = std::ptr::null_mut(); let ret = ffi::g_socket_listener_accept_socket_finish( _source_object as *mut _, res, @@ -245,8 +245,8 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { source_object: Option<&impl IsA>, ) -> Result { unsafe { - let mut effective_address = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut effective_address = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_listener_add_address( self.as_ref().to_glib_none().0, address.as_ref().to_glib_none().0, @@ -271,7 +271,7 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { source_object: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_socket_listener_add_any_inet_port( self.as_ref().to_glib_none().0, source_object.map(|p| p.as_ref()).to_glib_none().0, @@ -292,7 +292,7 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { source_object: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_listener_add_inet_port( self.as_ref().to_glib_none().0, port, @@ -315,7 +315,7 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { source_object: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_socket_listener_add_socket( self.as_ref().to_glib_none().0, socket.as_ref().to_glib_none().0, @@ -381,7 +381,7 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"event\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( event_trampoline:: as *const (), )), Box_::into_raw(f), @@ -407,7 +407,7 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::listen-backlog\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_listen_backlog_trampoline:: as *const (), )), Box_::into_raw(f), @@ -417,9 +417,3 @@ pub trait SocketListenerExt: IsA + sealed::Sealed + 'static { } impl> SocketListenerExt for O {} - -impl fmt::Display for SocketListener { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketListener") - } -} diff --git a/gio/src/auto/socket_service.rs b/gio/src/auto/socket_service.rs index 802551226de4..ca01a0ef15f7 100644 --- a/gio/src/auto/socket_service.rs +++ b/gio/src/auto/socket_service.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GSocketService")] @@ -98,7 +98,7 @@ pub trait SocketServiceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"incoming\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( incoming_trampoline:: as *const (), )), Box_::into_raw(f), @@ -124,7 +124,7 @@ pub trait SocketServiceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::active\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_active_trampoline:: as *const (), )), Box_::into_raw(f), @@ -134,9 +134,3 @@ pub trait SocketServiceExt: IsA + sealed::Sealed + 'static { } impl> SocketServiceExt for O {} - -impl fmt::Display for SocketService { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SocketService") - } -} diff --git a/gio/src/auto/subprocess.rs b/gio/src/auto/subprocess.rs index ed72b74c640e..8165ddba9929 100644 --- a/gio/src/auto/subprocess.rs +++ b/gio/src/auto/subprocess.rs @@ -4,7 +4,7 @@ use crate::{AsyncResult, Cancellable, Initable, InputStream, OutputStream, SubprocessFlags}; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GSubprocess")] @@ -27,7 +27,7 @@ impl Subprocess { flags: SubprocessFlags, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_subprocess_newv(argv.to_glib_none().0, flags.into_glib(), &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -44,9 +44,9 @@ impl Subprocess { cancellable: Option<&impl IsA>, ) -> Result<(Option, Option), glib::Error> { unsafe { - let mut stdout_buf = ptr::null_mut(); - let mut stderr_buf = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut stdout_buf = std::ptr::null_mut(); + let mut stderr_buf = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_subprocess_communicate( self.to_glib_none().0, stdin_buf.to_glib_none().0, @@ -92,9 +92,9 @@ impl Subprocess { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); - let mut stdout_buf = ptr::null_mut(); - let mut stderr_buf = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut stdout_buf = std::ptr::null_mut(); + let mut stderr_buf = std::ptr::null_mut(); let _ = ffi::g_subprocess_communicate_finish( _source_object as *mut _, res, @@ -156,9 +156,9 @@ impl Subprocess { cancellable: Option<&impl IsA>, ) -> Result<(Option, Option), glib::Error> { unsafe { - let mut stdout_buf = ptr::null_mut(); - let mut stderr_buf = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut stdout_buf = std::ptr::null_mut(); + let mut stderr_buf = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_subprocess_communicate_utf8( self.to_glib_none().0, stdin_buf.to_glib_none().0, @@ -255,7 +255,7 @@ impl Subprocess { #[doc(alias = "g_subprocess_wait")] pub fn wait(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_subprocess_wait( self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -293,7 +293,7 @@ impl Subprocess { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_subprocess_wait_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -335,7 +335,7 @@ impl Subprocess { cancellable: Option<&impl IsA>, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_subprocess_wait_check( self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -375,7 +375,7 @@ impl Subprocess { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_subprocess_wait_check_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -411,9 +411,3 @@ impl Subprocess { )) } } - -impl fmt::Display for Subprocess { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Subprocess") - } -} diff --git a/gio/src/auto/subprocess_launcher.rs b/gio/src/auto/subprocess_launcher.rs index a7d107bd410e..983c72094c4d 100644 --- a/gio/src/auto/subprocess_launcher.rs +++ b/gio/src/auto/subprocess_launcher.rs @@ -7,7 +7,6 @@ use glib::translate::*; #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] use std::boxed::Box as Box_; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GSubprocessLauncher")] @@ -156,7 +155,7 @@ impl SubprocessLauncher { #[doc(alias = "spawnv")] pub fn spawn(&self, argv: &[&std::ffi::OsStr]) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_subprocess_launcher_spawnv( self.to_glib_none().0, argv.to_glib_none().0, @@ -180,9 +179,3 @@ impl SubprocessLauncher { } } } - -impl fmt::Display for SubprocessLauncher { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SubprocessLauncher") - } -} diff --git a/gio/src/auto/tcp_connection.rs b/gio/src/auto/tcp_connection.rs index fb578ea4bd18..262fd6674fca 100644 --- a/gio/src/auto/tcp_connection.rs +++ b/gio/src/auto/tcp_connection.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GTcpConnection")] @@ -67,7 +67,7 @@ pub trait TcpConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::graceful-disconnect\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_graceful_disconnect_trampoline:: as *const (), )), Box_::into_raw(f), @@ -77,9 +77,3 @@ pub trait TcpConnectionExt: IsA + sealed::Sealed + 'static { } impl> TcpConnectionExt for O {} - -impl fmt::Display for TcpConnection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TcpConnection") - } -} diff --git a/gio/src/auto/themed_icon.rs b/gio/src/auto/themed_icon.rs index 921d1b2ae0fe..ec696a2c168d 100644 --- a/gio/src/auto/themed_icon.rs +++ b/gio/src/auto/themed_icon.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GThemedIcon")] @@ -91,7 +91,7 @@ impl ThemedIcon { connect_raw( self.as_ptr() as *mut _, b"notify::names\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_names_trampoline:: as *const (), )), Box_::into_raw(f), @@ -99,9 +99,3 @@ impl ThemedIcon { } } } - -impl fmt::Display for ThemedIcon { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ThemedIcon") - } -} diff --git a/gio/src/auto/threaded_socket_service.rs b/gio/src/auto/threaded_socket_service.rs index b60f006a54d6..991be3183b41 100644 --- a/gio/src/auto/threaded_socket_service.rs +++ b/gio/src/auto/threaded_socket_service.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GThreadedSocketService")] @@ -63,7 +63,7 @@ pub trait ThreadedSocketServiceExt: IsA + sealed::Sealed connect_raw( self.as_ptr() as *mut _, b"run\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( run_trampoline:: as *const (), )), Box_::into_raw(f), @@ -73,9 +73,3 @@ pub trait ThreadedSocketServiceExt: IsA + sealed::Sealed } impl> ThreadedSocketServiceExt for O {} - -impl fmt::Display for ThreadedSocketService { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ThreadedSocketService") - } -} diff --git a/gio/src/auto/tls_backend.rs b/gio/src/auto/tls_backend.rs index dad98ccb7f52..8ddab7fc9d14 100644 --- a/gio/src/auto/tls_backend.rs +++ b/gio/src/auto/tls_backend.rs @@ -4,7 +4,6 @@ use crate::TlsDatabase; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GTlsBackend")] @@ -134,9 +133,3 @@ pub trait TlsBackendExt: IsA + sealed::Sealed + 'static { } impl> TlsBackendExt for O {} - -impl fmt::Display for TlsBackend { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsBackend") - } -} diff --git a/gio/src/auto/tls_certificate.rs b/gio/src/auto/tls_certificate.rs index 670c4cdd1328..736df1aeeb38 100644 --- a/gio/src/auto/tls_certificate.rs +++ b/gio/src/auto/tls_certificate.rs @@ -12,8 +12,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] -use std::{boxed::Box as Box_, mem::transmute}; -use std::{fmt, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GTlsCertificate")] @@ -31,7 +30,7 @@ impl TlsCertificate { #[doc(alias = "new_from_file")] pub fn from_file(file: impl AsRef) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_certificate_new_from_file(file.as_ref().to_glib_none().0, &mut error); if error.is_null() { @@ -51,7 +50,7 @@ impl TlsCertificate { password: &str, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_certificate_new_from_file_with_password( file.as_ref().to_glib_none().0, password.to_glib_none().0, @@ -72,7 +71,7 @@ impl TlsCertificate { key_file: impl AsRef, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_certificate_new_from_files( cert_file.as_ref().to_glib_none().0, key_file.as_ref().to_glib_none().0, @@ -91,7 +90,7 @@ impl TlsCertificate { pub fn from_pem(data: &str) -> Result { let length = data.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_certificate_new_from_pem(data.to_glib_none().0, length, &mut error); if error.is_null() { @@ -111,7 +110,7 @@ impl TlsCertificate { private_key_pkcs11_uri: Option<&str>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_certificate_new_from_pkcs11_uris( pkcs11_uri.to_glib_none().0, private_key_pkcs11_uri.to_glib_none().0, @@ -132,7 +131,7 @@ impl TlsCertificate { pub fn from_pkcs12(data: &[u8], password: Option<&str>) -> Result { let length = data.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_certificate_new_from_pkcs12( data.to_glib_none().0, length, @@ -152,7 +151,7 @@ impl TlsCertificate { file: impl AsRef, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_certificate_list_new_from_file( file.as_ref().to_glib_none().0, &mut error, @@ -333,7 +332,7 @@ pub trait TlsCertificateExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::dns-names\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_dns_names_trampoline:: as *const (), )), Box_::into_raw(f), @@ -361,7 +360,7 @@ pub trait TlsCertificateExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ip-addresses\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ip_addresses_trampoline:: as *const (), )), Box_::into_raw(f), @@ -389,7 +388,7 @@ pub trait TlsCertificateExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::issuer-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_issuer_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -417,7 +416,7 @@ pub trait TlsCertificateExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::not-valid-after\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_not_valid_after_trampoline:: as *const (), )), Box_::into_raw(f), @@ -445,7 +444,7 @@ pub trait TlsCertificateExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::not-valid-before\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_not_valid_before_trampoline:: as *const (), )), Box_::into_raw(f), @@ -473,7 +472,7 @@ pub trait TlsCertificateExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::subject-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_subject_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -483,9 +482,3 @@ pub trait TlsCertificateExt: IsA + sealed::Sealed + 'static { } impl> TlsCertificateExt for O {} - -impl fmt::Display for TlsCertificate { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsCertificate") - } -} diff --git a/gio/src/auto/tls_client_connection.rs b/gio/src/auto/tls_client_connection.rs index 102f7fb6478f..1cc31413639d 100644 --- a/gio/src/auto/tls_client_connection.rs +++ b/gio/src/auto/tls_client_connection.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GTlsClientConnection")] @@ -29,7 +29,7 @@ impl TlsClientConnection { server_identity: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_client_connection_new( base_io_stream.as_ref().to_glib_none().0, server_identity.map(|p| p.as_ref()).to_glib_none().0, @@ -132,7 +132,7 @@ pub trait TlsClientConnectionExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::accepted-cas\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accepted_cas_trampoline:: as *const (), )), Box_::into_raw(f), @@ -158,7 +158,7 @@ pub trait TlsClientConnectionExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::server-identity\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_server_identity_trampoline:: as *const (), )), Box_::into_raw(f), @@ -185,7 +185,7 @@ pub trait TlsClientConnectionExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::validation-flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_validation_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -195,9 +195,3 @@ pub trait TlsClientConnectionExt: IsA + sealed::Sealed + 's } impl> TlsClientConnectionExt for O {} - -impl fmt::Display for TlsClientConnection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsClientConnection") - } -} diff --git a/gio/src/auto/tls_connection.rs b/gio/src/auto/tls_connection.rs index 8b48cb94dc88..b4beae60e2b4 100644 --- a/gio/src/auto/tls_connection.rs +++ b/gio/src/auto/tls_connection.rs @@ -15,7 +15,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GTlsConnection")] @@ -162,7 +162,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { #[doc(alias = "g_tls_connection_handshake")] fn handshake(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_tls_connection_handshake( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -203,7 +203,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_tls_connection_handshake_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -335,7 +335,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"accept-certificate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( accept_certificate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -363,7 +363,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::advertised-protocols\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_advertised_protocols_trampoline:: as *const (), )), Box_::into_raw(f), @@ -389,7 +389,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::certificate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_certificate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -417,7 +417,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ciphersuite-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ciphersuite_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -443,7 +443,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::database\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_database_trampoline:: as *const (), )), Box_::into_raw(f), @@ -469,7 +469,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::interaction\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_interaction_trampoline:: as *const (), )), Box_::into_raw(f), @@ -497,7 +497,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::negotiated-protocol\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_negotiated_protocol_trampoline:: as *const (), )), Box_::into_raw(f), @@ -523,7 +523,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::peer-certificate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_peer_certificate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -552,7 +552,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::peer-certificate-errors\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_peer_certificate_errors_trampoline:: as *const (), )), Box_::into_raw(f), @@ -580,7 +580,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::protocol-version\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_protocol_version_trampoline:: as *const (), )), Box_::into_raw(f), @@ -607,7 +607,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::rehandshake-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_rehandshake_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -633,7 +633,7 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::require-close-notify\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_require_close_notify_trampoline:: as *const (), )), Box_::into_raw(f), @@ -643,9 +643,3 @@ pub trait TlsConnectionExt: IsA + sealed::Sealed + 'static { } impl> TlsConnectionExt for O {} - -impl fmt::Display for TlsConnection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsConnection") - } -} diff --git a/gio/src/auto/tls_database.rs b/gio/src/auto/tls_database.rs index 6a18efce499c..777b3bc7ff6e 100644 --- a/gio/src/auto/tls_database.rs +++ b/gio/src/auto/tls_database.rs @@ -7,7 +7,7 @@ use crate::{ TlsDatabaseLookupFlags, TlsDatabaseVerifyFlags, TlsInteraction, }; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GTlsDatabase")] @@ -50,7 +50,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_for_handle( self.as_ref().to_glib_none().0, handle.to_glib_none().0, @@ -97,7 +97,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_for_handle_finish( _source_object as *mut _, res, @@ -161,7 +161,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_issuer( self.as_ref().to_glib_none().0, certificate.as_ref().to_glib_none().0, @@ -206,7 +206,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_issuer_finish( _source_object as *mut _, res, @@ -270,7 +270,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificates_issued_by( self.as_ref().to_glib_none().0, issuer_raw_dn.to_glib_none().0, @@ -317,7 +317,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificates_issued_by_finish( _source_object as *mut _, res, @@ -384,7 +384,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_verify_chain( self.as_ref().to_glib_none().0, chain.as_ref().to_glib_none().0, @@ -433,7 +433,7 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_database_verify_chain_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -496,9 +496,3 @@ pub trait TlsDatabaseExt: IsA + sealed::Sealed + 'static { } impl> TlsDatabaseExt for O {} - -impl fmt::Display for TlsDatabase { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsDatabase") - } -} diff --git a/gio/src/auto/tls_file_database.rs b/gio/src/auto/tls_file_database.rs index f9b588454f14..a3d6562b91fe 100644 --- a/gio/src/auto/tls_file_database.rs +++ b/gio/src/auto/tls_file_database.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GTlsFileDatabase")] @@ -25,7 +25,7 @@ impl TlsFileDatabase { #[doc(alias = "g_tls_file_database_new")] pub fn new(anchors: impl AsRef) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_file_database_new(anchors.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -68,7 +68,7 @@ pub trait TlsFileDatabaseExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::anchors\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_anchors_trampoline:: as *const (), )), Box_::into_raw(f), @@ -78,9 +78,3 @@ pub trait TlsFileDatabaseExt: IsA + sealed::Sealed + 'static { } impl> TlsFileDatabaseExt for O {} - -impl fmt::Display for TlsFileDatabase { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsFileDatabase") - } -} diff --git a/gio/src/auto/tls_interaction.rs b/gio/src/auto/tls_interaction.rs index bcc3400bb481..16c764dc3167 100644 --- a/gio/src/auto/tls_interaction.rs +++ b/gio/src/auto/tls_interaction.rs @@ -7,7 +7,7 @@ use crate::{ TlsPassword, }; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GTlsInteraction")] @@ -35,7 +35,7 @@ pub trait TlsInteractionExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_interaction_ask_password( self.as_ref().to_glib_none().0, password.as_ref().to_glib_none().0, @@ -76,7 +76,7 @@ pub trait TlsInteractionExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_interaction_ask_password_finish( _source_object as *mut _, res, @@ -128,7 +128,7 @@ pub trait TlsInteractionExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_interaction_invoke_ask_password( self.as_ref().to_glib_none().0, password.as_ref().to_glib_none().0, @@ -151,7 +151,7 @@ pub trait TlsInteractionExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_interaction_invoke_request_certificate( self.as_ref().to_glib_none().0, connection.as_ref().to_glib_none().0, @@ -175,7 +175,7 @@ pub trait TlsInteractionExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_interaction_request_certificate( self.as_ref().to_glib_none().0, connection.as_ref().to_glib_none().0, @@ -218,7 +218,7 @@ pub trait TlsInteractionExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_interaction_request_certificate_finish( _source_object as *mut _, res, @@ -267,9 +267,3 @@ pub trait TlsInteractionExt: IsA + sealed::Sealed + 'static { } impl> TlsInteractionExt for O {} - -impl fmt::Display for TlsInteraction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsInteraction") - } -} diff --git a/gio/src/auto/tls_password.rs b/gio/src/auto/tls_password.rs index c3208c886f17..953983417ab2 100644 --- a/gio/src/auto/tls_password.rs +++ b/gio/src/auto/tls_password.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GTlsPassword")] @@ -119,7 +119,7 @@ pub trait TlsPasswordExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::description\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_description_trampoline:: as *const (), )), Box_::into_raw(f), @@ -142,7 +142,7 @@ pub trait TlsPasswordExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -165,7 +165,7 @@ pub trait TlsPasswordExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::warning\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_warning_trampoline:: as *const (), )), Box_::into_raw(f), @@ -175,9 +175,3 @@ pub trait TlsPasswordExt: IsA + sealed::Sealed + 'static { } impl> TlsPasswordExt for O {} - -impl fmt::Display for TlsPassword { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsPassword") - } -} diff --git a/gio/src/auto/tls_server_connection.rs b/gio/src/auto/tls_server_connection.rs index 1e4e64f40ead..4640fd56e237 100644 --- a/gio/src/auto/tls_server_connection.rs +++ b/gio/src/auto/tls_server_connection.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GTlsServerConnection")] @@ -28,7 +28,7 @@ impl TlsServerConnection { certificate: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_tls_server_connection_new( base_io_stream.as_ref().to_glib_none().0, certificate.map(|p| p.as_ref()).to_glib_none().0, @@ -77,7 +77,7 @@ pub trait TlsServerConnectionExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::authentication-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_authentication_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -87,9 +87,3 @@ pub trait TlsServerConnectionExt: IsA + sealed::Sealed + 's } impl> TlsServerConnectionExt for O {} - -impl fmt::Display for TlsServerConnection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TlsServerConnection") - } -} diff --git a/gio/src/auto/unix_credentials_message.rs b/gio/src/auto/unix_credentials_message.rs index 08e938a1cb0d..d5cb04c2acf3 100644 --- a/gio/src/auto/unix_credentials_message.rs +++ b/gio/src/auto/unix_credentials_message.rs @@ -4,7 +4,6 @@ use crate::{Credentials, SocketControlMessage}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GUnixCredentialsMessage")] @@ -69,9 +68,3 @@ pub trait UnixCredentialsMessageExt: } impl> UnixCredentialsMessageExt for O {} - -impl fmt::Display for UnixCredentialsMessage { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("UnixCredentialsMessage") - } -} diff --git a/gio/src/auto/unix_fd_list.rs b/gio/src/auto/unix_fd_list.rs index ff6df6b0e67a..f5e621e3d715 100644 --- a/gio/src/auto/unix_fd_list.rs +++ b/gio/src/auto/unix_fd_list.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GUnixFDList")] @@ -43,9 +42,3 @@ pub trait UnixFDListExt: IsA + sealed::Sealed + 'static { } impl> UnixFDListExt for O {} - -impl fmt::Display for UnixFDList { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("UnixFDList") - } -} diff --git a/gio/src/auto/unix_fd_message.rs b/gio/src/auto/unix_fd_message.rs index 952511cc367e..306ad30986c3 100644 --- a/gio/src/auto/unix_fd_message.rs +++ b/gio/src/auto/unix_fd_message.rs @@ -4,7 +4,6 @@ use crate::{SocketControlMessage, UnixFDList}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GUnixFDMessage")] @@ -59,9 +58,3 @@ pub trait UnixFDMessageExt: IsA + sealed::Sealed + 'static { } impl> UnixFDMessageExt for O {} - -impl fmt::Display for UnixFDMessage { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("UnixFDMessage") - } -} diff --git a/gio/src/auto/unix_input_stream.rs b/gio/src/auto/unix_input_stream.rs index 2549fbb0dd30..34d485d57a58 100644 --- a/gio/src/auto/unix_input_stream.rs +++ b/gio/src/auto/unix_input_stream.rs @@ -4,7 +4,6 @@ use crate::{FileDescriptorBased, InputStream, PollableInputStream}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GUnixInputStream")] @@ -37,9 +36,3 @@ pub trait UnixInputStreamExt: IsA + sealed::Sealed + 'static { } impl> UnixInputStreamExt for O {} - -impl fmt::Display for UnixInputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("UnixInputStream") - } -} diff --git a/gio/src/auto/unix_mount_point.rs b/gio/src/auto/unix_mount_point.rs index f371a54eb382..4369cd5f18fb 100644 --- a/gio/src/auto/unix_mount_point.rs +++ b/gio/src/auto/unix_mount_point.rs @@ -4,10 +4,6 @@ use crate::Icon; use glib::translate::*; -use std::cmp; -#[cfg(feature = "v2_66")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] -use std::mem; glib::wrapper! { #[derive(Debug)] @@ -139,7 +135,7 @@ impl UnixMountPoint { #[doc(alias = "g_unix_mount_point_at")] pub fn at(mount_path: impl AsRef) -> (Option, u64) { unsafe { - let mut time_read = mem::MaybeUninit::uninit(); + let mut time_read = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::g_unix_mount_point_at( mount_path.as_ref().to_glib_none().0, time_read.as_mut_ptr(), @@ -160,14 +156,14 @@ impl Eq for UnixMountPoint {} impl PartialOrd for UnixMountPoint { #[inline] - fn partial_cmp(&self, other: &Self) -> Option { - self.compare(other).partial_cmp(&0) + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) } } impl Ord for UnixMountPoint { #[inline] - fn cmp(&self, other: &Self) -> cmp::Ordering { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.compare(other).cmp(&0) } } diff --git a/gio/src/auto/unix_output_stream.rs b/gio/src/auto/unix_output_stream.rs index 6515d29f5d9f..3a9867573a75 100644 --- a/gio/src/auto/unix_output_stream.rs +++ b/gio/src/auto/unix_output_stream.rs @@ -4,7 +4,6 @@ use crate::{FileDescriptorBased, OutputStream, PollableOutputStream}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GUnixOutputStream")] @@ -37,9 +36,3 @@ pub trait UnixOutputStreamExt: IsA + sealed::Sealed + 'static } impl> UnixOutputStreamExt for O {} - -impl fmt::Display for UnixOutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("UnixOutputStream") - } -} diff --git a/gio/src/auto/unix_socket_address.rs b/gio/src/auto/unix_socket_address.rs index 1b9fa585b2b3..e6a2ba5e86e4 100644 --- a/gio/src/auto/unix_socket_address.rs +++ b/gio/src/auto/unix_socket_address.rs @@ -4,7 +4,6 @@ use crate::{SocketAddress, SocketConnectable, UnixSocketAddressType}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GUnixSocketAddress")] @@ -77,9 +76,3 @@ pub trait UnixSocketAddressExt: IsA + sealed::Sealed + 'stati } impl> UnixSocketAddressExt for O {} - -impl fmt::Display for UnixSocketAddress { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("UnixSocketAddress") - } -} diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index dd6ac754e173..59401b409365 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/gio/src/auto/vfs.rs b/gio/src/auto/vfs.rs index 211acc34ed6f..b1216d5b65d2 100644 --- a/gio/src/auto/vfs.rs +++ b/gio/src/auto/vfs.rs @@ -4,7 +4,7 @@ use crate::File; use glib::{prelude::*, translate::*}; -use std::{boxed::Box as Box_, fmt}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GVfs")] @@ -181,9 +181,3 @@ pub trait VfsExt: IsA + sealed::Sealed + 'static { } impl> VfsExt for O {} - -impl fmt::Display for Vfs { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Vfs") - } -} diff --git a/gio/src/auto/volume.rs b/gio/src/auto/volume.rs index 2f4ab2fb1677..f388e2889ec8 100644 --- a/gio/src/auto/volume.rs +++ b/gio/src/auto/volume.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GVolume")] @@ -69,7 +69,7 @@ pub trait VolumeExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_volume_eject_with_operation_finish( _source_object as *mut _, res, @@ -219,7 +219,7 @@ pub trait VolumeExt: IsA + sealed::Sealed + 'static { res: *mut crate::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::g_volume_mount_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -288,7 +288,7 @@ pub trait VolumeExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -310,7 +310,7 @@ pub trait VolumeExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -320,9 +320,3 @@ pub trait VolumeExt: IsA + sealed::Sealed + 'static { } impl> VolumeExt for O {} - -impl fmt::Display for Volume { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Volume") - } -} diff --git a/gio/src/auto/volume_monitor.rs b/gio/src/auto/volume_monitor.rs index ca9ffd80027a..b74a95c6634c 100644 --- a/gio/src/auto/volume_monitor.rs +++ b/gio/src/auto/volume_monitor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GVolumeMonitor")] @@ -107,7 +107,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"drive-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( drive_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -136,7 +136,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"drive-connected\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( drive_connected_trampoline:: as *const (), )), Box_::into_raw(f), @@ -165,7 +165,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"drive-disconnected\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( drive_disconnected_trampoline:: as *const (), )), Box_::into_raw(f), @@ -194,7 +194,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"drive-eject-button\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( drive_eject_button_trampoline:: as *const (), )), Box_::into_raw(f), @@ -223,7 +223,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"drive-stop-button\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( drive_stop_button_trampoline:: as *const (), )), Box_::into_raw(f), @@ -252,7 +252,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"mount-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( mount_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -281,7 +281,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"mount-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( mount_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -310,7 +310,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"mount-pre-unmount\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( mount_pre_unmount_trampoline:: as *const (), )), Box_::into_raw(f), @@ -339,7 +339,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"mount-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( mount_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -368,7 +368,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"volume-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( volume_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -397,7 +397,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"volume-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( volume_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -426,7 +426,7 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"volume-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( volume_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -436,9 +436,3 @@ pub trait VolumeMonitorExt: IsA + sealed::Sealed + 'static { } impl> VolumeMonitorExt for O {} - -impl fmt::Display for VolumeMonitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("VolumeMonitor") - } -} diff --git a/gio/src/auto/zlib_compressor.rs b/gio/src/auto/zlib_compressor.rs index d94a58d079f7..0cb38d672f46 100644 --- a/gio/src/auto/zlib_compressor.rs +++ b/gio/src/auto/zlib_compressor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GZlibCompressor")] @@ -61,7 +61,7 @@ impl ZlibCompressor { connect_raw( self.as_ptr() as *mut _, b"notify::file-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_file_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -69,9 +69,3 @@ impl ZlibCompressor { } } } - -impl fmt::Display for ZlibCompressor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ZlibCompressor") - } -} diff --git a/gio/src/auto/zlib_decompressor.rs b/gio/src/auto/zlib_decompressor.rs index 3dc75864392d..9844f7e44f6e 100644 --- a/gio/src/auto/zlib_decompressor.rs +++ b/gio/src/auto/zlib_decompressor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GZlibDecompressor")] @@ -54,7 +54,7 @@ impl ZlibDecompressor { connect_raw( self.as_ptr() as *mut _, b"notify::file-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_file_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -62,9 +62,3 @@ impl ZlibDecompressor { } } } - -impl fmt::Display for ZlibDecompressor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ZlibDecompressor") - } -} diff --git a/gio/src/cancellable_future.rs b/gio/src/cancellable_future.rs index 6263628e7ed0..1691ac4235ab 100644 --- a/gio/src/cancellable_future.rs +++ b/gio/src/cancellable_future.rs @@ -23,7 +23,7 @@ pin_project! { /// /// ``` /// # use futures::FutureExt; - /// # use gio::traits::CancellableExt; + /// # use gio::prelude::*; /// # use gio::CancellableFuture; /// let l = glib::MainLoop::new(None, false); /// let c = gio::Cancellable::new(); diff --git a/gio/src/file_descriptor_based.rs b/gio/src/file_descriptor_based.rs index a39efce86d04..0cb7f29f5488 100644 --- a/gio/src/file_descriptor_based.rs +++ b/gio/src/file_descriptor_based.rs @@ -6,7 +6,6 @@ use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use glib::{prelude::*, translate::*}; #[cfg(all(not(unix), docsrs))] use socket::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; -use std::fmt; glib::wrapper! { #[doc(alias = "GFileDescriptorBased")] @@ -47,9 +46,3 @@ pub trait FileDescriptorBasedExtManual: } impl> FileDescriptorBasedExtManual for O {} - -impl fmt::Display for FileDescriptorBased { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FileDescriptorBased") - } -} diff --git a/gio/src/io_extension.rs b/gio/src/io_extension.rs index ff216dec7fc1..3fa104e03984 100644 --- a/gio/src/io_extension.rs +++ b/gio/src/io_extension.rs @@ -20,12 +20,6 @@ impl fmt::Debug for IOExtension { } } -impl fmt::Display for IOExtension { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "IOExtension") - } -} - impl FromGlibPtrNone<*mut ffi::GIOExtension> for IOExtension { #[inline] unsafe fn from_glib_none(ptr: *mut ffi::GIOExtension) -> Self { diff --git a/gio/src/io_extension_point.rs b/gio/src/io_extension_point.rs index b7c71505a053..57936eddd4a9 100644 --- a/gio/src/io_extension_point.rs +++ b/gio/src/io_extension_point.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{fmt, marker::PhantomData, ptr}; +use std::{marker::PhantomData, ptr}; use glib::{translate::*, GString, IntoGStr, Type}; @@ -53,12 +53,6 @@ impl IOExtensionPointBuilder { #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct IOExtensionPoint(ptr::NonNull); -impl fmt::Display for IOExtensionPoint { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "IOExtensionPoint") - } -} - impl FromGlibPtrNone<*mut ffi::GIOExtensionPoint> for IOExtensionPoint { #[inline] unsafe fn from_glib_none(ptr: *mut ffi::GIOExtensionPoint) -> Self { diff --git a/gio/src/lib.rs b/gio/src/lib.rs index 0bbb86370706..f2e5bb7a0960 100644 --- a/gio/src/lib.rs +++ b/gio/src/lib.rs @@ -108,7 +108,12 @@ pub mod builders { pub use super::initable::InitableBuilder; } -pub use crate::auto::{functions::*, *}; +pub mod functions { + pub use super::auto::functions::*; +} + +pub use crate::auto::*; +pub use crate::functions::*; pub mod prelude; #[allow(clippy::missing_safety_doc)] diff --git a/gio/src/socket_msg_flags.rs b/gio/src/socket_msg_flags.rs index 0973c935c0db..abecaa0fc0a1 100644 --- a/gio/src/socket_msg_flags.rs +++ b/gio/src/socket_msg_flags.rs @@ -1,7 +1,5 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::fmt; - use glib::{bitflags, prelude::*, translate::*, value::FromValue, Type}; bitflags::bitflags! { @@ -19,12 +17,6 @@ bitflags::bitflags! { } } -impl fmt::Display for SocketMsgFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for SocketMsgFlags { type GlibType = ffi::GSocketMsgFlags; diff --git a/gio/src/task.rs b/gio/src/task.rs index 972df9eb20b0..d536b0cde7e2 100644 --- a/gio/src/task.rs +++ b/gio/src/task.rs @@ -315,12 +315,6 @@ macro_rules! task_impl { } } } - - impl std::fmt::Display for $name { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - f.write_str(stringify!($name)) - } - } } } diff --git a/gio/src/unix_mount_entry.rs b/gio/src/unix_mount_entry.rs index 84670ad2d368..7fbb70b31273 100644 --- a/gio/src/unix_mount_entry.rs +++ b/gio/src/unix_mount_entry.rs @@ -194,7 +194,7 @@ impl Eq for UnixMountEntry {} impl PartialOrd for UnixMountEntry { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.compare(other).partial_cmp(&0) + Some(self.cmp(other)) } } diff --git a/gio/src/win32_input_stream.rs b/gio/src/win32_input_stream.rs index 425c32ef41a0..d0ec159f2f22 100644 --- a/gio/src/win32_input_stream.rs +++ b/gio/src/win32_input_stream.rs @@ -1,9 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{ - fmt, - os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}, -}; +use std::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; use glib::{prelude::*, translate::*}; @@ -33,12 +30,6 @@ impl> Win32InputStreamExt for O { } } -impl fmt::Display for Win32InputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32InputStream") - } -} - impl Win32InputStream { pub const NONE: Option<&'static Win32InputStream> = None; diff --git a/gio/src/win32_output_stream.rs b/gio/src/win32_output_stream.rs index 0aa9386ca780..1feb2c82647f 100644 --- a/gio/src/win32_output_stream.rs +++ b/gio/src/win32_output_stream.rs @@ -1,9 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{ - fmt, - os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}, -}; +use std::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; use glib::{prelude::*, translate::*}; @@ -31,12 +28,6 @@ pub trait Win32OutputStreamExt: IsA + 'static { impl> Win32OutputStreamExt for O {} -impl fmt::Display for Win32OutputStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32OutputStream") - } -} - impl Win32OutputStream { pub const NONE: Option<&'static Win32OutputStream> = None; diff --git a/gio/sys/Cargo.toml b/gio/sys/Cargo.toml index 1f39fc8286ec..3c5fe79853c2 100644 --- a/gio/sys/Cargo.toml +++ b/gio/sys/Cargo.toml @@ -49,12 +49,6 @@ version = "0.19.0" edition = "2021" rust-version = "1.70" -[package.metadata.docs.rs] -all-features = true -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] -features = [] - [package.metadata.system-deps.gio_2_0] name = "gio-2.0" version = "2.56" @@ -91,3 +85,8 @@ version = "2.76" [package.metadata.system-deps.gio_2_0.v2_78] version = "2.77" + +[package.metadata.docs.rs] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +all-features = true diff --git a/gio/sys/Gir.toml b/gio/sys/Gir.toml index cdd4a64e0076..a729f47271f6 100644 --- a/gio/sys/Gir.toml +++ b/gio/sys/Gir.toml @@ -11,27 +11,6 @@ external_libraries = [ "GObject", ] -[[object]] -name = "Gio.FileInfo" -status = "generate" - [[object.function]] - pattern = "[s|g]et_attribute_file_path" - version = "2.78" - -[[object]] -name = "Gio.UnixMountEntry" -status = "generate" - [[object.function]] - name = "get_type" - version = "2.54" - -[[object]] -name = "Gio.UnixMountPoint" -status = "generate" - [[object.function]] - name = "get_type" - version = "2.54" - [[object]] name = "Gio.SocketFamily" status = "manual" diff --git a/gio/sys/tests/abi.rs b/gio/sys/tests/abi.rs index 7be4276965b0..b850ea16184d 100644 --- a/gio/sys/tests/abi.rs +++ b/gio/sys/tests/abi.rs @@ -10,7 +10,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -70,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index dd6ac754e173..59401b409365 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/gir b/gir index ef087c070d5b..133ee1d93c85 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit ef087c070d5beaa53ef97568e638679952bc1f96 +Subproject commit 133ee1d93c859065c44af77223b4bcfea3137738 diff --git a/gir-files b/gir-files index 1dc6c3826666..326eb5f2d5d8 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit 1dc6c38266669e491bcabdc807172414ad1037da +Subproject commit 326eb5f2d5d852bb5b1eb436a2b856e338ef910d diff --git a/glib/gobject-sys/Cargo.toml b/glib/gobject-sys/Cargo.toml index a2ccaa2a5fd1..bf707ef3a3d1 100644 --- a/glib/gobject-sys/Cargo.toml +++ b/glib/gobject-sys/Cargo.toml @@ -39,12 +39,6 @@ version = "0.19.0" edition = "2021" rust-version = "1.70" -[package.metadata.docs.rs] -all-features = true -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] -features = [] - [package.metadata.system-deps.gobject_2_0] name = "gobject-2.0" version = "2.56" @@ -75,3 +69,8 @@ version = "2.76" [package.metadata.system-deps.gobject_2_0.v2_78] version = "2.77" + +[package.metadata.docs.rs] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +all-features = true diff --git a/glib/gobject-sys/tests/abi.rs b/glib/gobject-sys/tests/abi.rs index f44e388220df..cdda3dd9dc88 100644 --- a/glib/gobject-sys/tests/abi.rs +++ b/glib/gobject-sys/tests/abi.rs @@ -10,7 +10,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -70,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index dd6ac754e173..59401b409365 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 @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/glib/src/auto/date_time.rs b/glib/src/auto/date_time.rs index 6441eabf5d6f..6281dd9bdbdd 100644 --- a/glib/src/auto/date_time.rs +++ b/glib/src/auto/date_time.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{translate::*, BoolError, TimeSpan, TimeZone}; -use std::{cmp, hash, mem}; crate::wrapper! { #[derive(Debug)] @@ -398,9 +397,9 @@ impl DateTime { #[doc(alias = "get_ymd")] pub fn ymd(&self) -> (i32, i32, i32) { unsafe { - let mut year = mem::MaybeUninit::uninit(); - let mut month = mem::MaybeUninit::uninit(); - let mut day = mem::MaybeUninit::uninit(); + let mut year = std::mem::MaybeUninit::uninit(); + let mut month = std::mem::MaybeUninit::uninit(); + let mut day = std::mem::MaybeUninit::uninit(); ffi::g_date_time_get_ymd( self.to_glib_none().0, year.as_mut_ptr(), @@ -467,14 +466,14 @@ impl DateTime { impl PartialOrd for DateTime { #[inline] - fn partial_cmp(&self, other: &Self) -> Option { - self.compare(other).partial_cmp(&0) + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) } } impl Ord for DateTime { #[inline] - fn cmp(&self, other: &Self) -> cmp::Ordering { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.compare(other).cmp(&0) } } @@ -488,13 +487,13 @@ impl PartialEq for DateTime { impl Eq for DateTime {} -impl hash::Hash for DateTime { +impl std::hash::Hash for DateTime { #[inline] fn hash(&self, state: &mut H) where - H: hash::Hasher, + H: std::hash::Hasher, { - hash::Hash::hash(&self.hash(), state) + std::hash::Hash::hash(&self.hash(), state) } } diff --git a/glib/src/auto/enums.rs b/glib/src/auto/enums.rs index 7b6706ef534b..036d1b61cd93 100644 --- a/glib/src/auto/enums.rs +++ b/glib/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{prelude::*, translate::*}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -23,23 +22,6 @@ pub enum ChecksumType { __Unknown(i32), } -impl fmt::Display for ChecksumType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ChecksumType::{}", - match *self { - Self::Md5 => "Md5", - Self::Sha1 => "Sha1", - Self::Sha256 => "Sha256", - Self::Sha512 => "Sha512", - Self::Sha384 => "Sha384", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ChecksumType { type GlibType = ffi::GChecksumType; @@ -96,26 +78,6 @@ pub enum ConvertError { __Unknown(i32), } -impl fmt::Display for ConvertError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ConvertError::{}", - match *self { - Self::NoConversion => "NoConversion", - Self::IllegalSequence => "IllegalSequence", - Self::Failed => "Failed", - Self::PartialInput => "PartialInput", - Self::BadUri => "BadUri", - Self::NotAbsolutePath => "NotAbsolutePath", - Self::NoMemory => "NoMemory", - Self::EmbeddedNul => "EmbeddedNul", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ConvertError { type GlibType = ffi::GConvertError; @@ -209,31 +171,6 @@ pub enum DateMonth { __Unknown(i32), } -impl fmt::Display for DateMonth { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DateMonth::{}", - match *self { - Self::BadMonth => "BadMonth", - Self::January => "January", - Self::February => "February", - Self::March => "March", - Self::April => "April", - Self::May => "May", - Self::June => "June", - Self::July => "July", - Self::August => "August", - Self::September => "September", - Self::October => "October", - Self::November => "November", - Self::December => "December", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DateMonth { type GlibType = ffi::GDateMonth; @@ -304,26 +241,6 @@ pub enum DateWeekday { __Unknown(i32), } -impl fmt::Display for DateWeekday { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DateWeekday::{}", - match *self { - Self::BadWeekday => "BadWeekday", - Self::Monday => "Monday", - Self::Tuesday => "Tuesday", - Self::Wednesday => "Wednesday", - Self::Thursday => "Thursday", - Self::Friday => "Friday", - Self::Saturday => "Saturday", - Self::Sunday => "Sunday", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DateWeekday { type GlibType = ffi::GDateWeekday; @@ -420,43 +337,6 @@ pub enum FileError { __Unknown(i32), } -impl fmt::Display for FileError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FileError::{}", - match *self { - Self::Exist => "Exist", - Self::Isdir => "Isdir", - Self::Acces => "Acces", - Self::Nametoolong => "Nametoolong", - Self::Noent => "Noent", - Self::Notdir => "Notdir", - Self::Nxio => "Nxio", - Self::Nodev => "Nodev", - Self::Rofs => "Rofs", - Self::Txtbsy => "Txtbsy", - Self::Fault => "Fault", - Self::Loop => "Loop", - Self::Nospc => "Nospc", - Self::Nomem => "Nomem", - Self::Mfile => "Mfile", - Self::Nfile => "Nfile", - Self::Badf => "Badf", - Self::Inval => "Inval", - Self::Pipe => "Pipe", - Self::Again => "Again", - Self::Intr => "Intr", - Self::Io => "Io", - Self::Perm => "Perm", - Self::Nosys => "Nosys", - Self::Failed => "Failed", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FileError { type GlibType = ffi::GFileError; @@ -568,24 +448,6 @@ pub enum KeyFileError { __Unknown(i32), } -impl fmt::Display for KeyFileError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "KeyFileError::{}", - match *self { - Self::UnknownEncoding => "UnknownEncoding", - Self::Parse => "Parse", - Self::NotFound => "NotFound", - Self::KeyNotFound => "KeyNotFound", - Self::GroupNotFound => "GroupNotFound", - Self::InvalidValue => "InvalidValue", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for KeyFileError { type GlibType = ffi::GKeyFileError; @@ -652,20 +514,6 @@ pub enum LogWriterOutput { __Unknown(i32), } -impl fmt::Display for LogWriterOutput { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "LogWriterOutput::{}", - match *self { - Self::Handled => "Handled", - Self::Unhandled => "Unhandled", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for LogWriterOutput { type GlibType = ffi::GLogWriterOutput; @@ -714,25 +562,6 @@ pub enum MarkupError { __Unknown(i32), } -impl fmt::Display for MarkupError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "MarkupError::{}", - match *self { - Self::BadUtf8 => "BadUtf8", - Self::Empty => "Empty", - Self::Parse => "Parse", - Self::UnknownElement => "UnknownElement", - Self::UnknownAttribute => "UnknownAttribute", - Self::InvalidContent => "InvalidContent", - Self::MissingAttribute => "MissingAttribute", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for MarkupError { type GlibType = ffi::GMarkupError; @@ -805,22 +634,6 @@ pub enum NormalizeMode { __Unknown(i32), } -impl fmt::Display for NormalizeMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "NormalizeMode::{}", - match *self { - Self::Default => "Default", - Self::DefaultCompose => "DefaultCompose", - Self::All => "All", - Self::AllCompose => "AllCompose", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for NormalizeMode { type GlibType = ffi::GNormalizeMode; @@ -877,27 +690,6 @@ pub enum OptionArg { __Unknown(i32), } -impl fmt::Display for OptionArg { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "OptionArg::{}", - match *self { - Self::None => "None", - Self::String => "String", - Self::Int => "Int", - Self::Callback => "Callback", - Self::Filename => "Filename", - Self::StringArray => "StringArray", - Self::FilenameArray => "FilenameArray", - Self::Double => "Double", - Self::Int64 => "Int64", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for OptionArg { type GlibType = ffi::GOptionArg; @@ -952,21 +744,6 @@ pub enum SeekType { __Unknown(i32), } -impl fmt::Display for SeekType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SeekType::{}", - match *self { - Self::Cur => "Cur", - Self::Set => "Set", - Self::End => "End", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SeekType { type GlibType = ffi::GSeekType; @@ -1009,21 +786,6 @@ pub enum TimeType { __Unknown(i32), } -impl fmt::Display for TimeType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TimeType::{}", - match *self { - Self::Standard => "Standard", - Self::Daylight => "Daylight", - Self::Universal => "Universal", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TimeType { type GlibType = ffi::GTimeType; @@ -1146,61 +908,6 @@ pub enum UnicodeBreakType { __Unknown(i32), } -impl fmt::Display for UnicodeBreakType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "UnicodeBreakType::{}", - match *self { - Self::Mandatory => "Mandatory", - Self::CarriageReturn => "CarriageReturn", - Self::LineFeed => "LineFeed", - Self::CombiningMark => "CombiningMark", - Self::Surrogate => "Surrogate", - Self::ZeroWidthSpace => "ZeroWidthSpace", - Self::Inseparable => "Inseparable", - Self::NonBreakingGlue => "NonBreakingGlue", - Self::Contingent => "Contingent", - Self::Space => "Space", - Self::After => "After", - Self::Before => "Before", - Self::BeforeAndAfter => "BeforeAndAfter", - Self::Hyphen => "Hyphen", - Self::NonStarter => "NonStarter", - Self::OpenPunctuation => "OpenPunctuation", - Self::ClosePunctuation => "ClosePunctuation", - Self::Quotation => "Quotation", - Self::Exclamation => "Exclamation", - Self::Ideographic => "Ideographic", - Self::Numeric => "Numeric", - Self::InfixSeparator => "InfixSeparator", - Self::Symbol => "Symbol", - Self::Alphabetic => "Alphabetic", - Self::Prefix => "Prefix", - Self::Postfix => "Postfix", - Self::ComplexContext => "ComplexContext", - Self::Ambiguous => "Ambiguous", - Self::Unknown => "Unknown", - Self::NextLine => "NextLine", - Self::WordJoiner => "WordJoiner", - Self::HangulLJamo => "HangulLJamo", - Self::HangulVJamo => "HangulVJamo", - Self::HangulTJamo => "HangulTJamo", - Self::HangulLvSyllable => "HangulLvSyllable", - Self::HangulLvtSyllable => "HangulLvtSyllable", - Self::CloseParenthesis => "CloseParenthesis", - Self::ConditionalJapaneseStarter => "ConditionalJapaneseStarter", - Self::HebrewLetter => "HebrewLetter", - Self::RegionalIndicator => "RegionalIndicator", - Self::EmojiBase => "EmojiBase", - Self::EmojiModifier => "EmojiModifier", - Self::ZeroWidthJoiner => "ZeroWidthJoiner", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for UnicodeBreakType { type GlibType = ffi::GUnicodeBreakType; @@ -1663,192 +1370,6 @@ pub enum UnicodeScript { __Unknown(i32), } -impl fmt::Display for UnicodeScript { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "UnicodeScript::{}", - match *self { - Self::InvalidCode => "InvalidCode", - Self::Common => "Common", - Self::Inherited => "Inherited", - Self::Arabic => "Arabic", - Self::Armenian => "Armenian", - Self::Bengali => "Bengali", - Self::Bopomofo => "Bopomofo", - Self::Cherokee => "Cherokee", - Self::Coptic => "Coptic", - Self::Cyrillic => "Cyrillic", - Self::Deseret => "Deseret", - Self::Devanagari => "Devanagari", - Self::Ethiopic => "Ethiopic", - Self::Georgian => "Georgian", - Self::Gothic => "Gothic", - Self::Greek => "Greek", - Self::Gujarati => "Gujarati", - Self::Gurmukhi => "Gurmukhi", - Self::Han => "Han", - Self::Hangul => "Hangul", - Self::Hebrew => "Hebrew", - Self::Hiragana => "Hiragana", - Self::Kannada => "Kannada", - Self::Katakana => "Katakana", - Self::Khmer => "Khmer", - Self::Lao => "Lao", - Self::Latin => "Latin", - Self::Malayalam => "Malayalam", - Self::Mongolian => "Mongolian", - Self::Myanmar => "Myanmar", - Self::Ogham => "Ogham", - Self::OldItalic => "OldItalic", - Self::Oriya => "Oriya", - Self::Runic => "Runic", - Self::Sinhala => "Sinhala", - Self::Syriac => "Syriac", - Self::Tamil => "Tamil", - Self::Telugu => "Telugu", - Self::Thaana => "Thaana", - Self::Thai => "Thai", - Self::Tibetan => "Tibetan", - Self::CanadianAboriginal => "CanadianAboriginal", - Self::Yi => "Yi", - Self::Tagalog => "Tagalog", - Self::Hanunoo => "Hanunoo", - Self::Buhid => "Buhid", - Self::Tagbanwa => "Tagbanwa", - Self::Braille => "Braille", - Self::Cypriot => "Cypriot", - Self::Limbu => "Limbu", - Self::Osmanya => "Osmanya", - Self::Shavian => "Shavian", - Self::LinearB => "LinearB", - Self::TaiLe => "TaiLe", - Self::Ugaritic => "Ugaritic", - Self::NewTaiLue => "NewTaiLue", - Self::Buginese => "Buginese", - Self::Glagolitic => "Glagolitic", - Self::Tifinagh => "Tifinagh", - Self::SylotiNagri => "SylotiNagri", - Self::OldPersian => "OldPersian", - Self::Kharoshthi => "Kharoshthi", - Self::Unknown => "Unknown", - Self::Balinese => "Balinese", - Self::Cuneiform => "Cuneiform", - Self::Phoenician => "Phoenician", - Self::PhagsPa => "PhagsPa", - Self::Nko => "Nko", - Self::KayahLi => "KayahLi", - Self::Lepcha => "Lepcha", - Self::Rejang => "Rejang", - Self::Sundanese => "Sundanese", - Self::Saurashtra => "Saurashtra", - Self::Cham => "Cham", - Self::OlChiki => "OlChiki", - Self::Vai => "Vai", - Self::Carian => "Carian", - Self::Lycian => "Lycian", - Self::Lydian => "Lydian", - Self::Avestan => "Avestan", - Self::Bamum => "Bamum", - Self::EgyptianHieroglyphs => "EgyptianHieroglyphs", - Self::ImperialAramaic => "ImperialAramaic", - Self::InscriptionalPahlavi => "InscriptionalPahlavi", - Self::InscriptionalParthian => "InscriptionalParthian", - Self::Javanese => "Javanese", - Self::Kaithi => "Kaithi", - Self::Lisu => "Lisu", - Self::MeeteiMayek => "MeeteiMayek", - Self::OldSouthArabian => "OldSouthArabian", - Self::OldTurkic => "OldTurkic", - Self::Samaritan => "Samaritan", - Self::TaiTham => "TaiTham", - Self::TaiViet => "TaiViet", - Self::Batak => "Batak", - Self::Brahmi => "Brahmi", - Self::Mandaic => "Mandaic", - Self::Chakma => "Chakma", - Self::MeroiticCursive => "MeroiticCursive", - Self::MeroiticHieroglyphs => "MeroiticHieroglyphs", - Self::Miao => "Miao", - Self::Sharada => "Sharada", - Self::SoraSompeng => "SoraSompeng", - Self::Takri => "Takri", - Self::BassaVah => "BassaVah", - Self::CaucasianAlbanian => "CaucasianAlbanian", - Self::Duployan => "Duployan", - Self::Elbasan => "Elbasan", - Self::Grantha => "Grantha", - Self::Khojki => "Khojki", - Self::Khudawadi => "Khudawadi", - Self::LinearA => "LinearA", - Self::Mahajani => "Mahajani", - Self::Manichaean => "Manichaean", - Self::MendeKikakui => "MendeKikakui", - Self::Modi => "Modi", - Self::Mro => "Mro", - Self::Nabataean => "Nabataean", - Self::OldNorthArabian => "OldNorthArabian", - Self::OldPermic => "OldPermic", - Self::PahawhHmong => "PahawhHmong", - Self::Palmyrene => "Palmyrene", - Self::PauCinHau => "PauCinHau", - Self::PsalterPahlavi => "PsalterPahlavi", - Self::Siddham => "Siddham", - Self::Tirhuta => "Tirhuta", - Self::WarangCiti => "WarangCiti", - Self::Ahom => "Ahom", - Self::AnatolianHieroglyphs => "AnatolianHieroglyphs", - Self::Hatran => "Hatran", - Self::Multani => "Multani", - Self::OldHungarian => "OldHungarian", - Self::Signwriting => "Signwriting", - Self::Adlam => "Adlam", - Self::Bhaiksuki => "Bhaiksuki", - Self::Marchen => "Marchen", - Self::Newa => "Newa", - Self::Osage => "Osage", - Self::Tangut => "Tangut", - Self::MasaramGondi => "MasaramGondi", - Self::Nushu => "Nushu", - Self::Soyombo => "Soyombo", - Self::ZanabazarSquare => "ZanabazarSquare", - Self::Dogra => "Dogra", - Self::GunjalaGondi => "GunjalaGondi", - Self::HanifiRohingya => "HanifiRohingya", - Self::Makasar => "Makasar", - Self::Medefaidrin => "Medefaidrin", - Self::OldSogdian => "OldSogdian", - Self::Sogdian => "Sogdian", - Self::Elymaic => "Elymaic", - Self::Nandinagari => "Nandinagari", - Self::NyiakengPuachueHmong => "NyiakengPuachueHmong", - Self::Wancho => "Wancho", - Self::Chorasmian => "Chorasmian", - Self::DivesAkuru => "DivesAkuru", - Self::KhitanSmallScript => "KhitanSmallScript", - Self::Yezidi => "Yezidi", - #[cfg(feature = "v2_72")] - Self::CyproMinoan => "CyproMinoan", - #[cfg(feature = "v2_72")] - Self::OldUyghur => "OldUyghur", - #[cfg(feature = "v2_72")] - Self::Tangsa => "Tangsa", - #[cfg(feature = "v2_72")] - Self::Toto => "Toto", - #[cfg(feature = "v2_72")] - Self::Vithkuqi => "Vithkuqi", - #[cfg(feature = "v2_72")] - Self::Math => "Math", - #[cfg(feature = "v2_74")] - Self::Kawi => "Kawi", - #[cfg(feature = "v2_74")] - Self::NagMundari => "NagMundari", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for UnicodeScript { type GlibType = ffi::GUnicodeScript; @@ -2285,48 +1806,6 @@ pub enum UnicodeType { __Unknown(i32), } -impl fmt::Display for UnicodeType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "UnicodeType::{}", - match *self { - Self::Control => "Control", - Self::Format => "Format", - Self::Unassigned => "Unassigned", - Self::PrivateUse => "PrivateUse", - Self::Surrogate => "Surrogate", - Self::LowercaseLetter => "LowercaseLetter", - Self::ModifierLetter => "ModifierLetter", - Self::OtherLetter => "OtherLetter", - Self::TitlecaseLetter => "TitlecaseLetter", - Self::UppercaseLetter => "UppercaseLetter", - Self::SpacingMark => "SpacingMark", - Self::EnclosingMark => "EnclosingMark", - Self::NonSpacingMark => "NonSpacingMark", - Self::DecimalNumber => "DecimalNumber", - Self::LetterNumber => "LetterNumber", - Self::OtherNumber => "OtherNumber", - Self::ConnectPunctuation => "ConnectPunctuation", - Self::DashPunctuation => "DashPunctuation", - Self::ClosePunctuation => "ClosePunctuation", - Self::FinalPunctuation => "FinalPunctuation", - Self::InitialPunctuation => "InitialPunctuation", - Self::OtherPunctuation => "OtherPunctuation", - Self::OpenPunctuation => "OpenPunctuation", - Self::CurrencySymbol => "CurrencySymbol", - Self::ModifierSymbol => "ModifierSymbol", - Self::MathSymbol => "MathSymbol", - Self::OtherSymbol => "OtherSymbol", - Self::LineSeparator => "LineSeparator", - Self::ParagraphSeparator => "ParagraphSeparator", - Self::SpaceSeparator => "SpaceSeparator", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for UnicodeType { type GlibType = ffi::GUnicodeType; @@ -2437,30 +1916,6 @@ pub enum UriError { __Unknown(i32), } -#[cfg(feature = "v2_66")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] -impl fmt::Display for UriError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "UriError::{}", - match *self { - Self::Failed => "Failed", - Self::BadScheme => "BadScheme", - Self::BadUser => "BadUser", - Self::BadPassword => "BadPassword", - Self::BadAuthParams => "BadAuthParams", - Self::BadHost => "BadHost", - Self::BadPort => "BadPort", - Self::BadPath => "BadPath", - Self::BadQuery => "BadQuery", - Self::BadFragment => "BadFragment", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] @@ -2574,36 +2029,6 @@ pub enum VariantClass { __Unknown(i32), } -impl fmt::Display for VariantClass { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "VariantClass::{}", - match *self { - Self::Boolean => "Boolean", - Self::Byte => "Byte", - Self::Int16 => "Int16", - Self::Uint16 => "Uint16", - Self::Int32 => "Int32", - Self::Uint32 => "Uint32", - Self::Int64 => "Int64", - Self::Uint64 => "Uint64", - Self::Handle => "Handle", - Self::Double => "Double", - Self::String => "String", - Self::ObjectPath => "ObjectPath", - Self::Signature => "Signature", - Self::Variant => "Variant", - Self::Maybe => "Maybe", - Self::Array => "Array", - Self::Tuple => "Tuple", - Self::DictEntry => "DictEntry", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for VariantClass { type GlibType = ffi::GVariantClass; diff --git a/glib/src/auto/flags.rs b/glib/src/auto/flags.rs index 172a740f9b8f..28fcb8142031 100644 --- a/glib/src/auto/flags.rs +++ b/glib/src/auto/flags.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; #[cfg(feature = "v2_66")] bitflags! { @@ -22,14 +21,6 @@ bitflags! { } } -#[cfg(feature = "v2_66")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] -impl fmt::Display for FileSetContentsFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] @@ -69,12 +60,6 @@ bitflags! { } } -impl fmt::Display for FileTest { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FileTest { type GlibType = ffi::GFileTest; @@ -116,12 +101,6 @@ bitflags! { } } -impl fmt::Display for FormatSizeFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FormatSizeFlags { type GlibType = ffi::GFormatSizeFlags; @@ -159,12 +138,6 @@ bitflags! { } } -impl fmt::Display for IOCondition { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for IOCondition { type GlibType = ffi::GIOCondition; @@ -185,6 +158,7 @@ impl FromGlib for IOCondition { impl StaticType for IOCondition { #[inline] + #[doc(alias = "g_io_condition_get_type")] fn static_type() -> crate::Type { unsafe { from_glib(ffi::g_io_condition_get_type()) } } @@ -196,7 +170,7 @@ impl crate::HasParamSpec for IOCondition { type BuilderFn = fn(&str) -> crate::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -251,12 +225,6 @@ bitflags! { } } -impl fmt::Display for KeyFileFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for KeyFileFlags { type GlibType = ffi::GKeyFileFlags; @@ -300,12 +268,6 @@ bitflags! { } } -impl fmt::Display for LogLevelFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for LogLevelFlags { type GlibType = ffi::GLogLevelFlags; @@ -337,14 +299,6 @@ bitflags! { } } -#[cfg(feature = "v2_72")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] -impl fmt::Display for MainContextFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(hidden)] @@ -390,12 +344,6 @@ bitflags! { } } -impl fmt::Display for OptionFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for OptionFlags { type GlibType = ffi::GOptionFlags; @@ -453,12 +401,6 @@ bitflags! { } } -impl fmt::Display for SpawnFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for SpawnFlags { type GlibType = ffi::GSpawnFlags; @@ -506,14 +448,6 @@ bitflags! { } } -#[cfg(feature = "v2_66")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] -impl fmt::Display for UriFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] @@ -557,14 +491,6 @@ bitflags! { } } -#[cfg(feature = "v2_66")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] -impl fmt::Display for UriHideFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] @@ -604,14 +530,6 @@ bitflags! { } } -#[cfg(feature = "v2_66")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] -impl fmt::Display for UriParamsFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] diff --git a/glib/src/auto/functions.rs b/glib/src/auto/functions.rs index ef2e4ff1592e..f5baefcd7e87 100644 --- a/glib/src/auto/functions.rs +++ b/glib/src/auto/functions.rs @@ -9,7 +9,7 @@ use crate::{ translate::*, Bytes, ChecksumType, Error, FileTest, FormatSizeFlags, Pid, Source, SpawnFlags, UnicodeScript, UserDirectory, }; -use std::{boxed::Box as Box_, mem, ptr}; +use std::boxed::Box as Box_; #[doc(alias = "g_access")] pub fn access(filename: impl AsRef, mode: i32) -> i32 { @@ -19,7 +19,7 @@ pub fn access(filename: impl AsRef, mode: i32) -> i32 { #[doc(alias = "g_base64_decode")] pub fn base64_decode(text: &str) -> Vec { unsafe { - let mut out_len = mem::MaybeUninit::uninit(); + let mut out_len = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( ffi::g_base64_decode(text.to_glib_none().0, out_len.as_mut_ptr()), out_len.assume_init() as _, @@ -194,7 +194,7 @@ pub fn file_set_contents( ) -> Result<(), crate::Error> { let length = contents.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_contents( filename.as_ref().to_glib_none().0, contents.to_glib_none().0, @@ -221,7 +221,7 @@ pub fn file_set_contents_full( ) -> Result<(), crate::Error> { let length = contents.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_set_contents_full( filename.as_ref().to_glib_none().0, contents.to_glib_none().0, @@ -273,8 +273,8 @@ pub fn filename_from_uri( uri: &str, ) -> Result<(std::path::PathBuf, Option), crate::Error> { unsafe { - let mut hostname = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut hostname = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_filename_from_uri(uri.to_glib_none().0, &mut hostname, &mut error); if error.is_null() { Ok((from_glib_full(ret), from_glib_full(hostname))) @@ -290,7 +290,7 @@ pub fn filename_to_uri( hostname: Option<&str>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_filename_to_uri( filename.as_ref().to_glib_none().0, hostname.to_glib_none().0, @@ -341,7 +341,7 @@ pub fn codeset() -> crate::GString { #[doc(alias = "get_console_charset")] pub fn console_charset() -> Option { unsafe { - let mut charset = ptr::null(); + let mut charset = std::ptr::null(); let ret = from_glib(ffi::g_get_console_charset(&mut charset)); if ret { Some(from_glib_none(charset)) @@ -650,9 +650,9 @@ pub fn shell_parse_argv( command_line: impl AsRef, ) -> Result, crate::Error> { unsafe { - let mut argcp = mem::MaybeUninit::uninit(); - let mut argvp = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut argcp = std::mem::MaybeUninit::uninit(); + let mut argvp = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_shell_parse_argv( command_line.as_ref().to_glib_none().0, argcp.as_mut_ptr(), @@ -685,7 +685,7 @@ pub fn shell_unquote( quoted_string: impl AsRef, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_shell_unquote(quoted_string.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -721,8 +721,8 @@ pub fn spawn_async( }; let super_callback0: Box_>> = child_setup_data; unsafe { - let mut child_pid = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut child_pid = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_spawn_async( working_directory .as_ref() @@ -758,7 +758,7 @@ pub fn spawn_async( #[doc(alias = "g_spawn_check_exit_status")] pub fn spawn_check_exit_status(wait_status: i32) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_spawn_check_exit_status(wait_status, &mut error); debug_assert_eq!(is_ok == crate::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -774,7 +774,7 @@ pub fn spawn_check_exit_status(wait_status: i32) -> Result<(), crate::Error> { #[doc(alias = "g_spawn_check_wait_status")] pub fn spawn_check_wait_status(wait_status: i32) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_spawn_check_wait_status(wait_status, &mut error); debug_assert_eq!(is_ok == crate::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -792,7 +792,7 @@ pub fn spawn_command_line_async( command_line: impl AsRef, ) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_spawn_command_line_async(command_line.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == crate::ffi::GFALSE, !error.is_null()); @@ -810,7 +810,7 @@ pub fn spawn_command_line_async( //} //#[doc(alias = "g_spawn_sync")] -//pub fn spawn_sync(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option>, standard_output: Vec, standard_error: Vec) -> Result { +//pub fn spawn_sync(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option<&mut dyn (FnMut())>, standard_output: Vec, standard_error: Vec) -> Result { // unsafe { TODO: call ffi:g_spawn_sync() } //} diff --git a/glib/src/auto/key_file.rs b/glib/src/auto/key_file.rs index 8c7986eb9159..eb8e64d202cd 100644 --- a/glib/src/auto/key_file.rs +++ b/glib/src/auto/key_file.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{translate::*, Bytes, Error, KeyFileFlags}; -use std::{mem, ptr}; crate::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -30,7 +29,7 @@ impl KeyFile { key: Option<&str>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_comment( self.to_glib_none().0, group_name.to_glib_none().0, @@ -49,7 +48,7 @@ impl KeyFile { #[doc(alias = "get_double")] pub fn double(&self, group_name: &str, key: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_double( self.to_glib_none().0, group_name.to_glib_none().0, @@ -68,8 +67,8 @@ impl KeyFile { #[doc(alias = "get_double_list")] pub fn double_list(&self, group_name: &str, key: &str) -> Result, crate::Error> { unsafe { - let mut length = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut length = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_double_list( self.to_glib_none().0, group_name.to_glib_none().0, @@ -92,7 +91,7 @@ impl KeyFile { #[doc(alias = "get_int64")] pub fn int64(&self, group_name: &str, key: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_int64( self.to_glib_none().0, group_name.to_glib_none().0, @@ -111,7 +110,7 @@ impl KeyFile { #[doc(alias = "get_integer")] pub fn integer(&self, group_name: &str, key: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_integer( self.to_glib_none().0, group_name.to_glib_none().0, @@ -130,8 +129,8 @@ impl KeyFile { #[doc(alias = "get_integer_list")] pub fn integer_list(&self, group_name: &str, key: &str) -> Result, crate::Error> { unsafe { - let mut length = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut length = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_integer_list( self.to_glib_none().0, group_name.to_glib_none().0, @@ -178,7 +177,7 @@ impl KeyFile { #[doc(alias = "get_uint64")] pub fn uint64(&self, group_name: &str, key: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_uint64( self.to_glib_none().0, group_name.to_glib_none().0, @@ -197,7 +196,7 @@ impl KeyFile { #[doc(alias = "get_value")] pub fn value(&self, group_name: &str, key: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_key_file_get_value( self.to_glib_none().0, group_name.to_glib_none().0, @@ -225,7 +224,7 @@ impl KeyFile { #[doc(alias = "g_key_file_load_from_bytes")] pub fn load_from_bytes(&self, bytes: &Bytes, flags: KeyFileFlags) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_key_file_load_from_bytes( self.to_glib_none().0, bytes.to_glib_none().0, @@ -245,7 +244,7 @@ impl KeyFile { pub fn load_from_data(&self, data: &str, flags: KeyFileFlags) -> Result<(), crate::Error> { let length = data.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_key_file_load_from_data( self.to_glib_none().0, data.to_glib_none().0, @@ -269,7 +268,7 @@ impl KeyFile { flags: KeyFileFlags, ) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_key_file_load_from_file( self.to_glib_none().0, file.as_ref().to_glib_none().0, @@ -292,7 +291,7 @@ impl KeyFile { key: Option<&str>, ) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_key_file_remove_comment( self.to_glib_none().0, group_name.to_glib_none().0, @@ -311,7 +310,7 @@ impl KeyFile { #[doc(alias = "g_key_file_remove_group")] pub fn remove_group(&self, group_name: &str) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_key_file_remove_group( self.to_glib_none().0, group_name.to_glib_none().0, @@ -329,7 +328,7 @@ impl KeyFile { #[doc(alias = "g_key_file_remove_key")] pub fn remove_key(&self, group_name: &str, key: &str) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_key_file_remove_key( self.to_glib_none().0, group_name.to_glib_none().0, @@ -370,7 +369,7 @@ impl KeyFile { comment: &str, ) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_key_file_set_comment( self.to_glib_none().0, group_name.to_glib_none().0, diff --git a/glib/src/auto/markup_parse_context.rs b/glib/src/auto/markup_parse_context.rs index f071797ff5f6..bfaf48b87711 100644 --- a/glib/src/auto/markup_parse_context.rs +++ b/glib/src/auto/markup_parse_context.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{translate::*, Error}; -use std::{mem, ptr}; crate::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -25,7 +24,7 @@ impl MarkupParseContext { #[doc(alias = "g_markup_parse_context_end_parse")] pub fn end_parse(&self) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_markup_parse_context_end_parse(self.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == crate::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -56,8 +55,8 @@ impl MarkupParseContext { #[doc(alias = "get_position")] pub fn position(&self) -> (i32, i32) { unsafe { - let mut line_number = mem::MaybeUninit::uninit(); - let mut char_number = mem::MaybeUninit::uninit(); + let mut line_number = std::mem::MaybeUninit::uninit(); + let mut char_number = std::mem::MaybeUninit::uninit(); ffi::g_markup_parse_context_get_position( self.to_glib_none().0, line_number.as_mut_ptr(), @@ -71,7 +70,7 @@ impl MarkupParseContext { pub fn parse(&self, text: &str) -> Result<(), crate::Error> { let text_len = text.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_markup_parse_context_parse( self.to_glib_none().0, text.to_glib_none().0, diff --git a/glib/src/auto/mod.rs b/glib/src/auto/mod.rs index bbe89c83a522..2d4e5fd2678f 100644 --- a/glib/src/auto/mod.rs +++ b/glib/src/auto/mod.rs @@ -83,7 +83,7 @@ pub use self::alias::DateDay; pub use self::alias::DateYear; pub use self::alias::Time; -pub mod functions; +pub(crate) mod functions; mod constants; pub use self::constants::CSET_a_2_z; diff --git a/glib/src/auto/uri.rs b/glib/src/auto/uri.rs index d1e2c37967d1..1b05eda1a974 100644 --- a/glib/src/auto/uri.rs +++ b/glib/src/auto/uri.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{translate::*, Bytes, Error, UriFlags, UriHideFlags}; -use std::{fmt, mem, ptr}; crate::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -86,7 +85,7 @@ impl Uri { #[doc(alias = "g_uri_parse_relative")] pub fn parse_relative(&self, uri_ref: &str, flags: UriFlags) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_uri_parse_relative( self.to_glib_none().0, uri_ref.to_glib_none().0, @@ -201,7 +200,7 @@ impl Uri { #[doc(alias = "g_uri_is_valid")] pub fn is_valid(uri_string: &str, flags: UriFlags) -> Result<(), crate::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_uri_is_valid(uri_string.to_glib_none().0, flags.into_glib(), &mut error); debug_assert_eq!(is_ok == crate::ffi::GFALSE, !error.is_null()); @@ -279,7 +278,7 @@ impl Uri { #[doc(alias = "g_uri_parse")] pub fn parse(uri_string: &str, flags: UriFlags) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_uri_parse(uri_string.to_glib_none().0, flags.into_glib(), &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -311,7 +310,7 @@ impl Uri { flags: UriFlags, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_uri_resolve_relative( base_uri_string.to_glib_none().0, uri_ref.to_glib_none().0, @@ -343,14 +342,14 @@ impl Uri { crate::Error, > { unsafe { - let mut scheme = ptr::null_mut(); - let mut userinfo = ptr::null_mut(); - let mut host = ptr::null_mut(); - let mut port = mem::MaybeUninit::uninit(); - let mut path = ptr::null_mut(); - let mut query = ptr::null_mut(); - let mut fragment = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut scheme = std::ptr::null_mut(); + let mut userinfo = std::ptr::null_mut(); + let mut host = std::ptr::null_mut(); + let mut port = std::mem::MaybeUninit::uninit(); + let mut path = std::ptr::null_mut(); + let mut query = std::ptr::null_mut(); + let mut fragment = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_uri_split( uri_ref.to_glib_none().0, flags.into_glib(), @@ -386,10 +385,10 @@ impl Uri { flags: UriFlags, ) -> Result<(Option, Option, i32), crate::Error> { unsafe { - let mut scheme = ptr::null_mut(); - let mut host = ptr::null_mut(); - let mut port = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut scheme = std::ptr::null_mut(); + let mut host = std::ptr::null_mut(); + let mut port = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_uri_split_network( uri_string.to_glib_none().0, flags.into_glib(), @@ -430,16 +429,16 @@ impl Uri { crate::Error, > { unsafe { - let mut scheme = ptr::null_mut(); - let mut user = ptr::null_mut(); - let mut password = ptr::null_mut(); - let mut auth_params = ptr::null_mut(); - let mut host = ptr::null_mut(); - let mut port = mem::MaybeUninit::uninit(); - let mut path = ptr::null_mut(); - let mut query = ptr::null_mut(); - let mut fragment = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut scheme = std::ptr::null_mut(); + let mut user = std::ptr::null_mut(); + let mut password = std::ptr::null_mut(); + let mut auth_params = std::ptr::null_mut(); + let mut host = std::ptr::null_mut(); + let mut port = std::mem::MaybeUninit::uninit(); + let mut path = std::ptr::null_mut(); + let mut query = std::ptr::null_mut(); + let mut fragment = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::g_uri_split_with_user( uri_ref.to_glib_none().0, flags.into_glib(), @@ -480,7 +479,7 @@ impl Uri { ) -> Result { let length = escaped_string.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::g_uri_unescape_bytes( escaped_string.to_glib_none().0, length, @@ -524,9 +523,9 @@ impl Uri { } } -impl fmt::Display for Uri { +impl std::fmt::Display for Uri { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index dd6ac754e173..59401b409365 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/glib/src/boxed.rs b/glib/src/boxed.rs index 10eb8c098064..c32da21610f6 100644 --- a/glib/src/boxed.rs +++ b/glib/src/boxed.rs @@ -550,7 +550,7 @@ impl> fmt::Debug for Boxed impl> PartialOrd for Boxed { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.to_glib_none().0.partial_cmp(&other.to_glib_none().0) + Some(self.cmp(other)) } } diff --git a/glib/src/bytes.rs b/glib/src/bytes.rs index 43444c41ca81..8f02125a530f 100644 --- a/glib/src/bytes.rs +++ b/glib/src/bytes.rs @@ -147,13 +147,7 @@ impl Eq for Bytes {} impl PartialOrd for Bytes { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - unsafe { - let ret = ffi::g_bytes_compare( - ToGlibPtr::<*const _>::to_glib_none(self).0 as *const _, - ToGlibPtr::<*const _>::to_glib_none(other).0 as *const _, - ); - ret.partial_cmp(&0) - } + Some(self.cmp(other)) } } diff --git a/glib/src/collections/strv.rs b/glib/src/collections/strv.rs index 5a2ee41e7ea3..85b288e23b0e 100644 --- a/glib/src/collections/strv.rs +++ b/glib/src/collections/strv.rs @@ -46,7 +46,7 @@ impl Eq for StrV {} impl PartialOrd for StrV { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.as_slice().partial_cmp(other.as_slice()) + Some(self.cmp(other)) } } diff --git a/glib/src/date.rs b/glib/src/date.rs index 5a310ec8fb60..60a90ef445ee 100644 --- a/glib/src/date.rs +++ b/glib/src/date.rs @@ -395,7 +395,7 @@ impl Eq for Date {} impl PartialOrd for Date { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.compare(other).partial_cmp(&0) + Some(self.cmp(other)) } } diff --git a/glib/src/enums.rs b/glib/src/enums.rs index 5df6b4e8a3d9..2c59236eea62 100644 --- a/glib/src/enums.rs +++ b/glib/src/enums.rs @@ -280,7 +280,7 @@ impl Eq for EnumValue {} impl PartialOrd for EnumValue { fn partial_cmp(&self, other: &Self) -> Option { - self.value().partial_cmp(&other.value()) + Some(self.cmp(other)) } } diff --git a/glib/src/manual_functions.rs b/glib/src/functions.rs similarity index 99% rename from glib/src/manual_functions.rs rename to glib/src/functions.rs index 0344f2f9f9c7..5b3d65ad3fc1 100644 --- a/glib/src/manual_functions.rs +++ b/glib/src/functions.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +pub use crate::auto::functions::*; #[cfg(not(windows))] use std::boxed::Box as Box_; #[cfg(not(windows))] diff --git a/glib/src/gobject/auto/binding.rs b/glib/src/gobject/auto/binding.rs index af6bcaf0a8eb..0b99392db0da 100644 --- a/glib/src/gobject/auto/binding.rs +++ b/glib/src/gobject/auto/binding.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{translate::*, BindingFlags}; -use std::fmt; crate::wrapper! { #[doc(alias = "GBinding")] @@ -51,9 +50,3 @@ impl Binding { unsafe impl Send for Binding {} unsafe impl Sync for Binding {} - -impl fmt::Display for Binding { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Binding") - } -} diff --git a/glib/src/gobject/auto/binding_group.rs b/glib/src/gobject/auto/binding_group.rs index 72137e55670f..2bf935c44c91 100644 --- a/glib/src/gobject/auto/binding_group.rs +++ b/glib/src/gobject/auto/binding_group.rs @@ -8,7 +8,7 @@ use crate::{ translate::*, Object, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; crate::wrapper! { #[doc(alias = "GBindingGroup")] @@ -67,7 +67,7 @@ impl BindingGroup { connect_raw( self.as_ptr() as *mut _, b"notify::source\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_source_trampoline:: as *const (), )), Box_::into_raw(f), @@ -86,9 +86,3 @@ impl Default for BindingGroup { unsafe impl Send for BindingGroup {} unsafe impl Sync for BindingGroup {} - -impl fmt::Display for BindingGroup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BindingGroup") - } -} diff --git a/glib/src/gobject/auto/flags.rs b/glib/src/gobject/auto/flags.rs index 8b8d88cdd8c6..b2f870c463e0 100644 --- a/glib/src/gobject/auto/flags.rs +++ b/glib/src/gobject/auto/flags.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -20,12 +19,6 @@ bitflags! { } } -impl fmt::Display for BindingFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for BindingFlags { type GlibType = gobject_ffi::GBindingFlags; @@ -46,6 +39,7 @@ impl FromGlib for BindingFlags { impl StaticType for BindingFlags { #[inline] + #[doc(alias = "g_binding_flags_get_type")] fn static_type() -> crate::Type { unsafe { from_glib(gobject_ffi::g_binding_flags_get_type()) } } @@ -57,7 +51,7 @@ impl crate::HasParamSpec for BindingFlags { type BuilderFn = fn(&str) -> crate::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -126,12 +120,6 @@ bitflags! { } } -impl fmt::Display for SignalFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for SignalFlags { type GlibType = gobject_ffi::GSignalFlags; diff --git a/glib/src/gobject/auto/signal_group.rs b/glib/src/gobject/auto/signal_group.rs index 1a8a37081132..7c6ec1361e46 100644 --- a/glib/src/gobject/auto/signal_group.rs +++ b/glib/src/gobject/auto/signal_group.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::{prelude::*, translate::*, Object}; -use std::fmt; crate::wrapper! { #[doc(alias = "GSignalGroup")] @@ -65,9 +64,3 @@ impl SignalGroup { unsafe impl Send for SignalGroup {} unsafe impl Sync for SignalGroup {} - -impl fmt::Display for SignalGroup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SignalGroup") - } -} diff --git a/glib/src/gstring.rs b/glib/src/gstring.rs index 99d2ae440405..1d1bc95b5c9e 100644 --- a/glib/src/gstring.rs +++ b/glib/src/gstring.rs @@ -364,7 +364,7 @@ impl Eq for GStr {} impl PartialOrd for GStr { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.as_str().partial_cmp(other.as_str()) + Some(self.cmp(other)) } } @@ -866,7 +866,7 @@ impl PartialEq for GStr { impl PartialOrd for GStringPtr { #[inline] fn partial_cmp(&self, other: &GStringPtr) -> Option { - Some(unsafe { GStringPtr::strcmp(self.as_ptr(), other.as_ptr()) }) + Some(self.cmp(other)) } } @@ -1240,7 +1240,7 @@ impl GString { pub fn as_gstr(&self) -> &GStr { let bytes = match self.0 { Inner::Native(ref s) => s.as_bytes(), - Inner::Foreign { len, .. } if len == 0 => &[0], + Inner::Foreign { len: 0, .. } => &[0], Inner::Foreign { ptr, len } => unsafe { slice::from_raw_parts(ptr.as_ptr() as *const _, len + 1) }, diff --git a/glib/src/lib.rs b/glib/src/lib.rs index 94edce5fccba..8daf84acfb57 100644 --- a/glib/src/lib.rs +++ b/glib/src/lib.rs @@ -108,7 +108,7 @@ pub use collections::{ ptr_slice::IntoPtrSlice, strv::IntoStrV, List, PtrSlice, SList, Slice, StrV, }; -pub use self::auto::{functions::*, *}; +pub use self::auto::*; #[allow(clippy::too_many_arguments)] #[allow(clippy::type_complexity)] #[allow(unused_imports)] @@ -129,8 +129,8 @@ pub mod closure; mod convert; pub use self::convert::*; mod enums; -mod manual_functions; -pub use self::manual_functions::*; +mod functions; +pub use self::functions::*; mod key_file; pub mod prelude; pub mod signal; diff --git a/glib/src/object.rs b/glib/src/object.rs index c26fb8a31610..cfacf5382f80 100644 --- a/glib/src/object.rs +++ b/glib/src/object.rs @@ -412,7 +412,7 @@ impl fmt::Debug for ObjectRef { impl PartialOrd for ObjectRef { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.inner.partial_cmp(&other.inner) + Some(self.cmp(other)) } } @@ -579,7 +579,7 @@ impl fmt::Debug for TypedObjectRef { impl PartialOrd for TypedObjectRef { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.inner.partial_cmp(&other.inner) + Some(self.cmp(other)) } } diff --git a/glib/src/shared.rs b/glib/src/shared.rs index 875078c64f7d..3e600a384664 100644 --- a/glib/src/shared.rs +++ b/glib/src/shared.rs @@ -495,7 +495,7 @@ impl> fmt::Debug for Shared { impl> PartialOrd for Shared { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.inner.partial_cmp(&other.inner) + Some(self.cmp(other)) } } diff --git a/glib/src/subclass/object_impl_ref.rs b/glib/src/subclass/object_impl_ref.rs index 79594aa4db88..6a7534659030 100644 --- a/glib/src/subclass/object_impl_ref.rs +++ b/glib/src/subclass/object_impl_ref.rs @@ -71,7 +71,7 @@ impl Downgrade for ObjectImplRef { impl PartialOrd for ObjectImplRef { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/glib/src/subclass/signal.rs b/glib/src/subclass/signal.rs index 2ea40cbb8f13..79f2a4e23917 100644 --- a/glib/src/subclass/signal.rs +++ b/glib/src/subclass/signal.rs @@ -331,16 +331,6 @@ impl std::fmt::Debug for SignalType { } } -impl std::fmt::Display for SignalType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - let type_: Type = (*self).into(); - f.debug_struct("SignalType") - .field("name", &type_.name()) - .field("static_scope", &self.static_scope()) - .finish() - } -} - #[doc(hidden)] impl FromGlib for SignalType { #[inline] diff --git a/glib/sys/Cargo.toml b/glib/sys/Cargo.toml index 79f83e03cb87..a64b5fa739a9 100644 --- a/glib/sys/Cargo.toml +++ b/glib/sys/Cargo.toml @@ -37,12 +37,6 @@ version = "0.19.0" edition = "2021" rust-version = "1.70" -[package.metadata.docs.rs] -all-features = true -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] -features = [] - [package.metadata.system-deps.glib_2_0] name = "glib-2.0" version = "2.56" @@ -89,3 +83,8 @@ version = "2.58" [package.metadata.system-deps.gobject_2_0.v2_62] version = "2.62" + +[package.metadata.docs.rs] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +all-features = true diff --git a/glib/sys/Gir.toml b/glib/sys/Gir.toml index 8e3491012148..c5c66fec5fe3 100644 --- a/glib/sys/Gir.toml +++ b/glib/sys/Gir.toml @@ -100,9 +100,6 @@ status = "generate" [[object.function]] name = "assertion_message_cmpint" version = "2.78" - [[object.function]] - name = "test_disable_crash_reporting" - version = "2.78" [[object]] name = "GLib.LOG_DOMAIN" diff --git a/glib/sys/tests/abi.rs b/glib/sys/tests/abi.rs index d51c85d30101..a33ffcb849fe 100644 --- a/glib/sys/tests/abi.rs +++ b/glib/sys/tests/abi.rs @@ -10,7 +10,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -70,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index dd6ac754e173..59401b409365 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/graphene/src/auto/enums.rs b/graphene/src/auto/enums.rs index 4ab6dd1a33e8..5f210693d10b 100644 --- a/graphene/src/auto/enums.rs +++ b/graphene/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -75,49 +74,6 @@ pub enum EulerOrder { __Unknown(i32), } -impl fmt::Display for EulerOrder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "EulerOrder::{}", - match *self { - Self::Default => "Default", - Self::Xyz => "Xyz", - Self::Yzx => "Yzx", - Self::Zxy => "Zxy", - Self::Xzy => "Xzy", - Self::Yxz => "Yxz", - Self::Zyx => "Zyx", - Self::Sxyz => "Sxyz", - Self::Sxyx => "Sxyx", - Self::Sxzy => "Sxzy", - Self::Sxzx => "Sxzx", - Self::Syzx => "Syzx", - Self::Syzy => "Syzy", - Self::Syxz => "Syxz", - Self::Syxy => "Syxy", - Self::Szxy => "Szxy", - Self::Szxz => "Szxz", - Self::Szyx => "Szyx", - Self::Szyz => "Szyz", - Self::Rzyx => "Rzyx", - Self::Rxyx => "Rxyx", - Self::Ryzx => "Ryzx", - Self::Rxzx => "Rxzx", - Self::Rxzy => "Rxzy", - Self::Ryzy => "Ryzy", - Self::Rzxy => "Rzxy", - Self::Ryxy => "Ryxy", - Self::Ryxz => "Ryxz", - Self::Rzxz => "Rzxz", - Self::Rxyz => "Rxyz", - Self::Rzyz => "Rzyz", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for EulerOrder { type GlibType = ffi::graphene_euler_order_t; @@ -216,21 +172,6 @@ pub enum RayIntersectionKind { __Unknown(i32), } -impl fmt::Display for RayIntersectionKind { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "RayIntersectionKind::{}", - match *self { - Self::None => "None", - Self::Enter => "Enter", - Self::Leave => "Leave", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for RayIntersectionKind { type GlibType = ffi::graphene_ray_intersection_kind_t; diff --git a/graphene/src/auto/matrix.rs b/graphene/src/auto/matrix.rs index d4838f551b67..e4044273e793 100644 --- a/graphene/src/auto/matrix.rs +++ b/graphene/src/auto/matrix.rs @@ -4,7 +4,6 @@ use crate::{Box, Euler, Point, Point3D, Quad, Quaternion, Ray, Rect, Sphere, Vec3, Vec4}; use glib::translate::*; -use std::mem; glib::wrapper! { pub struct Matrix(BoxedInline); @@ -318,12 +317,12 @@ impl Matrix { #[doc(alias = "graphene_matrix_to_2d")] pub fn to_2d(&self) -> Option<(f64, f64, f64, f64, f64, f64)> { unsafe { - let mut xx = mem::MaybeUninit::uninit(); - let mut yx = mem::MaybeUninit::uninit(); - let mut xy = mem::MaybeUninit::uninit(); - let mut yy = mem::MaybeUninit::uninit(); - let mut x_0 = mem::MaybeUninit::uninit(); - let mut y_0 = mem::MaybeUninit::uninit(); + let mut xx = std::mem::MaybeUninit::uninit(); + let mut yx = std::mem::MaybeUninit::uninit(); + let mut xy = std::mem::MaybeUninit::uninit(); + let mut yy = std::mem::MaybeUninit::uninit(); + let mut x_0 = std::mem::MaybeUninit::uninit(); + let mut y_0 = std::mem::MaybeUninit::uninit(); let ret = ffi::graphene_matrix_to_2d( self.to_glib_none().0, xx.as_mut_ptr(), diff --git a/graphene/src/auto/point.rs b/graphene/src/auto/point.rs index d63cd1e18e38..1363f8a5dfd2 100644 --- a/graphene/src/auto/point.rs +++ b/graphene/src/auto/point.rs @@ -4,7 +4,6 @@ use crate::Vec2; use glib::translate::*; -use std::mem; glib::wrapper! { pub struct Point(BoxedInline); @@ -20,8 +19,8 @@ impl Point { #[doc(alias = "graphene_point_distance")] pub fn distance(&self, b: &Point) -> (f32, f32, f32) { unsafe { - let mut d_x = mem::MaybeUninit::uninit(); - let mut d_y = mem::MaybeUninit::uninit(); + let mut d_x = std::mem::MaybeUninit::uninit(); + let mut d_y = std::mem::MaybeUninit::uninit(); let ret = ffi::graphene_point_distance( self.to_glib_none().0, b.to_glib_none().0, diff --git a/graphene/src/auto/quaternion.rs b/graphene/src/auto/quaternion.rs index ffdfc055c3b5..b0f0d7852af9 100644 --- a/graphene/src/auto/quaternion.rs +++ b/graphene/src/auto/quaternion.rs @@ -4,7 +4,6 @@ use crate::{Matrix, Vec3, Vec4}; use glib::translate::*; -use std::mem; glib::wrapper! { pub struct Quaternion(BoxedInline); @@ -103,7 +102,7 @@ impl Quaternion { #[doc(alias = "graphene_quaternion_to_angle_vec3")] pub fn to_angle_vec3(&self) -> (f32, Vec3) { unsafe { - let mut angle = mem::MaybeUninit::uninit(); + let mut angle = std::mem::MaybeUninit::uninit(); let mut axis = Vec3::uninitialized(); ffi::graphene_quaternion_to_angle_vec3( self.to_glib_none().0, @@ -117,9 +116,9 @@ impl Quaternion { #[doc(alias = "graphene_quaternion_to_angles")] pub fn to_angles(&self) -> (f32, f32, f32) { unsafe { - let mut deg_x = mem::MaybeUninit::uninit(); - let mut deg_y = mem::MaybeUninit::uninit(); - let mut deg_z = mem::MaybeUninit::uninit(); + let mut deg_x = std::mem::MaybeUninit::uninit(); + let mut deg_y = std::mem::MaybeUninit::uninit(); + let mut deg_z = std::mem::MaybeUninit::uninit(); ffi::graphene_quaternion_to_angles( self.to_glib_none().0, deg_x.as_mut_ptr(), @@ -146,9 +145,9 @@ impl Quaternion { #[doc(alias = "graphene_quaternion_to_radians")] pub fn to_radians(&self) -> (f32, f32, f32) { unsafe { - let mut rad_x = mem::MaybeUninit::uninit(); - let mut rad_y = mem::MaybeUninit::uninit(); - let mut rad_z = mem::MaybeUninit::uninit(); + let mut rad_x = std::mem::MaybeUninit::uninit(); + let mut rad_y = std::mem::MaybeUninit::uninit(); + let mut rad_z = std::mem::MaybeUninit::uninit(); ffi::graphene_quaternion_to_radians( self.to_glib_none().0, rad_x.as_mut_ptr(), diff --git a/graphene/src/auto/ray.rs b/graphene/src/auto/ray.rs index 24ee75c486a9..0a71e701d787 100644 --- a/graphene/src/auto/ray.rs +++ b/graphene/src/auto/ray.rs @@ -4,7 +4,6 @@ use crate::{Box, Plane, Point3D, RayIntersectionKind, Sphere, Triangle, Vec3}; use glib::translate::*; -use std::mem; glib::wrapper! { pub struct Ray(BoxedInline); @@ -89,7 +88,7 @@ impl Ray { #[doc(alias = "graphene_ray_intersect_box")] pub fn intersect_box(&self, b: &Box) -> (RayIntersectionKind, f32) { unsafe { - let mut t_out = mem::MaybeUninit::uninit(); + let mut t_out = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::graphene_ray_intersect_box( self.to_glib_none().0, b.to_glib_none().0, @@ -102,7 +101,7 @@ impl Ray { #[doc(alias = "graphene_ray_intersect_sphere")] pub fn intersect_sphere(&self, s: &Sphere) -> (RayIntersectionKind, f32) { unsafe { - let mut t_out = mem::MaybeUninit::uninit(); + let mut t_out = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::graphene_ray_intersect_sphere( self.to_glib_none().0, s.to_glib_none().0, @@ -115,7 +114,7 @@ impl Ray { #[doc(alias = "graphene_ray_intersect_triangle")] pub fn intersect_triangle(&self, t: &Triangle) -> (RayIntersectionKind, f32) { unsafe { - let mut t_out = mem::MaybeUninit::uninit(); + let mut t_out = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::graphene_ray_intersect_triangle( self.to_glib_none().0, t.to_glib_none().0, diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index dd6ac754e173..59401b409365 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/graphene/sys/Cargo.toml b/graphene/sys/Cargo.toml index d3da4bed4418..de30df2ff617 100644 --- a/graphene/sys/Cargo.toml +++ b/graphene/sys/Cargo.toml @@ -29,12 +29,6 @@ version = "0.19.0" edition = "2021" rust-version = "1.70" -[package.metadata.docs.rs] -all-features = true -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] -features = [] - [package.metadata.system-deps.graphene_gobject_1_0] name = "graphene-gobject-1.0" version = "1.10" @@ -42,5 +36,10 @@ version = "1.10" [package.metadata.system-deps.graphene_gobject_1_0.v1_12] version = "1.11" +[package.metadata.docs.rs] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +all-features = true + [features] v1_12 = [] diff --git a/graphene/sys/tests/abi.rs b/graphene/sys/tests/abi.rs index e5776af37933..754bc592a282 100644 --- a/graphene/sys/tests/abi.rs +++ b/graphene/sys/tests/abi.rs @@ -10,7 +10,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -70,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index dd6ac754e173..59401b409365 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/pango/src/auto/attr_list.rs b/pango/src/auto/attr_list.rs index 5272582d0abf..7d109caa50e8 100644 --- a/pango/src/auto/attr_list.rs +++ b/pango/src/auto/attr_list.rs @@ -4,9 +4,6 @@ use crate::{AttrIterator, Attribute}; use glib::translate::*; -#[cfg(feature = "v1_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -use std::fmt; glib::wrapper! { #[derive(Debug)] @@ -115,9 +112,9 @@ impl Default for AttrList { #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -impl fmt::Display for AttrList { +impl std::fmt::Display for AttrList { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/pango/src/auto/color.rs b/pango/src/auto/color.rs index 9b8045d45f38..0229fcf3ee1f 100644 --- a/pango/src/auto/color.rs +++ b/pango/src/auto/color.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { pub struct Color(BoxedInline); @@ -23,9 +22,9 @@ impl Color { } } -impl fmt::Display for Color { +impl std::fmt::Display for Color { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/pango/src/auto/context.rs b/pango/src/auto/context.rs index 62c73968159d..6d53c8e8b87e 100644 --- a/pango/src/auto/context.rs +++ b/pango/src/auto/context.rs @@ -7,7 +7,6 @@ use crate::{ GravityHint, Language, Matrix, }; use glib::{prelude::*, translate::*}; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "PangoContext")] @@ -120,8 +119,8 @@ impl Context { #[doc(alias = "pango_context_list_families")] pub fn list_families(&self) -> Vec { unsafe { - let mut families = ptr::null_mut(); - let mut n_families = mem::MaybeUninit::uninit(); + let mut families = std::ptr::null_mut(); + let mut n_families = std::mem::MaybeUninit::uninit(); ffi::pango_context_list_families( self.to_glib_none().0, &mut families, @@ -225,9 +224,3 @@ impl Default for Context { Self::new() } } - -impl fmt::Display for Context { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Context") - } -} diff --git a/pango/src/auto/enums.rs b/pango/src/auto/enums.rs index 865d4fd0522f..f38cb308615a 100644 --- a/pango/src/auto/enums.rs +++ b/pango/src/auto/enums.rs @@ -4,7 +4,6 @@ use crate::{Language, Matrix}; use glib::{prelude::*, translate::*}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -20,21 +19,6 @@ pub enum Alignment { __Unknown(i32), } -impl fmt::Display for Alignment { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Alignment::{}", - match *self { - Self::Left => "Left", - Self::Center => "Center", - Self::Right => "Right", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Alignment { type GlibType = ffi::PangoAlignment; @@ -65,6 +49,7 @@ impl FromGlib for Alignment { impl StaticType for Alignment { #[inline] + #[doc(alias = "pango_alignment_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_alignment_get_type()) } } @@ -76,7 +61,7 @@ impl glib::HasParamSpec for Alignment { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -222,63 +207,6 @@ impl AttrType { } } -impl fmt::Display for AttrType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "AttrType::{}", - match *self { - Self::Invalid => "Invalid", - Self::Language => "Language", - Self::Family => "Family", - Self::Style => "Style", - Self::Weight => "Weight", - Self::Variant => "Variant", - Self::Stretch => "Stretch", - Self::Size => "Size", - Self::FontDesc => "FontDesc", - Self::Foreground => "Foreground", - Self::Background => "Background", - Self::Underline => "Underline", - Self::Strikethrough => "Strikethrough", - Self::Rise => "Rise", - Self::Shape => "Shape", - Self::Scale => "Scale", - Self::Fallback => "Fallback", - Self::LetterSpacing => "LetterSpacing", - Self::UnderlineColor => "UnderlineColor", - Self::StrikethroughColor => "StrikethroughColor", - Self::AbsoluteSize => "AbsoluteSize", - Self::Gravity => "Gravity", - Self::GravityHint => "GravityHint", - Self::FontFeatures => "FontFeatures", - Self::ForegroundAlpha => "ForegroundAlpha", - Self::BackgroundAlpha => "BackgroundAlpha", - Self::AllowBreaks => "AllowBreaks", - Self::Show => "Show", - Self::InsertHyphens => "InsertHyphens", - Self::Overline => "Overline", - Self::OverlineColor => "OverlineColor", - #[cfg(feature = "v1_50")] - Self::LineHeight => "LineHeight", - #[cfg(feature = "v1_50")] - Self::AbsoluteLineHeight => "AbsoluteLineHeight", - #[cfg(feature = "v1_50")] - Self::TextTransform => "TextTransform", - #[cfg(feature = "v1_50")] - Self::Word => "Word", - #[cfg(feature = "v1_50")] - Self::Sentence => "Sentence", - #[cfg(feature = "v1_50")] - Self::BaselineShift => "BaselineShift", - #[cfg(feature = "v1_50")] - Self::FontScale => "FontScale", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for AttrType { type GlibType = ffi::PangoAttrType; @@ -391,6 +319,7 @@ impl FromGlib for AttrType { impl StaticType for AttrType { #[inline] + #[doc(alias = "pango_attr_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_attr_type_get_type()) } } @@ -402,7 +331,7 @@ impl glib::HasParamSpec for AttrType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -458,23 +387,6 @@ pub enum BaselineShift { __Unknown(i32), } -#[cfg(feature = "v1_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -impl fmt::Display for BaselineShift { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "BaselineShift::{}", - match *self { - Self::None => "None", - Self::Superscript => "Superscript", - Self::Subscript => "Subscript", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] @@ -511,6 +423,7 @@ impl FromGlib for BaselineShift { #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl StaticType for BaselineShift { #[inline] + #[doc(alias = "pango_baseline_shift_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_baseline_shift_get_type()) } } @@ -524,7 +437,7 @@ impl glib::HasParamSpec for BaselineShift { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -635,42 +548,6 @@ impl BidiType { } } -#[allow(deprecated)] -impl fmt::Display for BidiType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "BidiType::{}", - match *self { - Self::L => "L", - Self::Lre => "Lre", - Self::Lro => "Lro", - Self::R => "R", - Self::Al => "Al", - Self::Rle => "Rle", - Self::Rlo => "Rlo", - Self::Pdf => "Pdf", - Self::En => "En", - Self::Es => "Es", - Self::Et => "Et", - Self::An => "An", - Self::Cs => "Cs", - Self::Nsm => "Nsm", - Self::Bn => "Bn", - Self::B => "B", - Self::S => "S", - Self::Ws => "Ws", - Self::On => "On", - Self::Lri => "Lri", - Self::Rli => "Rli", - Self::Fsi => "Fsi", - Self::Pdi => "Pdi", - _ => "Unknown", - } - ) - } -} - #[allow(deprecated)] #[doc(hidden)] impl IntoGlib for BidiType { @@ -742,6 +619,7 @@ impl FromGlib for BidiType { #[allow(deprecated)] impl StaticType for BidiType { #[inline] + #[doc(alias = "pango_bidi_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_bidi_type_get_type()) } } @@ -754,7 +632,7 @@ impl glib::HasParamSpec for BidiType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -814,22 +692,6 @@ pub enum CoverageLevel { __Unknown(i32), } -impl fmt::Display for CoverageLevel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "CoverageLevel::{}", - match *self { - Self::None => "None", - Self::Fallback => "Fallback", - Self::Approximate => "Approximate", - Self::Exact => "Exact", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for CoverageLevel { type GlibType = ffi::PangoCoverageLevel; @@ -862,6 +724,7 @@ impl FromGlib for CoverageLevel { impl StaticType for CoverageLevel { #[inline] + #[doc(alias = "pango_coverage_level_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_coverage_level_get_type()) } } @@ -873,7 +736,7 @@ impl glib::HasParamSpec for CoverageLevel { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -935,25 +798,6 @@ pub enum Direction { __Unknown(i32), } -impl fmt::Display for Direction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Direction::{}", - match *self { - Self::Ltr => "Ltr", - Self::Rtl => "Rtl", - Self::TtbLtr => "TtbLtr", - Self::TtbRtl => "TtbRtl", - Self::WeakLtr => "WeakLtr", - Self::WeakRtl => "WeakRtl", - Self::Neutral => "Neutral", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Direction { type GlibType = ffi::PangoDirection; @@ -992,6 +836,7 @@ impl FromGlib for Direction { impl StaticType for Direction { #[inline] + #[doc(alias = "pango_direction_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_direction_get_type()) } } @@ -1003,7 +848,7 @@ impl glib::HasParamSpec for Direction { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1059,22 +904,6 @@ pub enum EllipsizeMode { __Unknown(i32), } -impl fmt::Display for EllipsizeMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "EllipsizeMode::{}", - match *self { - Self::None => "None", - Self::Start => "Start", - Self::Middle => "Middle", - Self::End => "End", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for EllipsizeMode { type GlibType = ffi::PangoEllipsizeMode; @@ -1107,6 +936,7 @@ impl FromGlib for EllipsizeMode { impl StaticType for EllipsizeMode { #[inline] + #[doc(alias = "pango_ellipsize_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_ellipsize_mode_get_type()) } } @@ -1118,7 +948,7 @@ impl glib::HasParamSpec for EllipsizeMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1176,24 +1006,6 @@ pub enum FontScale { __Unknown(i32), } -#[cfg(feature = "v1_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -impl fmt::Display for FontScale { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FontScale::{}", - match *self { - Self::None => "None", - Self::Superscript => "Superscript", - Self::Subscript => "Subscript", - Self::SmallCaps => "SmallCaps", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] @@ -1232,6 +1044,7 @@ impl FromGlib for FontScale { #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl StaticType for FontScale { #[inline] + #[doc(alias = "pango_font_scale_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_font_scale_get_type()) } } @@ -1245,7 +1058,7 @@ impl glib::HasParamSpec for FontScale { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1354,23 +1167,6 @@ impl Gravity { } } -impl fmt::Display for Gravity { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Gravity::{}", - match *self { - Self::South => "South", - Self::East => "East", - Self::North => "North", - Self::West => "West", - Self::Auto => "Auto", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Gravity { type GlibType = ffi::PangoGravity; @@ -1405,6 +1201,7 @@ impl FromGlib for Gravity { impl StaticType for Gravity { #[inline] + #[doc(alias = "pango_gravity_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_gravity_get_type()) } } @@ -1416,7 +1213,7 @@ impl glib::HasParamSpec for Gravity { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1470,21 +1267,6 @@ pub enum GravityHint { __Unknown(i32), } -impl fmt::Display for GravityHint { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "GravityHint::{}", - match *self { - Self::Natural => "Natural", - Self::Strong => "Strong", - Self::Line => "Line", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for GravityHint { type GlibType = ffi::PangoGravityHint; @@ -1515,6 +1297,7 @@ impl FromGlib for GravityHint { impl StaticType for GravityHint { #[inline] + #[doc(alias = "pango_gravity_hint_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_gravity_hint_get_type()) } } @@ -1526,7 +1309,7 @@ impl glib::HasParamSpec for GravityHint { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1580,22 +1363,6 @@ pub enum Overline { __Unknown(i32), } -#[cfg(feature = "v1_46")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] -impl fmt::Display for Overline { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Overline::{}", - match *self { - Self::None => "None", - Self::Single => "Single", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] #[doc(hidden)] @@ -1630,6 +1397,7 @@ impl FromGlib for Overline { #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] impl StaticType for Overline { #[inline] + #[doc(alias = "pango_overline_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_overline_get_type()) } } @@ -1643,7 +1411,7 @@ impl glib::HasParamSpec for Overline { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1709,23 +1477,6 @@ pub enum RenderPart { __Unknown(i32), } -impl fmt::Display for RenderPart { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "RenderPart::{}", - match *self { - Self::Foreground => "Foreground", - Self::Background => "Background", - Self::Underline => "Underline", - Self::Strikethrough => "Strikethrough", - Self::Overline => "Overline", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for RenderPart { type GlibType = ffi::PangoRenderPart; @@ -1760,6 +1511,7 @@ impl FromGlib for RenderPart { impl StaticType for RenderPart { #[inline] + #[doc(alias = "pango_render_part_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_render_part_get_type()) } } @@ -1771,7 +1523,7 @@ impl glib::HasParamSpec for RenderPart { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2070,136 +1822,6 @@ impl Script { } } -impl fmt::Display for Script { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Script::{}", - match *self { - Self::InvalidCode => "InvalidCode", - Self::Common => "Common", - Self::Inherited => "Inherited", - Self::Arabic => "Arabic", - Self::Armenian => "Armenian", - Self::Bengali => "Bengali", - Self::Bopomofo => "Bopomofo", - Self::Cherokee => "Cherokee", - Self::Coptic => "Coptic", - Self::Cyrillic => "Cyrillic", - Self::Deseret => "Deseret", - Self::Devanagari => "Devanagari", - Self::Ethiopic => "Ethiopic", - Self::Georgian => "Georgian", - Self::Gothic => "Gothic", - Self::Greek => "Greek", - Self::Gujarati => "Gujarati", - Self::Gurmukhi => "Gurmukhi", - Self::Han => "Han", - Self::Hangul => "Hangul", - Self::Hebrew => "Hebrew", - Self::Hiragana => "Hiragana", - Self::Kannada => "Kannada", - Self::Katakana => "Katakana", - Self::Khmer => "Khmer", - Self::Lao => "Lao", - Self::Latin => "Latin", - Self::Malayalam => "Malayalam", - Self::Mongolian => "Mongolian", - Self::Myanmar => "Myanmar", - Self::Ogham => "Ogham", - Self::OldItalic => "OldItalic", - Self::Oriya => "Oriya", - Self::Runic => "Runic", - Self::Sinhala => "Sinhala", - Self::Syriac => "Syriac", - Self::Tamil => "Tamil", - Self::Telugu => "Telugu", - Self::Thaana => "Thaana", - Self::Thai => "Thai", - Self::Tibetan => "Tibetan", - Self::CanadianAboriginal => "CanadianAboriginal", - Self::Yi => "Yi", - Self::Tagalog => "Tagalog", - Self::Hanunoo => "Hanunoo", - Self::Buhid => "Buhid", - Self::Tagbanwa => "Tagbanwa", - Self::Braille => "Braille", - Self::Cypriot => "Cypriot", - Self::Limbu => "Limbu", - Self::Osmanya => "Osmanya", - Self::Shavian => "Shavian", - Self::LinearB => "LinearB", - Self::TaiLe => "TaiLe", - Self::Ugaritic => "Ugaritic", - Self::NewTaiLue => "NewTaiLue", - Self::Buginese => "Buginese", - Self::Glagolitic => "Glagolitic", - Self::Tifinagh => "Tifinagh", - Self::SylotiNagri => "SylotiNagri", - Self::OldPersian => "OldPersian", - Self::Kharoshthi => "Kharoshthi", - Self::Unknown => "Unknown", - Self::Balinese => "Balinese", - Self::Cuneiform => "Cuneiform", - Self::Phoenician => "Phoenician", - Self::PhagsPa => "PhagsPa", - Self::Nko => "Nko", - Self::KayahLi => "KayahLi", - Self::Lepcha => "Lepcha", - Self::Rejang => "Rejang", - Self::Sundanese => "Sundanese", - Self::Saurashtra => "Saurashtra", - Self::Cham => "Cham", - Self::OlChiki => "OlChiki", - Self::Vai => "Vai", - Self::Carian => "Carian", - Self::Lycian => "Lycian", - Self::Lydian => "Lydian", - Self::Batak => "Batak", - Self::Brahmi => "Brahmi", - Self::Mandaic => "Mandaic", - Self::Chakma => "Chakma", - Self::MeroiticCursive => "MeroiticCursive", - Self::MeroiticHieroglyphs => "MeroiticHieroglyphs", - Self::Miao => "Miao", - Self::Sharada => "Sharada", - Self::SoraSompeng => "SoraSompeng", - Self::Takri => "Takri", - Self::BassaVah => "BassaVah", - Self::CaucasianAlbanian => "CaucasianAlbanian", - Self::Duployan => "Duployan", - Self::Elbasan => "Elbasan", - Self::Grantha => "Grantha", - Self::Khojki => "Khojki", - Self::Khudawadi => "Khudawadi", - Self::LinearA => "LinearA", - Self::Mahajani => "Mahajani", - Self::Manichaean => "Manichaean", - Self::MendeKikakui => "MendeKikakui", - Self::Modi => "Modi", - Self::Mro => "Mro", - Self::Nabataean => "Nabataean", - Self::OldNorthArabian => "OldNorthArabian", - Self::OldPermic => "OldPermic", - Self::PahawhHmong => "PahawhHmong", - Self::Palmyrene => "Palmyrene", - Self::PauCinHau => "PauCinHau", - Self::PsalterPahlavi => "PsalterPahlavi", - Self::Siddham => "Siddham", - Self::Tirhuta => "Tirhuta", - Self::WarangCiti => "WarangCiti", - Self::Ahom => "Ahom", - Self::AnatolianHieroglyphs => "AnatolianHieroglyphs", - Self::Hatran => "Hatran", - Self::Multani => "Multani", - Self::OldHungarian => "OldHungarian", - Self::Signwriting => "Signwriting", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Script { type GlibType = ffi::PangoScript; @@ -2458,6 +2080,7 @@ impl FromGlib for Script { impl StaticType for Script { #[inline] + #[doc(alias = "pango_script_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_script_get_type()) } } @@ -2469,7 +2092,7 @@ impl glib::HasParamSpec for Script { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2535,27 +2158,6 @@ pub enum Stretch { __Unknown(i32), } -impl fmt::Display for Stretch { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Stretch::{}", - match *self { - Self::UltraCondensed => "UltraCondensed", - Self::ExtraCondensed => "ExtraCondensed", - Self::Condensed => "Condensed", - Self::SemiCondensed => "SemiCondensed", - Self::Normal => "Normal", - Self::SemiExpanded => "SemiExpanded", - Self::Expanded => "Expanded", - Self::ExtraExpanded => "ExtraExpanded", - Self::UltraExpanded => "UltraExpanded", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Stretch { type GlibType = ffi::PangoStretch; @@ -2598,6 +2200,7 @@ impl FromGlib for Stretch { impl StaticType for Stretch { #[inline] + #[doc(alias = "pango_stretch_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_stretch_get_type()) } } @@ -2609,7 +2212,7 @@ impl glib::HasParamSpec for Stretch { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2663,21 +2266,6 @@ pub enum Style { __Unknown(i32), } -impl fmt::Display for Style { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Style::{}", - match *self { - Self::Normal => "Normal", - Self::Oblique => "Oblique", - Self::Italic => "Italic", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Style { type GlibType = ffi::PangoStyle; @@ -2708,6 +2296,7 @@ impl FromGlib for Style { impl StaticType for Style { #[inline] + #[doc(alias = "pango_style_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_style_get_type()) } } @@ -2719,7 +2308,7 @@ impl glib::HasParamSpec for Style { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2781,25 +2370,6 @@ pub enum TabAlign { __Unknown(i32), } -impl fmt::Display for TabAlign { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TabAlign::{}", - match *self { - Self::Left => "Left", - #[cfg(feature = "v1_50")] - Self::Right => "Right", - #[cfg(feature = "v1_50")] - Self::Center => "Center", - #[cfg(feature = "v1_50")] - Self::Decimal => "Decimal", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TabAlign { type GlibType = ffi::PangoTabAlign; @@ -2838,6 +2408,7 @@ impl FromGlib for TabAlign { impl StaticType for TabAlign { #[inline] + #[doc(alias = "pango_tab_align_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_tab_align_get_type()) } } @@ -2849,7 +2420,7 @@ impl glib::HasParamSpec for TabAlign { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2907,24 +2478,6 @@ pub enum TextTransform { __Unknown(i32), } -#[cfg(feature = "v1_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -impl fmt::Display for TextTransform { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TextTransform::{}", - match *self { - Self::None => "None", - Self::Lowercase => "Lowercase", - Self::Uppercase => "Uppercase", - Self::Capitalize => "Capitalize", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] @@ -2963,6 +2516,7 @@ impl FromGlib for TextTransform { #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl StaticType for TextTransform { #[inline] + #[doc(alias = "pango_text_transform_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_text_transform_get_type()) } } @@ -2976,7 +2530,7 @@ impl glib::HasParamSpec for TextTransform { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3048,26 +2602,6 @@ pub enum Underline { __Unknown(i32), } -impl fmt::Display for Underline { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Underline::{}", - match *self { - Self::None => "None", - Self::Single => "Single", - Self::Double => "Double", - Self::Low => "Low", - Self::Error => "Error", - Self::SingleLine => "SingleLine", - Self::DoubleLine => "DoubleLine", - Self::ErrorLine => "ErrorLine", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Underline { type GlibType = ffi::PangoUnderline; @@ -3108,6 +2642,7 @@ impl FromGlib for Underline { impl StaticType for Underline { #[inline] + #[doc(alias = "pango_underline_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_underline_get_type()) } } @@ -3119,7 +2654,7 @@ impl glib::HasParamSpec for Underline { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3191,30 +2726,6 @@ pub enum Variant { __Unknown(i32), } -impl fmt::Display for Variant { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Variant::{}", - match *self { - Self::Normal => "Normal", - Self::SmallCaps => "SmallCaps", - #[cfg(feature = "v1_50")] - Self::AllSmallCaps => "AllSmallCaps", - #[cfg(feature = "v1_50")] - Self::PetiteCaps => "PetiteCaps", - #[cfg(feature = "v1_50")] - Self::AllPetiteCaps => "AllPetiteCaps", - #[cfg(feature = "v1_50")] - Self::Unicase => "Unicase", - #[cfg(feature = "v1_50")] - Self::TitleCaps => "TitleCaps", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Variant { type GlibType = ffi::PangoVariant; @@ -3263,6 +2774,7 @@ impl FromGlib for Variant { impl StaticType for Variant { #[inline] + #[doc(alias = "pango_variant_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_variant_get_type()) } } @@ -3274,7 +2786,7 @@ impl glib::HasParamSpec for Variant { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3346,30 +2858,6 @@ pub enum Weight { __Unknown(i32), } -impl fmt::Display for Weight { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Weight::{}", - match *self { - Self::Thin => "Thin", - Self::Ultralight => "Ultralight", - Self::Light => "Light", - Self::Semilight => "Semilight", - Self::Book => "Book", - Self::Normal => "Normal", - Self::Medium => "Medium", - Self::Semibold => "Semibold", - Self::Bold => "Bold", - Self::Ultrabold => "Ultrabold", - Self::Heavy => "Heavy", - Self::Ultraheavy => "Ultraheavy", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Weight { type GlibType = ffi::PangoWeight; @@ -3418,6 +2906,7 @@ impl FromGlib for Weight { impl StaticType for Weight { #[inline] + #[doc(alias = "pango_weight_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_weight_get_type()) } } @@ -3429,7 +2918,7 @@ impl glib::HasParamSpec for Weight { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3483,21 +2972,6 @@ pub enum WrapMode { __Unknown(i32), } -impl fmt::Display for WrapMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "WrapMode::{}", - match *self { - Self::Word => "Word", - Self::Char => "Char", - Self::WordChar => "WordChar", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for WrapMode { type GlibType = ffi::PangoWrapMode; @@ -3528,6 +3002,7 @@ impl FromGlib for WrapMode { impl StaticType for WrapMode { #[inline] + #[doc(alias = "pango_wrap_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_wrap_mode_get_type()) } } @@ -3539,7 +3014,7 @@ impl glib::HasParamSpec for WrapMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/pango/src/auto/flags.rs b/pango/src/auto/flags.rs index 57c47a9a5eb7..e220f7e06215 100644 --- a/pango/src/auto/flags.rs +++ b/pango/src/auto/flags.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -28,12 +27,6 @@ bitflags! { } } -impl fmt::Display for FontMask { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FontMask { type GlibType = ffi::PangoFontMask; @@ -54,6 +47,7 @@ impl FromGlib for FontMask { impl StaticType for FontMask { #[inline] + #[doc(alias = "pango_font_mask_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_font_mask_get_type()) } } @@ -65,7 +59,7 @@ impl glib::HasParamSpec for FontMask { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -118,14 +112,6 @@ bitflags! { } } -#[cfg(feature = "v1_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -impl fmt::Display for LayoutDeserializeFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] @@ -152,6 +138,7 @@ impl FromGlib for LayoutDeserializeFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl StaticType for LayoutDeserializeFlags { #[inline] + #[doc(alias = "pango_layout_deserialize_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_layout_deserialize_flags_get_type()) } } @@ -165,7 +152,7 @@ impl glib::HasParamSpec for LayoutDeserializeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -228,14 +215,6 @@ bitflags! { } } -#[cfg(feature = "v1_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -impl fmt::Display for LayoutSerializeFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] @@ -262,6 +241,7 @@ impl FromGlib for LayoutSerializeFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl StaticType for LayoutSerializeFlags { #[inline] + #[doc(alias = "pango_layout_serialize_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_layout_serialize_flags_get_type()) } } @@ -275,7 +255,7 @@ impl glib::HasParamSpec for LayoutSerializeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -336,14 +316,6 @@ bitflags! { } } -#[cfg(feature = "v1_44")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] -impl fmt::Display for ShapeFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v1_44")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] #[doc(hidden)] @@ -370,6 +342,7 @@ impl FromGlib for ShapeFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] impl StaticType for ShapeFlags { #[inline] + #[doc(alias = "pango_shape_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_shape_flags_get_type()) } } @@ -383,7 +356,7 @@ impl glib::HasParamSpec for ShapeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -448,14 +421,6 @@ bitflags! { } } -#[cfg(feature = "v1_44")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] -impl fmt::Display for ShowFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v1_44")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] #[doc(hidden)] @@ -482,6 +447,7 @@ impl FromGlib for ShowFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] impl StaticType for ShowFlags { #[inline] + #[doc(alias = "pango_show_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::pango_show_flags_get_type()) } } @@ -495,7 +461,7 @@ impl glib::HasParamSpec for ShowFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/pango/src/auto/font.rs b/pango/src/auto/font.rs index 04613535aebb..132f674726d8 100644 --- a/pango/src/auto/font.rs +++ b/pango/src/auto/font.rs @@ -10,10 +10,6 @@ use crate::Context; use crate::FontFace; use crate::{Coverage, FontDescription, FontMap, FontMetrics, Glyph, Language, Rectangle}; use glib::{prelude::*, translate::*}; -use std::fmt; -#[cfg(feature = "v1_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] -use std::ptr; glib::wrapper! { #[doc(alias = "PangoFont")] @@ -35,7 +31,7 @@ impl Font { bytes: &glib::Bytes, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::pango_font_deserialize( context.to_glib_none().0, bytes.to_glib_none().0, @@ -159,9 +155,3 @@ pub trait FontExt: IsA + sealed::Sealed + 'static { } impl> FontExt for O {} - -impl fmt::Display for Font { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Font") - } -} diff --git a/pango/src/auto/font_description.rs b/pango/src/auto/font_description.rs index 19c6b2e6e187..82163834a697 100644 --- a/pango/src/auto/font_description.rs +++ b/pango/src/auto/font_description.rs @@ -4,7 +4,6 @@ use crate::{FontMask, Gravity, Stretch, Style, Variant, Weight}; use glib::translate::*; -use std::{fmt, hash}; glib::wrapper! { #[derive(Debug, PartialOrd, Ord)] @@ -291,20 +290,20 @@ impl PartialEq for FontDescription { impl Eq for FontDescription {} -impl fmt::Display for FontDescription { +impl std::fmt::Display for FontDescription { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } -impl hash::Hash for FontDescription { +impl std::hash::Hash for FontDescription { #[inline] fn hash(&self, state: &mut H) where - H: hash::Hasher, + H: std::hash::Hasher, { - hash::Hash::hash(&self.hash(), state) + std::hash::Hash::hash(&self.hash(), state) } } diff --git a/pango/src/auto/font_face.rs b/pango/src/auto/font_face.rs index 1458fbf2ac0c..75d1e94cd9c9 100644 --- a/pango/src/auto/font_face.rs +++ b/pango/src/auto/font_face.rs @@ -7,7 +7,6 @@ use crate::FontDescription; #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] use crate::FontFamily; use glib::{prelude::*, translate::*}; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "PangoFontFace")] @@ -71,8 +70,8 @@ pub trait FontFaceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "pango_font_face_list_sizes")] fn list_sizes(&self) -> Vec { unsafe { - let mut sizes = ptr::null_mut(); - let mut n_sizes = mem::MaybeUninit::uninit(); + let mut sizes = std::ptr::null_mut(); + let mut n_sizes = std::mem::MaybeUninit::uninit(); ffi::pango_font_face_list_sizes( self.as_ref().to_glib_none().0, &mut sizes, @@ -84,9 +83,3 @@ pub trait FontFaceExt: IsA + sealed::Sealed + 'static { } impl> FontFaceExt for O {} - -impl fmt::Display for FontFace { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FontFace") - } -} diff --git a/pango/src/auto/font_family.rs b/pango/src/auto/font_family.rs index baf55044006f..6a9b2097730e 100644 --- a/pango/src/auto/font_family.rs +++ b/pango/src/auto/font_family.rs @@ -4,7 +4,6 @@ use crate::FontFace; use glib::{prelude::*, translate::*}; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "PangoFontFamily")] @@ -19,9 +18,9 @@ impl FontFamily { pub const NONE: Option<&'static FontFamily> = None; } -impl fmt::Display for FontFamily { +impl std::fmt::Display for FontFamily { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&FontFamilyExt::name(self)) } } @@ -78,8 +77,8 @@ pub trait FontFamilyExt: IsA + sealed::Sealed + 'static { #[doc(alias = "pango_font_family_list_faces")] fn list_faces(&self) -> Vec { unsafe { - let mut faces = ptr::null_mut(); - let mut n_faces = mem::MaybeUninit::uninit(); + let mut faces = std::ptr::null_mut(); + let mut n_faces = std::mem::MaybeUninit::uninit(); ffi::pango_font_family_list_faces( self.as_ref().to_glib_none().0, &mut faces, diff --git a/pango/src/auto/font_map.rs b/pango/src/auto/font_map.rs index 242b79316c9e..dd2d76b53d53 100644 --- a/pango/src/auto/font_map.rs +++ b/pango/src/auto/font_map.rs @@ -4,7 +4,6 @@ use crate::{Context, Font, FontDescription, FontFamily, Fontset, Language}; use glib::{prelude::*, translate::*}; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "PangoFontMap")] @@ -63,8 +62,8 @@ pub trait FontMapExt: IsA + sealed::Sealed + 'static { #[doc(alias = "pango_font_map_list_families")] fn list_families(&self) -> Vec { unsafe { - let mut families = ptr::null_mut(); - let mut n_families = mem::MaybeUninit::uninit(); + let mut families = std::ptr::null_mut(); + let mut n_families = std::mem::MaybeUninit::uninit(); ffi::pango_font_map_list_families( self.as_ref().to_glib_none().0, &mut families, @@ -104,9 +103,3 @@ pub trait FontMapExt: IsA + sealed::Sealed + 'static { } impl> FontMapExt for O {} - -impl fmt::Display for FontMap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FontMap") - } -} diff --git a/pango/src/auto/fontset.rs b/pango/src/auto/fontset.rs index 978d3b5117e4..8531afb9d8e4 100644 --- a/pango/src/auto/fontset.rs +++ b/pango/src/auto/fontset.rs @@ -4,7 +4,6 @@ use crate::{Font, FontMetrics}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "PangoFontset")] @@ -72,9 +71,3 @@ pub trait FontsetExt: IsA + sealed::Sealed + 'static { } impl> FontsetExt for O {} - -impl fmt::Display for Fontset { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Fontset") - } -} diff --git a/pango/src/auto/fontset_simple.rs b/pango/src/auto/fontset_simple.rs index e95df8057c8f..787114d00db0 100644 --- a/pango/src/auto/fontset_simple.rs +++ b/pango/src/auto/fontset_simple.rs @@ -4,7 +4,6 @@ use crate::{Font, Fontset, Language}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "PangoFontsetSimple")] @@ -33,9 +32,3 @@ impl FontsetSimple { unsafe { ffi::pango_fontset_simple_size(self.to_glib_none().0) } } } - -impl fmt::Display for FontsetSimple { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FontsetSimple") - } -} diff --git a/pango/src/auto/functions.rs b/pango/src/auto/functions.rs index d4f02758dce7..7a54210a4715 100644 --- a/pango/src/auto/functions.rs +++ b/pango/src/auto/functions.rs @@ -7,7 +7,6 @@ use crate::{ Variant, Weight, }; use glib::translate::*; -use std::{mem, ptr}; //#[cfg_attr(feature = "v1_44", deprecated = "Since 1.44")] //#[allow(deprecated)] @@ -32,8 +31,8 @@ pub fn find_base_dir(text: &str) -> Direction { pub fn find_paragraph_boundary(text: &str) -> (i32, i32) { let length = text.len() as _; unsafe { - let mut paragraph_delimiter_index = mem::MaybeUninit::uninit(); - let mut next_paragraph_start = mem::MaybeUninit::uninit(); + let mut paragraph_delimiter_index = std::mem::MaybeUninit::uninit(); + let mut next_paragraph_start = std::mem::MaybeUninit::uninit(); ffi::pango_find_paragraph_boundary( text.to_glib_none().0, length, @@ -107,10 +106,10 @@ pub fn markup_parser_finish( context: &glib::MarkupParseContext, ) -> Result<(AttrList, glib::GString, char), glib::Error> { unsafe { - let mut attr_list = ptr::null_mut(); - let mut text = ptr::null_mut(); - let mut accel_char = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut attr_list = std::ptr::null_mut(); + let mut text = std::ptr::null_mut(); + let mut accel_char = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::pango_markup_parser_finish( context.to_glib_none().0, &mut attr_list, @@ -144,10 +143,10 @@ pub fn parse_markup( ) -> Result<(AttrList, glib::GString, char), glib::Error> { let length = markup_text.len() as _; unsafe { - let mut attr_list = ptr::null_mut(); - let mut text = ptr::null_mut(); - let mut accel_char = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); + let mut attr_list = std::ptr::null_mut(); + let mut text = std::ptr::null_mut(); + let mut accel_char = std::mem::MaybeUninit::uninit(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::pango_parse_markup( markup_text.to_glib_none().0, length, @@ -174,7 +173,7 @@ pub fn parse_markup( #[doc(alias = "pango_parse_stretch")] pub fn parse_stretch(str: &str, warn: bool) -> Option { unsafe { - let mut stretch = mem::MaybeUninit::uninit(); + let mut stretch = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::pango_parse_stretch( str.to_glib_none().0, stretch.as_mut_ptr(), @@ -191,7 +190,7 @@ pub fn parse_stretch(str: &str, warn: bool) -> Option { #[doc(alias = "pango_parse_style")] pub fn parse_style(str: &str, warn: bool) -> Option