Unified · Split
| @@ -38,7 +38,7 @@ pub mod snapshot; · 37 unmodified lines | ||
| 38 | 38 | /// optionally name to find mappings to new names and/or emails. |
| 39 | 39 | /// |
| 40 | 40 | /// The memory layout is efficient, even though lots of small allocations are performed to store strings of emails and names. |
| 41 | −#[derive(Default, Clone)] | |
| 41 | +#[derive(Default, Clone, Debug, Eq, PartialEq)] | |
| 42 | 42 | pub struct Snapshot { |
| 43 | 43 | /// Sorted by `old_email` |
| 44 | 44 | entries_by_old_email: Vec<snapshot::EmailEntry>, |
| @@ -2,14 +2,14 @@ use bstr::BString; · 1 unmodified line | ||
| 2 | 2 | |
| 3 | 3 | use crate::snapshot::util::{EncodedString, EncodedStringRef}; |
| 4 | 4 | |
| 5 | −#[derive(Clone)] | |
| 5 | +#[derive(Clone, Debug, Eq, PartialEq)] | |
| 6 | 6 | pub(crate) struct NameEntry { |
| 7 | 7 | pub(crate) new_name: Option<BString>, |
| 8 | 8 | pub(crate) new_email: Option<BString>, |
| 9 | 9 | pub(crate) old_name: EncodedString, |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | −#[derive(Clone)] | |
| 12 | +#[derive(Clone, Debug, Eq, PartialEq)] | |
| 13 | 13 | pub(crate) struct EmailEntry { |
| 14 | 14 | pub(crate) new_name: Option<BString>, |
| 15 | 15 | pub(crate) new_email: Option<BString>, |
| @@ -2,8 +2,7 @@ use std::{cmp::Ordering, ops::Deref}; · 1 unmodified line | ||
| 2 | 2 | |
| 3 | 3 | use bstr::{BStr, BString, ByteSlice}; |
| 4 | 4 | |
| 5 | −#[cfg_attr(test, derive(Debug))] | |
| 6 | −#[derive(Clone)] | |
| 5 | +#[derive(Clone, Debug, Eq, PartialEq)] | |
| 7 | 6 | pub enum EncodedString { |
| 8 | 7 | Utf8(String), |
| 9 | 8 | Unknown(BString), |