diff options
author | Nadrieril | 2019-03-31 18:47:34 +0200 |
---|---|---|
committer | Nadrieril | 2019-03-31 18:47:34 +0200 |
commit | f5d2151d35942b957230c3081a928af3619d9400 (patch) | |
tree | a7d2568153d2086a9fd5292585636a26bc914f83 /dhall_core/src/printer.rs | |
parent | bc64e9e305f50ad04e6e2071dad8c153c1582b8c (diff) |
Make SubExpr a newtype
Diffstat (limited to '')
-rw-r--r-- | dhall_core/src/printer.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dhall_core/src/printer.rs b/dhall_core/src/printer.rs index 1d1b063..b153d1b 100644 --- a/dhall_core/src/printer.rs +++ b/dhall_core/src/printer.rs @@ -8,6 +8,12 @@ impl<S, A: Display> Display for Expr<S, A> { } } +impl<S, A: Display> Display for SubExpr<S, A> { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + self.as_ref().fmt(f) + } +} + // There is a one-to-one correspondence between the formatter and the grammar. Each phase is // named after a corresponding grammar group, and the structure of the formatter reflects // the relationship between the corresponding grammar rules. This leads to the nice property |