Skip to content

Commit 6aec4d4

Browse files
committed
chore(cube): Add general reference-of-type implementation for DisplayAs
1 parent f4e8f4c commit 6aec4d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

datafusion/physical-plan/src/display.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,12 @@ pub trait DisplayAs {
457457
fn fmt_as(&self, t: DisplayFormatType, f: &mut Formatter) -> fmt::Result;
458458
}
459459

460+
impl<T: DisplayAs> DisplayAs for &T {
461+
fn fmt_as(&self, t: DisplayFormatType, f: &mut Formatter) -> fmt::Result {
462+
(*self).fmt_as(t, f)
463+
}
464+
}
465+
460466
/// A new type wrapper to display `T` implementing`DisplayAs` using the `Default` mode
461467
pub struct DefaultDisplay<T>(pub T);
462468

0 commit comments

Comments
 (0)