Skip to content

Commit 41516d7

Browse files
committed
looks like a rustfmt behavior change
1 parent 1f1dda3 commit 41516d7

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

pgrx/src/datum/unbox.rs

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ unsafe impl UnboxDatum for str {
122122
}
123123

124124
unsafe impl UnboxDatum for &str {
125-
type As<'src> = &'src str where Self: 'src;
125+
type As<'src>
126+
= &'src str
127+
where
128+
Self: 'src;
126129
#[inline]
127130
unsafe fn unbox<'src>(datum: Datum<'src>) -> Self::As<'src>
128131
where
@@ -144,7 +147,10 @@ unsafe impl UnboxDatum for CStr {
144147
}
145148

146149
unsafe impl UnboxDatum for &CStr {
147-
type As<'src> = &'src CStr where Self: 'src;
150+
type As<'src>
151+
= &'src CStr
152+
where
153+
Self: 'src;
148154
#[inline]
149155
unsafe fn unbox<'src>(datum: Datum<'src>) -> Self::As<'src>
150156
where
@@ -166,7 +172,10 @@ unsafe impl UnboxDatum for [u8] {
166172
}
167173

168174
unsafe impl UnboxDatum for &[u8] {
169-
type As<'src> = &'src [u8] where Self: 'src;
175+
type As<'src>
176+
= &'src [u8]
177+
where
178+
Self: 'src;
170179
#[inline]
171180
unsafe fn unbox<'src>(datum: Datum<'src>) -> Self::As<'src>
172181
where
@@ -293,7 +302,10 @@ unbox_with_fromdatum! {
293302
}
294303

295304
unsafe impl UnboxDatum for PgHeapTuple<'_, crate::AllocatedByRust> {
296-
type As<'src> = PgHeapTuple<'src, AllocatedByRust> where Self: 'src;
305+
type As<'src>
306+
= PgHeapTuple<'src, AllocatedByRust>
307+
where
308+
Self: 'src;
297309
#[inline]
298310
unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src>
299311
where
@@ -304,7 +316,10 @@ unsafe impl UnboxDatum for PgHeapTuple<'_, crate::AllocatedByRust> {
304316
}
305317

306318
unsafe impl<T: FromDatum + UnboxDatum> UnboxDatum for Array<'_, T> {
307-
type As<'src> = Array<'src, T> where Self: 'src;
319+
type As<'src>
320+
= Array<'src, T>
321+
where
322+
Self: 'src;
308323
unsafe fn unbox<'src>(d: Datum<'src>) -> Array<'src, T>
309324
where
310325
Self: 'src,
@@ -314,7 +329,10 @@ unsafe impl<T: FromDatum + UnboxDatum> UnboxDatum for Array<'_, T> {
314329
}
315330

316331
unsafe impl<T: FromDatum + UnboxDatum> UnboxDatum for VariadicArray<'_, T> {
317-
type As<'src> = VariadicArray<'src, T> where Self: 'src;
332+
type As<'src>
333+
= VariadicArray<'src, T>
334+
where
335+
Self: 'src;
318336
unsafe fn unbox<'src>(d: Datum<'src>) -> VariadicArray<'src, T>
319337
where
320338
Self: 'src,
@@ -324,7 +342,10 @@ unsafe impl<T: FromDatum + UnboxDatum> UnboxDatum for VariadicArray<'_, T> {
324342
}
325343

326344
unsafe impl<T: FromDatum + UnboxDatum + RangeSubType> UnboxDatum for Range<T> {
327-
type As<'src> = Range<T> where Self: 'src;
345+
type As<'src>
346+
= Range<T>
347+
where
348+
Self: 'src;
328349
unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src>
329350
where
330351
Self: 'src,
@@ -345,7 +366,10 @@ unsafe impl<const P: u32, const S: u32> UnboxDatum for Numeric<P, S> {
345366
}
346367

347368
unsafe impl<T> UnboxDatum for PgBox<T, AllocatedByPostgres> {
348-
type As<'src> = PgBox<T> where Self: 'src;
369+
type As<'src>
370+
= PgBox<T>
371+
where
372+
Self: 'src;
349373
#[inline]
350374
unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src>
351375
where
@@ -356,7 +380,10 @@ unsafe impl<T> UnboxDatum for PgBox<T, AllocatedByPostgres> {
356380
}
357381

358382
unsafe impl UnboxDatum for Json {
359-
type As<'src> = Json where Self: 'src;
383+
type As<'src>
384+
= Json
385+
where
386+
Self: 'src;
360387
#[inline]
361388
unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src>
362389
where
@@ -367,7 +394,10 @@ unsafe impl UnboxDatum for Json {
367394
}
368395

369396
unsafe impl UnboxDatum for JsonB {
370-
type As<'src> = JsonB where Self: 'src;
397+
type As<'src>
398+
= JsonB
399+
where
400+
Self: 'src;
371401
#[inline]
372402
unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src>
373403
where

0 commit comments

Comments
 (0)