Remove unneeded Keyword "mut" and unneeded variable

This commit is contained in:
Matthias Beyer 2016-01-05 16:30:52 +01:00
parent cfd16730c0
commit d14cb47bf9

View file

@ -44,12 +44,13 @@ pub mod data {
pub fn get_named_text_from_header(name: &'static str, header: &FHD) -> Option<String> {
match header {
&FHD::Map{keys: ref ks} => {
let mut keys : Vec<FHD> = ks.clone();
keys.iter().find(|k| {
match k.deref() {
&FHD::Key{name: ref n, value: _} => n == name,
_ => false
}
ks.clone()
.iter()
.find(|k| {
match k.deref() {
&FHD::Key{name: ref n, value: _} => n == name,
_ => false
}
}).and_then(|urlkey| {
match urlkey.deref().clone() {
FHD::Key{name: ref n, value: ref v} => {