Opt for .cloned() over .map(|x| x.clone()) etc.

This commit is contained in:
Kevin Butler
2015-02-13 07:33:44 +00:00
parent 5705d48e28
commit 2f586b9687
39 changed files with 67 additions and 81 deletions

View File

@@ -639,7 +639,7 @@ impl<'a> ExtCtxt<'a> {
pub fn mod_path(&self) -> Vec<ast::Ident> {
let mut v = Vec::new();
v.push(token::str_to_ident(&self.ecfg.crate_name[]));
v.extend(self.mod_path.iter().map(|a| *a));
v.extend(self.mod_path.iter().cloned());
return v;
}
pub fn bt_push(&mut self, ei: ExpnInfo) {