very little optimization

This commit is contained in:
Stephan Dilly 2020-03-22 02:33:04 +01:00
parent 87254045c3
commit e155773c59

View File

@ -38,8 +38,6 @@ pub fn get_index(show: StatusShow) -> Vec<StatusItem> {
let repo = git_utils::repo();
let mut res = Vec::new();
let statuses = repo
.statuses(Some(
StatusOptions::default()
@ -50,6 +48,8 @@ pub fn get_index(show: StatusShow) -> Vec<StatusItem> {
))
.unwrap();
let mut res = Vec::with_capacity(statuses.len());
for e in statuses.iter() {
let status: Status = e.status();