Skip to content

Commit 4ddc85f

Browse files
committed
Fix build (GitoxideLabs#331)
Always a good idea to run all tests beforehand.
1 parent 61a9957 commit 4ddc85f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-worktree/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub mod index {
8888
where
8989
Find: for<'a> FnMut(&oid, &'a mut Vec<u8>) -> Option<git_object::BlobRef<'a>>,
9090
{
91-
let dest = root.join(git_features::path::from_byte_slice(entry_path).ok_or_else(|| {
91+
let dest = root.join(git_features::path::from_byte_slice(entry_path).map_err(|_| {
9292
index::checkout::Error::IllformedUtf8 {
9393
path: entry_path.to_owned(),
9494
}
@@ -126,7 +126,7 @@ pub mod index {
126126
path: root.to_path_buf(),
127127
})?;
128128
let symlink_destination = git_features::path::from_byte_slice(obj.data)
129-
.ok_or_else(|| index::checkout::Error::IllformedUtf8 { path: obj.data.into() })?;
129+
.map_err(|_| index::checkout::Error::IllformedUtf8 { path: obj.data.into() })?;
130130
if symlinks {
131131
#[cfg(unix)]
132132
std::os::unix::fs::symlink(symlink_destination, &dest)?;

0 commit comments

Comments
 (0)