Skip to content

Commit a43cac6

Browse files
committed
Replace code that only works on Unix
1 parent c444da7 commit a43cac6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitoxide-core/src/repository/blame.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{ffi::OsStr, os::unix::ffi::OsStrExt, path::PathBuf, str::Lines};
1+
use std::{ffi::OsStr, path::PathBuf, str::Lines};
22

33
use gix::bstr::BStr;
44

@@ -8,7 +8,7 @@ pub fn blame_file(repo: gix::Repository, file: &OsStr, out: impl std::io::Write)
88
let mut resource_cache = repo.diff_resource_cache_for_tree_diff()?;
99

1010
let work_dir: PathBuf = repo.work_dir().expect("TODO").into();
11-
let file_path: &BStr = file.as_bytes().into();
11+
let file_path: &BStr = gix::path::os_str_into_bstr(file)?;
1212

1313
let blame_entries = gix::blame::blame_file(
1414
&repo.objects,

0 commit comments

Comments
 (0)