mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
fix clippy on nightly
This commit is contained in:
parent
5cf8547c47
commit
6fcbb99faf
3 changed files with 30 additions and 32 deletions
|
|
@ -87,21 +87,21 @@ impl ChangesComponent {
|
|||
_ => sync::stage_add_file(CWD, path)?,
|
||||
};
|
||||
|
||||
return Ok(true);
|
||||
} else {
|
||||
//TODO: check if we can handle the one file case with it aswell
|
||||
sync::stage_add_all(
|
||||
CWD,
|
||||
tree_item.info.full_path.as_str(),
|
||||
)?;
|
||||
|
||||
return Ok(true);
|
||||
}
|
||||
} else {
|
||||
let path = tree_item.info.full_path.as_str();
|
||||
sync::reset_stage(CWD, path)?;
|
||||
|
||||
//TODO: check if we can handle the one file case with it aswell
|
||||
sync::stage_add_all(
|
||||
CWD,
|
||||
tree_item.info.full_path.as_str(),
|
||||
)?;
|
||||
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
let path = tree_item.info.full_path.as_str();
|
||||
sync::reset_stage(CWD, path)?;
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
Ok(false)
|
||||
|
|
|
|||
|
|
@ -274,18 +274,17 @@ impl FileTreeComponent {
|
|||
{
|
||||
should_skip_over -= 1;
|
||||
break;
|
||||
} else {
|
||||
// There is only one item at this level (i.e only one folder in the folder),
|
||||
// so do fold up
|
||||
}
|
||||
|
||||
let vec_draw_text_info_len =
|
||||
vec_draw_text_info.len();
|
||||
vec_draw_text_info[vec_draw_text_info_len - 1]
|
||||
.name += &(String::from("/")
|
||||
+ &tree_items[idx_temp].info.path);
|
||||
if index_above_select {
|
||||
selection_offset += 1;
|
||||
}
|
||||
// There is only one item at this level (i.e only one folder in the folder),
|
||||
// so do fold up
|
||||
|
||||
let vec_draw_text_info_len = vec_draw_text_info.len();
|
||||
vec_draw_text_info[vec_draw_text_info_len - 1]
|
||||
.name += &(String::from("/")
|
||||
+ &tree_items[idx_temp].info.path);
|
||||
if index_above_select {
|
||||
selection_offset += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,15 +215,15 @@ impl StatusTree {
|
|||
{
|
||||
current_index_in_available_selections = pos;
|
||||
break;
|
||||
} else {
|
||||
// Find the closest to the index, usually this shouldn't happen
|
||||
if current_index == 0 {
|
||||
// This should never happen
|
||||
current_index_in_available_selections = 0;
|
||||
break;
|
||||
}
|
||||
cur_index_find -= 1;
|
||||
}
|
||||
|
||||
// Find the closest to the index, usually this shouldn't happen
|
||||
if current_index == 0 {
|
||||
// This should never happen
|
||||
current_index_in_available_selections = 0;
|
||||
break;
|
||||
}
|
||||
cur_index_find -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -398,9 +398,8 @@ impl StatusTree {
|
|||
}
|
||||
// we are still in a collapsed inner path
|
||||
continue;
|
||||
} else {
|
||||
inner_collapsed = None;
|
||||
}
|
||||
inner_collapsed = None;
|
||||
}
|
||||
|
||||
let item_kind = self.tree[i].kind.clone();
|
||||
|
|
|
|||
Loading…
Reference in a new issue