From f2f8de773be619c054e5d8a7828cb0d923c2c962 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 12 May 2018 17:42:49 +0200 Subject: [PATCH] message: Rename body into value, since this applies to subject too. --- src/message.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/message.rs b/src/message.rs index ffd8f219..dad3c486 100644 --- a/src/message.rs +++ b/src/message.rs @@ -152,14 +152,14 @@ impl Message { return None; } for lang in preferred_langs { - if let Some(body) = map.get(lang) { - return Some((Lang::from(lang), body)); + if let Some(value) = map.get(lang) { + return Some((Lang::from(lang), value)); } } - if let Some(body) = map.get("") { - return Some((Lang::new(), body)); + if let Some(value) = map.get("") { + return Some((Lang::new(), value)); } - map.iter().map(|(lang, body)| (lang.clone(), body)).next() + map.iter().map(|(lang, value)| (lang.clone(), value)).next() } /// Returns the best matching body from a list of languages.