mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Making map+clone more succinct with cloned
This commit is contained in:
parent
48887acff1
commit
de2060e6a1
3 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue