diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/builder.rs | 2 |
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) } |