diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-08-21 16:38:51 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-08-21 17:30:21 +0200 |
| commit | 0dd4ae0a7ac0c247078df492469ff20b8a90c886 (patch) | |
| tree | 07a55343b9ccab3fe76b0f1b0de9d1be310d8b14 /src/eval/template.rs | |
| parent | f38eb10c2b54bd13ccef119454839f6a66448462 (diff) | |
Prune derives
Diffstat (limited to 'src/eval/template.rs')
| -rw-r--r-- | src/eval/template.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/eval/template.rs b/src/eval/template.rs index 2293796b..92b3eb86 100644 --- a/src/eval/template.rs +++ b/src/eval/template.rs @@ -160,15 +160,15 @@ impl Template { } } -impl Display for Template { +impl Debug for Template { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - f.pad("<template>") + f.pad("Template { .. }") } } -impl Debug for Template { +impl Display for Template { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - f.pad("Template { .. }") + f.pad("<template>") } } @@ -465,11 +465,11 @@ impl ParBuilder { } fn push_inner(&mut self, child: ParChild) { - if let ParChild::Text(curr_text, curr_props, curr_align) = &child { - if let Some(ParChild::Text(prev_text, prev_props, prev_align)) = + if let ParChild::Text(curr_text, curr_align, curr_props) = &child { + if let Some(ParChild::Text(prev_text, prev_align, prev_props)) = self.children.last_mut() { - if prev_align == curr_align && prev_props == curr_props { + if prev_align == curr_align && Rc::ptr_eq(prev_props, curr_props) { prev_text.push_str(&curr_text); return; } |
