[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.
master
Joseph Frazer 2020-03-12 09:02:18 -04:00 committed by Mike Gerwitz
parent 59a0c382af
commit bc760387f6
1 changed files with 2 additions and 2 deletions

View File

@ -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>,