summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hurst <tom@hur.st>2018-09-04 22:18:53 +0100
committerKartikaya Gupta (kats) <staktrace@users.noreply.github.com>2018-09-05 04:05:28 -0400
commitd31ccf10c38bc1e2c97c71102ab6ae1a2161b54b (patch)
treed618449c06bfa0eb427d1d28b5fdeb7efe87c240
parentfc756c0d435dadb56774dcefd44fe3c161175e5c (diff)
Use Struct { foo } over Struct { foo: foo }
clippy:redundant_field_names
-rw-r--r--src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c1be8aa..237706c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -554,8 +554,8 @@ pub fn parse_content_type(header: &str) -> ParsedContentType {
);
ParsedContentType {
- mimetype: mimetype,
- charset: charset,
+ mimetype,
+ charset,
params: params.params,
}
}
@@ -628,7 +628,7 @@ pub fn parse_content_disposition(header: &str) -> ParsedContentDisposition {
let params = parse_param_content(header);
let disposition = parse_disposition_type(&params.value);
ParsedContentDisposition {
- disposition: disposition,
+ disposition,
params: params.params,
}
}
@@ -775,8 +775,8 @@ pub fn parse_mail(raw_data: &[u8]) -> Result<ParsedMail, MailParseError> {
.unwrap_or_default();
let mut result = ParsedMail {
- headers: headers,
- ctype: ctype,
+ headers,
+ ctype,
body: &raw_data[ix_body..],
subparts: Vec::<ParsedMail>::new(),
};