Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/tamer/src
diff options
context:
space:
mode:
authorJoseph Frazer <joseph.frazer@ryansg.com>2020-03-12 09:02:18 -0400
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-03-13 11:51:59 -0400
commitbc760387f6d37aa4532d2c1da58b0a5c3502e2de (patch)
treec1bdc2c8882bf71b18844a59c05299fc8e680f07 /tamer/src
parent59a0c382af82e3529cf2ba4c399024fb00387c79 (diff)
downloadtame-bc760387f6d37aa4532d2c1da58b0a5c3502e2de.tar.gz
tame-bc760387f6d37aa4532d2c1da58b0a5c3502e2de.tar.bz2
tame-bc760387f6d37aa4532d2c1da58b0a5c3502e2de.zip
[DEV-7085] Implement `PartialEq` for `Sections`
We want to be able to easily compare `Sections` in tests, so implementing `PartialEq` (and `Debug`) for both `Sections` and `Section` is required.
Diffstat (limited to 'tamer/src')
-rw-r--r--tamer/src/ir/asg/section.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tamer/src/ir/asg/section.rs b/tamer/src/ir/asg/section.rs
index 062a3f2..75c2369 100644
--- a/tamer/src/ir/asg/section.rs
+++ b/tamer/src/ir/asg/section.rs
@@ -27,7 +27,7 @@ pub type ObjectVec<'a, 'i> = Vec<ObjectRef<'a, 'i>>;
/// Most sections will only need a `body`, but some innlude `head` and `tail`
/// information. Rather than dealing with those differently, each `Section`
/// will have a `head` and `tail` that are empty by default.
-#[derive(Clone, Default)]
+#[derive(Clone, Debug, Default, PartialEq)]
pub struct Section<'a, 'i> {
head: ObjectVec<'a, 'i>,
body: ObjectVec<'a, 'i>,
@@ -129,7 +129,7 @@ impl<'a, 'i> Iterator for SectionIterator<'a, 'i> {
///
/// All the properties are public [`Section`] objects and will be accessed
/// directly by the the objects interacting with them.
-#[derive(Default)]
+#[derive(Debug, Default, PartialEq)]
pub struct Sections<'a, 'i> {
pub map: Section<'a, 'i>,
pub retmap: Section<'a, 'i>,