1
1
#![ allow( non_camel_case_types, missing_copy_implementations) ]
2
+ #![ allow( raw_pointer_derive) ]
2
3
4
+ #[ allow( unstable) ]
3
5
extern crate libc;
4
6
extern crate "libssh2-sys" as libssh2;
5
7
#[ cfg( unix) ] extern crate "openssl-sys" as openssl;
@@ -36,8 +38,8 @@ pub use git_diff_stats_format_t::*;
36
38
37
39
use libc:: { c_int, c_char, c_uint, size_t, c_uchar, c_void, c_ushort} ;
38
40
39
- pub const GIT_OID_RAWSZ : uint = 20 ;
40
- pub const GIT_OID_HEXSZ : uint = GIT_OID_RAWSZ * 2 ;
41
+ pub const GIT_OID_RAWSZ : usize = 20 ;
42
+ pub const GIT_OID_HEXSZ : usize = GIT_OID_RAWSZ * 2 ;
41
43
pub const GIT_CLONE_OPTIONS_VERSION : c_uint = 1 ;
42
44
pub const GIT_CHECKOUT_OPTIONS_VERSION : c_uint = 1 ;
43
45
pub const GIT_REMOTE_CALLBACKS_VERSION : c_uint = 1 ;
@@ -77,19 +79,19 @@ pub struct git_revspec {
77
79
}
78
80
79
81
#[ repr( C ) ]
80
- #[ derive( Show ) ]
81
82
pub struct git_error {
82
83
pub message : * mut c_char ,
83
84
pub klass : c_int ,
84
85
}
85
86
86
87
#[ repr( C ) ]
87
- #[ derive( Copy , Show ) ]
88
+ #[ derive( Copy ) ]
88
89
pub struct git_oid {
89
90
pub id : [ u8 ; GIT_OID_RAWSZ ] ,
90
91
}
91
92
92
93
#[ repr( C ) ]
94
+ #[ derive( Copy ) ]
93
95
pub struct git_strarray {
94
96
pub strings : * mut * mut c_char ,
95
97
pub count : size_t ,
@@ -103,7 +105,7 @@ pub struct git_signature {
103
105
}
104
106
105
107
#[ repr( C ) ]
106
- #[ derive( Copy ) ]
108
+ #[ derive( Copy , Clone , Eq , PartialEq ) ]
107
109
pub struct git_time {
108
110
pub time : git_time_t ,
109
111
pub offset : c_int ,
@@ -118,7 +120,7 @@ pub const GIT_REVPARSE_RANGE: c_int = 1 << 1;
118
120
pub const GIT_REVPARSE_MERGE_BASE : c_int = 1 << 2 ;
119
121
120
122
#[ repr( C ) ]
121
- #[ derive( PartialEq , Eq , Clone , Show , Copy ) ]
123
+ #[ derive( PartialEq , Eq , Clone , Copy ) ]
122
124
pub enum git_error_code {
123
125
GIT_OK = 0 ,
124
126
@@ -465,7 +467,7 @@ pub enum git_ref_t {
465
467
GIT_REF_INVALID = 0 ,
466
468
GIT_REF_OID = 1 ,
467
469
GIT_REF_SYMBOLIC = 2 ,
468
- GIT_REF_LISTALL = GIT_REF_OID as int | GIT_REF_SYMBOLIC as int ,
470
+ GIT_REF_LISTALL = GIT_REF_OID as isize | GIT_REF_SYMBOLIC as isize ,
469
471
}
470
472
471
473
#[ repr( C ) ]
@@ -490,6 +492,7 @@ pub type git_treewalk_cb = extern fn(*const c_char, *const git_tree_entry,
490
492
* mut c_void ) -> c_int ;
491
493
492
494
#[ repr( C ) ]
495
+ #[ derive( Copy ) ]
493
496
pub struct git_buf {
494
497
pub ptr : * mut c_char ,
495
498
pub asize : size_t ,
@@ -501,13 +504,14 @@ pub struct git_buf {
501
504
pub enum git_branch_t {
502
505
GIT_BRANCH_LOCAL = 1 ,
503
506
GIT_BRANCH_REMOTE = 2 ,
504
- GIT_BRANCH_ALL = GIT_BRANCH_LOCAL as int | GIT_BRANCH_REMOTE as int ,
507
+ GIT_BRANCH_ALL = GIT_BRANCH_LOCAL as isize | GIT_BRANCH_REMOTE as isize ,
505
508
}
506
509
507
510
pub type git_index_matched_path_cb = extern fn ( * const c_char , * const c_char ,
508
511
* mut c_void ) -> c_int ;
509
512
510
513
#[ repr( C ) ]
514
+ #[ derive( Copy ) ]
511
515
pub struct git_index_entry {
512
516
pub ctime : git_index_time ,
513
517
pub mtime : git_index_time ,
@@ -524,7 +528,7 @@ pub struct git_index_entry {
524
528
}
525
529
526
530
#[ repr( C ) ]
527
- #[ derive( Copy ) ]
531
+ #[ derive( Copy , Clone , Eq , PartialEq ) ]
528
532
pub struct git_index_time {
529
533
pub seconds : git_time_t ,
530
534
pub nanoseconds : c_uint ,
0 commit comments