From f65bfe1855e84537e0f5bf04d084e8e1431579ba Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Mon, 29 Jul 2024 19:01:54 -0700 Subject: [PATCH 1/2] Update expect test output --- examples/calc/parser.rs | 48 +++++++++++------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/examples/calc/parser.rs b/examples/calc/parser.rs index 05c1c4b3..4b278f5a 100644 --- a/examples/calc/parser.rs +++ b/examples/calc/parser.rs @@ -399,9 +399,7 @@ fn parse_print() { end: 7, }, data: Number( - OrderedFloat( - 1.0, - ), + 1.0, ), }, Add, @@ -412,9 +410,7 @@ fn parse_print() { end: 11, }, data: Number( - OrderedFloat( - 2.0, - ), + 2.0, ), }, ), @@ -550,9 +546,7 @@ fn parse_example() { end: 81, }, data: Number( - OrderedFloat( - 3.14, - ), + 3.14, ), }, Multiply, @@ -613,9 +607,7 @@ fn parse_example() { end: 124, }, data: Number( - OrderedFloat( - 3.0, - ), + 3.0, ), }, Expression { @@ -625,9 +617,7 @@ fn parse_example() { end: 127, }, data: Number( - OrderedFloat( - 4.0, - ), + 4.0, ), }, ], @@ -660,9 +650,7 @@ fn parse_example() { end: 160, }, data: Number( - OrderedFloat( - 1.0, - ), + 1.0, ), }, ], @@ -691,9 +679,7 @@ fn parse_example() { end: 182, }, data: Number( - OrderedFloat( - 11.0, - ), + 11.0, ), }, Multiply, @@ -704,9 +690,7 @@ fn parse_example() { end: 186, }, data: Number( - OrderedFloat( - 2.0, - ), + 2.0, ), }, ), @@ -780,9 +764,7 @@ fn parse_precedence() { end: 7, }, data: Number( - OrderedFloat( - 1.0, - ), + 1.0, ), }, Add, @@ -800,9 +782,7 @@ fn parse_precedence() { end: 11, }, data: Number( - OrderedFloat( - 2.0, - ), + 2.0, ), }, Multiply, @@ -813,9 +793,7 @@ fn parse_precedence() { end: 15, }, data: Number( - OrderedFloat( - 3.0, - ), + 3.0, ), }, ), @@ -830,9 +808,7 @@ fn parse_precedence() { end: 19, }, data: Number( - OrderedFloat( - 4.0, - ), + 4.0, ), }, ), From b8ab0f8ba479139d4231364ea99080ab83746ca8 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Fri, 2 Aug 2024 13:31:53 -0700 Subject: [PATCH 2/2] Require Debug for C::Stamps --- src/array.rs | 3 ++- src/input.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/array.rs b/src/array.rs index c9441093..ef82d9dd 100644 --- a/src/array.rs +++ b/src/array.rs @@ -1,6 +1,7 @@ +use std::fmt::Debug; use std::ops::{Deref, DerefMut}; -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug)] pub struct Array { data: [T; N], } diff --git a/src/input.rs b/src/input.rs index ba1bd41a..6baec5a4 100644 --- a/src/input.rs +++ b/src/input.rs @@ -36,7 +36,7 @@ pub trait Configuration: Any { type Fields: Send + Sync; /// A array of [`StampedValue<()>`](`StampedValue`) tuples, one per each of the value fields. - type Stamps: Send + Sync + DerefMut; + type Stamps: Send + Sync + fmt::Debug + DerefMut; } pub struct JarImpl {