mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-28 03:22:51 +03:00
fix amend due to blind clippy warning refactoring (closes #250)
This commit is contained in:
parent
726928b7ba
commit
5445594018
@ -208,10 +208,10 @@ impl CommitComponent {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let res =
|
||||
self.amend.map_or(sync::commit(CWD, &msg), |amend| {
|
||||
sync::amend(CWD, amend, &msg)
|
||||
});
|
||||
let res = self.amend.map_or_else(
|
||||
|| sync::commit(CWD, &msg),
|
||||
|amend| sync::amend(CWD, amend, &msg),
|
||||
);
|
||||
if let Err(e) = res {
|
||||
log::error!("commit error: {}", &e);
|
||||
self.queue.borrow_mut().push_back(
|
||||
|
@ -44,8 +44,8 @@ impl StatusTree {
|
||||
let last_selection_index = self.selection.unwrap_or(0);
|
||||
|
||||
self.tree = FileTreeItems::new(list, &last_collapsed)?;
|
||||
self.selection = last_selection.as_ref().map_or(
|
||||
self.tree.items().first().map(|_| 0),
|
||||
self.selection = last_selection.as_ref().map_or_else(
|
||||
|| self.tree.items().first().map(|_| 0),
|
||||
|last_selection| {
|
||||
self.find_last_selection(
|
||||
last_selection,
|
||||
|
Loading…
Reference in New Issue
Block a user