Skip to content

Commit 470b347

Browse files
committed
clippy
1 parent c6a05bd commit 470b347

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/parsers/fields/address.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
use std::borrow::Cow;
8+
use std::mem;
89

910
use crate::{parsers::MessageStream, Addr, Address, Group, HeaderValue};
1011

@@ -139,7 +140,7 @@ impl<'x> AddressParser<'x> {
139140

140141
if !self.mail_tokens.is_empty() {
141142
if let Some(group_name) = &mut self.group_name {
142-
*group_name = group_name.to_owned() + " " + concat_tokens(&mut self.mail_tokens);
143+
*group_name = mem::take(group_name) + " " + concat_tokens(&mut self.mail_tokens);
143144
} else {
144145
self.group_name = concat_tokens(&mut self.mail_tokens).into();
145146
}

0 commit comments

Comments
 (0)