diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-02-03 12:22:02 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-02-03 12:22:02 +0100 |
| commit | 3150fd56437ecf8b2a5902c18e3f9ace800b768c (patch) | |
| tree | db8a7e9fc868145804db97da81bd0669aaf55454 /src/syntax/scope.rs | |
| parent | 40ea35cbe7482ce04096c4d63a848c8601cc1848 (diff) | |
Better Debug/Display and Derives 🧽
Diffstat (limited to 'src/syntax/scope.rs')
| -rw-r--r-- | src/syntax/scope.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/syntax/scope.rs b/src/syntax/scope.rs index a6d27c1e..551d0684 100644 --- a/src/syntax/scope.rs +++ b/src/syntax/scope.rs @@ -13,7 +13,7 @@ use super::Model; /// A map from identifiers to function parsers. pub struct Scope { parsers: HashMap<String, Box<Parser>>, - fallback: Box<Parser> + fallback: Box<Parser>, } impl Scope { @@ -63,8 +63,9 @@ impl Scope { impl Debug for Scope { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - write!(f, "Scope ")?; - write!(f, "{:?}", self.parsers.keys()) + f.debug_set() + .entries(self.parsers.keys()) + .finish() } } |
