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 @@ -619,7 +619,7 @@ impl IndexEntry {
619
619
///
620
620
/// The returned `raw::git_index_entry` contains a pointer to a `CString` path, which is also
621
621
/// returned because it's lifetime must exceed the lifetime of the `raw::git_index_entry`.
622
- pub fn to_raw ( & self ) -> Result < ( raw:: git_index_entry , CString ) , Error > {
622
+ pub ( crate ) unsafe fn to_raw ( & self ) -> Result < ( raw:: git_index_entry , CString ) , Error > {
623
623
let path = CString :: new ( & self . path [ ..] ) ?;
624
624
625
625
// libgit2 encodes the length of the path in the lower bits of the
Original file line number Diff line number Diff line change @@ -2516,11 +2516,11 @@ impl Repository {
2516
2516
theirs : & IndexEntry ,
2517
2517
opts : Option < & mut MergeFileOptions > ,
2518
2518
) -> Result < MergeFileResult < ' _ > , Error > {
2519
- let ( ancestor, _ancestor_path) = ancestor. to_raw ( ) ?;
2520
- let ( ours, _ours_path) = ours. to_raw ( ) ?;
2521
- let ( theirs, _theirs_path) = theirs. to_raw ( ) ?;
2522
-
2523
2519
unsafe {
2520
+ let ( ancestor, _ancestor_path) = ancestor. to_raw ( ) ?;
2521
+ let ( ours, _ours_path) = ours. to_raw ( ) ?;
2522
+ let ( theirs, _theirs_path) = theirs. to_raw ( ) ?;
2523
+
2524
2524
let mut ret = mem:: zeroed ( ) ;
2525
2525
try_call ! ( raw:: git_merge_file_from_index(
2526
2526
& mut ret,
You can’t perform that action at this time.
0 commit comments