aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests.rs
diff options
context:
space:
mode:
authorTeddy Wing2016-04-17 21:35:49 -0400
committerTeddy Wing2016-04-17 21:35:49 -0400
commitb182ea18dd664bc36e56601635ceb5ffdd67dc69 (patch)
treef39618ef98d5e66e8692737fd95c095717093d9c /src/tests.rs
parent9240db56a7202b238b7880da9c82b1e73089f02e (diff)
downloadmutt-alias-auto-add-b182ea18dd664bc36e56601635ceb5ffdd67dc69.tar.bz2
Add a new `Alias` struct and implementation
This allows us to represent an alias not just as a string, but as an entity where we can ask for and isolate different parts of the alias. This makes it more convenient to get just the "alias" part, or just the "email" part for example. Doing so is necessary for making accurate comparisons/searches to find out whether this email or alias already exists in our alias file. Two functions are implemented on this type. One, `to_string`, creates a Mutt alias line as a string. The other builds a new `Alias` object from a "From: " string, taking nearly the same steps as `build_alias` does. We'll want to transition `build_alias` to this `Alias::new` function, using the new one in the future.
Diffstat (limited to 'src/tests.rs')
0 files changed, 0 insertions, 0 deletions