File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -661,7 +661,7 @@ impl IndexEntry {
661661 ///
662662 /// The returned `raw::git_index_entry` contains a pointer to a `CString` path, which is also
663663 /// 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 > {
665665 let path = CString :: new ( & self . path [ ..] ) ?;
666666
667667 // 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 {
25772577 theirs : & IndexEntry ,
25782578 opts : Option < & mut MergeFileOptions > ,
25792579 ) -> 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-
25842580 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+
25852585 let mut ret = mem:: zeroed ( ) ;
25862586 try_call ! ( raw:: git_merge_file_from_index(
25872587 & mut ret,
You can’t perform that action at this time.
0 commit comments