Skip to content

Commit 08219d4

Browse files
committed
clippy happy
1 parent 0b745cc commit 08219d4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

gitoxide-core/src/repository/worktree.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ impl WorktreeInfo {
5757
}
5858

5959
fn create_worktree_info(repo: &gix::Repository, base: std::path::PathBuf) -> anyhow::Result<WorktreeInfo> {
60-
let head = repo
61-
.head_id()
62-
.map(|id| id.to_hex_with_len(HEAD_LENGTH).to_string())
63-
.unwrap_or_else(|_| ZERO_HEAD.to_string());
60+
let head = repo.head_id().map_or_else(
61+
|_| ZERO_HEAD.to_string(),
62+
|id| id.to_hex_with_len(HEAD_LENGTH).to_string(),
63+
);
6464

6565
let branch = repo.head_name()?.map_or_else(
6666
|| "<detached>".to_string(),

0 commit comments

Comments
 (0)