11#![ allow( non_camel_case_types, missing_copy_implementations) ]
2+ #![ allow( raw_pointer_derive) ]
23
4+ #[ allow( unstable) ]
35extern crate libc;
46extern crate "libssh2-sys" as libssh2;
57#[ cfg( unix) ] extern crate "openssl-sys" as openssl;
@@ -36,8 +38,8 @@ pub use git_diff_stats_format_t::*;
3638
3739use libc:: { c_int, c_char, c_uint, size_t, c_uchar, c_void, c_ushort} ;
3840
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 ;
4143pub const GIT_CLONE_OPTIONS_VERSION : c_uint = 1 ;
4244pub const GIT_CHECKOUT_OPTIONS_VERSION : c_uint = 1 ;
4345pub const GIT_REMOTE_CALLBACKS_VERSION : c_uint = 1 ;
@@ -77,19 +79,19 @@ pub struct git_revspec {
7779}
7880
7981#[ repr( C ) ]
80- #[ derive( Show ) ]
8182pub struct git_error {
8283 pub message : * mut c_char ,
8384 pub klass : c_int ,
8485}
8586
8687#[ repr( C ) ]
87- #[ derive( Copy , Show ) ]
88+ #[ derive( Copy ) ]
8889pub struct git_oid {
8990 pub id : [ u8 ; GIT_OID_RAWSZ ] ,
9091}
9192
9293#[ repr( C ) ]
94+ #[ derive( Copy ) ]
9395pub struct git_strarray {
9496 pub strings : * mut * mut c_char ,
9597 pub count : size_t ,
@@ -103,7 +105,7 @@ pub struct git_signature {
103105}
104106
105107#[ repr( C ) ]
106- #[ derive( Copy ) ]
108+ #[ derive( Copy , Clone , Eq , PartialEq ) ]
107109pub struct git_time {
108110 pub time : git_time_t ,
109111 pub offset : c_int ,
@@ -118,7 +120,7 @@ pub const GIT_REVPARSE_RANGE: c_int = 1 << 1;
118120pub const GIT_REVPARSE_MERGE_BASE : c_int = 1 << 2 ;
119121
120122#[ repr( C ) ]
121- #[ derive( PartialEq , Eq , Clone , Show , Copy ) ]
123+ #[ derive( PartialEq , Eq , Clone , Copy ) ]
122124pub enum git_error_code {
123125 GIT_OK = 0 ,
124126
@@ -465,7 +467,7 @@ pub enum git_ref_t {
465467 GIT_REF_INVALID = 0 ,
466468 GIT_REF_OID = 1 ,
467469 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 ,
469471}
470472
471473#[ repr( C ) ]
@@ -490,6 +492,7 @@ pub type git_treewalk_cb = extern fn(*const c_char, *const git_tree_entry,
490492 * mut c_void ) -> c_int ;
491493
492494#[ repr( C ) ]
495+ #[ derive( Copy ) ]
493496pub struct git_buf {
494497 pub ptr : * mut c_char ,
495498 pub asize : size_t ,
@@ -501,13 +504,14 @@ pub struct git_buf {
501504pub enum git_branch_t {
502505 GIT_BRANCH_LOCAL = 1 ,
503506 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 ,
505508}
506509
507510pub type git_index_matched_path_cb = extern fn ( * const c_char , * const c_char ,
508511 * mut c_void ) -> c_int ;
509512
510513#[ repr( C ) ]
514+ #[ derive( Copy ) ]
511515pub struct git_index_entry {
512516 pub ctime : git_index_time ,
513517 pub mtime : git_index_time ,
@@ -524,7 +528,7 @@ pub struct git_index_entry {
524528}
525529
526530#[ repr( C ) ]
527- #[ derive( Copy ) ]
531+ #[ derive( Copy , Clone , Eq , PartialEq ) ]
528532pub struct git_index_time {
529533 pub seconds : git_time_t ,
530534 pub nanoseconds : c_uint ,
0 commit comments