From 78d1ddd23e7dcab5520d4a08718a6250215d00a0 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 15 Sep 2023 08:20:04 -0400 Subject: [PATCH] gstring: Add `fmt::Debug` bounds This fixes a compliation error for me that looks correct; I have no idea how CI is working. I'm using Rust 1.72 here. --- glib/src/gstring.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/glib/src/gstring.rs b/glib/src/gstring.rs index edabfb2a20b0..f51b016deece 100644 --- a/glib/src/gstring.rs +++ b/glib/src/gstring.rs @@ -1299,9 +1299,9 @@ macro_rules! gformat { /// `T` is the type of the value the conversion was attempted from. #[derive(thiserror::Error, Clone, PartialEq, Eq, Debug)] #[error("data provided is not nul terminated")] -pub struct GStringNoTrailingNulError(T); +pub struct GStringNoTrailingNulError(T); -impl GStringNoTrailingNulError { +impl GStringNoTrailingNulError { // rustdoc-stripper-ignore-next /// Returns the original value that was attempted to convert to [`GString`]. #[inline] @@ -1316,9 +1316,9 @@ impl GStringNoTrailingNulError { /// `T` is the type of the value the conversion was attempted from. #[derive(thiserror::Error, Clone, PartialEq, Eq, Debug)] #[error("{1}")] -pub struct GStringInteriorNulError(T, GStrInteriorNulError); +pub struct GStringInteriorNulError(T, GStrInteriorNulError); -impl GStringInteriorNulError { +impl GStringInteriorNulError { // rustdoc-stripper-ignore-next /// Returns the original value that was attempted to convert to [`GString`]. #[inline] @@ -1339,9 +1339,9 @@ impl GStringInteriorNulError { /// `T` is the type of the value the conversion was attempted from. #[derive(thiserror::Error, Clone, PartialEq, Eq, Debug)] #[error("{1}")] -pub struct GStringUtf8Error(T, std::str::Utf8Error); +pub struct GStringUtf8Error(T, std::str::Utf8Error); -impl GStringUtf8Error { +impl GStringUtf8Error { // rustdoc-stripper-ignore-next /// Returns the original value that was attempted to convert to [`GString`]. #[inline] @@ -1360,7 +1360,7 @@ impl GStringUtf8Error { // rustdoc-stripper-ignore-next /// Error type holding all possible failures when creating a [`GString`]. #[derive(thiserror::Error, Debug)] -pub enum GStringFromError { +pub enum GStringFromError { #[error(transparent)] NoTrailingNul(#[from] GStringNoTrailingNulError), #[error(transparent)] @@ -1371,7 +1371,7 @@ pub enum GStringFromError { Unspecified(T), } -impl GStringFromError { +impl GStringFromError { pub fn into_inner(self) -> T { match self { Self::NoTrailingNul(GStringNoTrailingNulError(t)) => t, @@ -1381,7 +1381,7 @@ impl GStringFromError { } } #[inline] - fn convert(self, func: impl FnOnce(T) -> R) -> GStringFromError { + fn convert(self, func: impl FnOnce(T) -> R) -> GStringFromError { match self { Self::NoTrailingNul(GStringNoTrailingNulError(t)) => { GStringFromError::NoTrailingNul(GStringNoTrailingNulError(func(t)))