summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-13 19:15:19 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-13 19:15:19 +0200
commit92ce5228ec468d573db67f73b8faedf7b2b04ea0 (patch)
tree904d090816c1723e61d24051f3e86e2810a01641 /src
parent319e069106381d9311e598c592515fedefc60dd0 (diff)
downloadobnam-benchmark-92ce5228ec468d573db67f73b8faedf7b2b04ea0.tar.gz
unwrap-or
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
Diffstat (limited to 'src')
-rw-r--r--src/builder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builder.rs b/src/builder.rs
index b94dbe4..f2aadf2 100644
--- a/src/builder.rs
+++ b/src/builder.rs
@@ -140,7 +140,7 @@ fn git_create_branch(dir: &Path, branch: &str, commit: &str) -> Result<(), Obnam
fn git_resolve(dir: &Path, commit: &str) -> Result<String, ObnamBuilderError> {
run("git", &["rev-parse", commit], dir)
- .map(|s| s.strip_suffix('\n').or(Some("")).unwrap().to_string())
+ .map(|s| s.strip_suffix('\n').unwrap_or("").to_string())
.map_err(ObnamBuilderError::Git)
}