File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -661,7 +661,7 @@ impl IndexEntry {
661
661
///
662
662
/// The returned `raw::git_index_entry` contains a pointer to a `CString` path, which is also
663
663
/// returned because it's lifetime must exceed the lifetime of the `raw::git_index_entry`.
664
- pub fn to_raw ( & self ) -> Result < ( raw:: git_index_entry , CString ) , Error > {
664
+ pub ( crate ) unsafe fn to_raw ( & self ) -> Result < ( raw:: git_index_entry , CString ) , Error > {
665
665
let path = CString :: new ( & self . path [ ..] ) ?;
666
666
667
667
// libgit2 encodes the length of the path in the lower bits of the
Original file line number Diff line number Diff line change @@ -2577,11 +2577,11 @@ impl Repository {
2577
2577
theirs : & IndexEntry ,
2578
2578
opts : Option < & mut MergeFileOptions > ,
2579
2579
) -> Result < MergeFileResult < ' _ > , Error > {
2580
- let ( ancestor, _ancestor_path) = ancestor. to_raw ( ) ?;
2581
- let ( ours, _ours_path) = ours. to_raw ( ) ?;
2582
- let ( theirs, _theirs_path) = theirs. to_raw ( ) ?;
2583
-
2584
2580
unsafe {
2581
+ let ( ancestor, _ancestor_path) = ancestor. to_raw ( ) ?;
2582
+ let ( ours, _ours_path) = ours. to_raw ( ) ?;
2583
+ let ( theirs, _theirs_path) = theirs. to_raw ( ) ?;
2584
+
2585
2585
let mut ret = mem:: zeroed ( ) ;
2586
2586
try_call ! ( raw:: git_merge_file_from_index(
2587
2587
& mut ret,
You can’t perform that action at this time.
0 commit comments