summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hurst <tom@hur.st>2018-09-04 22:37:55 +0100
committerKartikaya Gupta (kats) <staktrace@users.noreply.github.com>2018-09-05 04:05:28 -0400
commit8a49f59217f0e2591817f4852dec3e64c91ad3eb (patch)
tree4883d14bceb2927a8b0ce5ff7a5da90309d5adcd
parent8e67af9de8d92b811809066d22a1a1caf327c78d (diff)
downloadmailparse-8a49f59217f0e2591817f4852dec3e64c91ad3eb.tar.gz
mailparse-8a49f59217f0e2591817f4852dec3e64c91ad3eb.tar.xz
map(|x| Some(x)) -> map(Some)
clippy:redundant_closure
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 3b59f19..b17cb56 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -417,7 +417,7 @@ impl<'a> MailHeaderMap for Vec<MailHeader<'a>> {
fn get_first_value(&self, key: &str) -> Result<Option<String>, MailParseError> {
for x in self {
if try!(x.get_key()).eq_ignore_ascii_case(key) {
- return x.get_value().map(|v| Some(v));
+ return x.get_value().map(Some);
}
}
Ok(None)