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,8 +44,9 @@ 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| {
ks.clone()
.iter()
.find(|k| {
match k.deref() {
&FHD::Key{name: ref n, value: _} => n == name,
_ => false