summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKartikaya Gupta <kats@trevize.staktrace.com>2019-11-27 21:25:15 -0500
committerKartikaya Gupta <kats@trevize.staktrace.com>2019-11-27 21:25:15 -0500
commit487b8fb7bb0f9bd4c12eaa02608d380eddfc3a7a (patch)
treee79fbcba5bfce588b5b9988861c11a764ce22108
parentec9e4a853ed403bb555cca2b4f89f30edb87737b (diff)
downloadmailparse-487b8fb7bb0f9bd4c12eaa02608d380eddfc3a7a.tar.gz
mailparse-487b8fb7bb0f9bd4c12eaa02608d380eddfc3a7a.tar.xz
Impl DerefMut on the MailAddrList as well
-rw-r--r--src/addrparse.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/addrparse.rs b/src/addrparse.rs
index 19ed2dc..ccdc230 100644
--- a/src/addrparse.rs
+++ b/src/addrparse.rs
@@ -97,6 +97,12 @@ impl std::ops::Deref for MailAddrList {
}
}
+impl std::ops::DerefMut for MailAddrList {
+ fn deref_mut(&mut self) -> &mut Vec<MailAddr> {
+ &mut self.0
+ }
+}
+
impl fmt::Display for MailAddrList {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut last_was_group = false;