Making map+clone more succinct with cloned

This commit is contained in:
David Raifaizen 2015-10-10 09:31:21 -04:00
parent 48887acff1
commit de2060e6a1
3 changed files with 6 additions and 5 deletions

View file

@ -176,7 +176,7 @@ pub fn reset_pref(name: &str) -> Arc<PrefValue> {
pub fn reset_all_prefs() {
let names = {
PREFS.lock().unwrap().keys().map(|x| x.clone()).collect::<Vec<String>>()
PREFS.lock().unwrap().keys().cloned().collect::<Vec<String>>()
};
for name in names.iter() {
reset_pref(name);