File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2893,7 +2893,7 @@ extern "C" {
28932893 message : * const c_char ,
28942894 tree : * const git_tree ,
28952895 parent_count : size_t ,
2896- parents : * mut * const git_commit ,
2896+ parents : * const * mut git_commit ,
28972897 ) -> c_int ;
28982898 pub fn git_commit_create_buffer (
28992899 out : * mut git_buf ,
@@ -2904,7 +2904,7 @@ extern "C" {
29042904 message : * const c_char ,
29052905 tree : * const git_tree ,
29062906 parent_count : size_t ,
2907- parents : * mut * const git_commit ,
2907+ parents : * const * mut git_commit ,
29082908 ) -> c_int ;
29092909 pub fn git_commit_header_field (
29102910 out : * mut git_buf ,
Original file line number Diff line number Diff line change @@ -1290,9 +1290,9 @@ impl Repository {
12901290 parents : & [ & Commit < ' _ > ] ,
12911291 ) -> Result < Oid , Error > {
12921292 let update_ref = crate :: opt_cstr ( update_ref) ?;
1293- let mut parent_ptrs = parents
1293+ let parent_ptrs = parents
12941294 . iter ( )
1295- . map ( |p| p. raw ( ) as * const raw:: git_commit )
1295+ . map ( |p| p. raw ( ) as * mut raw:: git_commit )
12961296 . collect :: < Vec < _ > > ( ) ;
12971297 let message = CString :: new ( message) ?;
12981298 let mut raw = raw:: git_oid {
@@ -1309,7 +1309,7 @@ impl Repository {
13091309 message,
13101310 tree. raw( ) ,
13111311 parents. len( ) as size_t,
1312- parent_ptrs. as_mut_ptr ( )
1312+ parent_ptrs. as_ptr ( )
13131313 ) ) ;
13141314 Ok ( Binding :: from_raw ( & raw as * const _) )
13151315 }
@@ -1328,9 +1328,9 @@ impl Repository {
13281328 tree : & Tree < ' _ > ,
13291329 parents : & [ & Commit < ' _ > ] ,
13301330 ) -> Result < Buf , Error > {
1331- let mut parent_ptrs = parents
1331+ let parent_ptrs = parents
13321332 . iter ( )
1333- . map ( |p| p. raw ( ) as * const raw:: git_commit )
1333+ . map ( |p| p. raw ( ) as * mut raw:: git_commit )
13341334 . collect :: < Vec < _ > > ( ) ;
13351335 let message = CString :: new ( message) ?;
13361336 let buf = Buf :: new ( ) ;
@@ -1344,7 +1344,7 @@ impl Repository {
13441344 message,
13451345 tree. raw( ) ,
13461346 parents. len( ) as size_t,
1347- parent_ptrs. as_mut_ptr ( )
1347+ parent_ptrs. as_ptr ( )
13481348 ) ) ;
13491349 Ok ( buf)
13501350 }
You can’t perform that action at this time.
0 commit comments