File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2893,7 +2893,7 @@ extern "C" {
2893
2893
message : * const c_char ,
2894
2894
tree : * const git_tree ,
2895
2895
parent_count : size_t ,
2896
- parents : * mut * const git_commit ,
2896
+ parents : * const * mut git_commit ,
2897
2897
) -> c_int ;
2898
2898
pub fn git_commit_create_buffer (
2899
2899
out : * mut git_buf ,
@@ -2904,7 +2904,7 @@ extern "C" {
2904
2904
message : * const c_char ,
2905
2905
tree : * const git_tree ,
2906
2906
parent_count : size_t ,
2907
- parents : * mut * const git_commit ,
2907
+ parents : * const * mut git_commit ,
2908
2908
) -> c_int ;
2909
2909
pub fn git_commit_header_field (
2910
2910
out : * mut git_buf ,
Original file line number Diff line number Diff line change @@ -1290,9 +1290,9 @@ impl Repository {
1290
1290
parents : & [ & Commit < ' _ > ] ,
1291
1291
) -> Result < Oid , Error > {
1292
1292
let update_ref = crate :: opt_cstr ( update_ref) ?;
1293
- let mut parent_ptrs = parents
1293
+ let parent_ptrs = parents
1294
1294
. iter ( )
1295
- . map ( |p| p. raw ( ) as * const raw:: git_commit )
1295
+ . map ( |p| p. raw ( ) as * mut raw:: git_commit )
1296
1296
. collect :: < Vec < _ > > ( ) ;
1297
1297
let message = CString :: new ( message) ?;
1298
1298
let mut raw = raw:: git_oid {
@@ -1309,7 +1309,7 @@ impl Repository {
1309
1309
message,
1310
1310
tree. raw( ) ,
1311
1311
parents. len( ) as size_t,
1312
- parent_ptrs. as_mut_ptr ( )
1312
+ parent_ptrs. as_ptr ( )
1313
1313
) ) ;
1314
1314
Ok ( Binding :: from_raw ( & raw as * const _) )
1315
1315
}
@@ -1328,9 +1328,9 @@ impl Repository {
1328
1328
tree : & Tree < ' _ > ,
1329
1329
parents : & [ & Commit < ' _ > ] ,
1330
1330
) -> Result < Buf , Error > {
1331
- let mut parent_ptrs = parents
1331
+ let parent_ptrs = parents
1332
1332
. iter ( )
1333
- . map ( |p| p. raw ( ) as * const raw:: git_commit )
1333
+ . map ( |p| p. raw ( ) as * mut raw:: git_commit )
1334
1334
. collect :: < Vec < _ > > ( ) ;
1335
1335
let message = CString :: new ( message) ?;
1336
1336
let buf = Buf :: new ( ) ;
@@ -1344,7 +1344,7 @@ impl Repository {
1344
1344
message,
1345
1345
tree. raw( ) ,
1346
1346
parents. len( ) as size_t,
1347
- parent_ptrs. as_mut_ptr ( )
1347
+ parent_ptrs. as_ptr ( )
1348
1348
) ) ;
1349
1349
Ok ( buf)
1350
1350
}
You can’t perform that action at this time.
0 commit comments