Avoid clone on sort

master
Jos van den Oever 2017-08-04 22:46:21 +02:00
parent 59d02e45c7
commit 25ee420e88
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ impl Item for DirEntry {
v.push(de);
}
}
v.sort_by_key(|ref i| i.name.clone());
v.sort_by(|a, b| a.name.cmp(&b.name));
return v;
}
}