diff options
author | extrawurst <mail@rusticorn.com> | 2022-09-02 09:09:29 +0200 |
---|---|---|
committer | extrawurst <mail@rusticorn.com> | 2022-09-02 09:09:29 +0200 |
commit | 4249a278b626058ef6a512c7e8bc604b35513802 (patch) | |
tree | 3c076154a611ee8b1fd40d8bf91cec698c455a36 /src/tabs | |
parent | f308bddb7735a5f549878b26db519bb1fb20588c (diff) |
nightly clippy fixes
Diffstat (limited to 'src/tabs')
-rw-r--r-- | src/tabs/status.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/tabs/status.rs b/src/tabs/status.rs index 622912c4..de25ffd5 100644 --- a/src/tabs/status.rs +++ b/src/tabs/status.rs @@ -264,21 +264,21 @@ impl Status { .join(",") ) } - RepoState::Rebase => { - if let Ok(p) = sync::rebase_progress(repo) { - format!( - "Step: {}/{} Current Commit: {}", - p.current + 1, - p.steps, - p.current_commit - .as_ref() - .map(CommitId::get_short_string) - .unwrap_or_default(), - ) - } else { - String::new() - } - } + RepoState::Rebase => sync::rebase_progress(repo) + .map_or_else( + |_| String::new(), + |p| { + format!( + "Step: {}/{} Current Commit: {}", + p.current + 1, + p.steps, + p.current_commit + .as_ref() + .map(CommitId::get_short_string) + .unwrap_or_default(), + ) + }, + ), RepoState::Revert => { format!( "Revert {}", |