From 41516d75cb89845191875e8e671e6536ea460502 Mon Sep 17 00:00:00 2001 From: usamoi Date: Mon, 9 Dec 2024 12:36:32 +0800 Subject: [PATCH] looks like a rustfmt behavior change --- pgrx/src/datum/unbox.rs | 50 ++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/pgrx/src/datum/unbox.rs b/pgrx/src/datum/unbox.rs index 08f85679a..8d022fd39 100644 --- a/pgrx/src/datum/unbox.rs +++ b/pgrx/src/datum/unbox.rs @@ -122,7 +122,10 @@ unsafe impl UnboxDatum for str { } unsafe impl UnboxDatum for &str { - type As<'src> = &'src str where Self: 'src; + type As<'src> + = &'src str + where + Self: 'src; #[inline] unsafe fn unbox<'src>(datum: Datum<'src>) -> Self::As<'src> where @@ -144,7 +147,10 @@ unsafe impl UnboxDatum for CStr { } unsafe impl UnboxDatum for &CStr { - type As<'src> = &'src CStr where Self: 'src; + type As<'src> + = &'src CStr + where + Self: 'src; #[inline] unsafe fn unbox<'src>(datum: Datum<'src>) -> Self::As<'src> where @@ -166,7 +172,10 @@ unsafe impl UnboxDatum for [u8] { } unsafe impl UnboxDatum for &[u8] { - type As<'src> = &'src [u8] where Self: 'src; + type As<'src> + = &'src [u8] + where + Self: 'src; #[inline] unsafe fn unbox<'src>(datum: Datum<'src>) -> Self::As<'src> where @@ -293,7 +302,10 @@ unbox_with_fromdatum! { } unsafe impl UnboxDatum for PgHeapTuple<'_, crate::AllocatedByRust> { - type As<'src> = PgHeapTuple<'src, AllocatedByRust> where Self: 'src; + type As<'src> + = PgHeapTuple<'src, AllocatedByRust> + where + Self: 'src; #[inline] unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src> where @@ -304,7 +316,10 @@ unsafe impl UnboxDatum for PgHeapTuple<'_, crate::AllocatedByRust> { } unsafe impl UnboxDatum for Array<'_, T> { - type As<'src> = Array<'src, T> where Self: 'src; + type As<'src> + = Array<'src, T> + where + Self: 'src; unsafe fn unbox<'src>(d: Datum<'src>) -> Array<'src, T> where Self: 'src, @@ -314,7 +329,10 @@ unsafe impl UnboxDatum for Array<'_, T> { } unsafe impl UnboxDatum for VariadicArray<'_, T> { - type As<'src> = VariadicArray<'src, T> where Self: 'src; + type As<'src> + = VariadicArray<'src, T> + where + Self: 'src; unsafe fn unbox<'src>(d: Datum<'src>) -> VariadicArray<'src, T> where Self: 'src, @@ -324,7 +342,10 @@ unsafe impl UnboxDatum for VariadicArray<'_, T> { } unsafe impl UnboxDatum for Range { - type As<'src> = Range where Self: 'src; + type As<'src> + = Range + where + Self: 'src; unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src> where Self: 'src, @@ -345,7 +366,10 @@ unsafe impl UnboxDatum for Numeric { } unsafe impl UnboxDatum for PgBox { - type As<'src> = PgBox where Self: 'src; + type As<'src> + = PgBox + where + Self: 'src; #[inline] unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src> where @@ -356,7 +380,10 @@ unsafe impl UnboxDatum for PgBox { } unsafe impl UnboxDatum for Json { - type As<'src> = Json where Self: 'src; + type As<'src> + = Json + where + Self: 'src; #[inline] unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src> where @@ -367,7 +394,10 @@ unsafe impl UnboxDatum for Json { } unsafe impl UnboxDatum for JsonB { - type As<'src> = JsonB where Self: 'src; + type As<'src> + = JsonB + where + Self: 'src; #[inline] unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src> where