Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Debug for IndexEntry, IndexTime, and Time #762

Merged
merged 1 commit into from Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions libgit2-sys/lib.rs
Expand Up @@ -143,7 +143,7 @@ pub struct git_signature {
}

#[repr(C)]
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct git_time {
pub time: git_time_t,
pub offset: c_int,
Expand Down Expand Up @@ -817,7 +817,7 @@ pub const GIT_INDEX_ENTRY_STAGEMASK: u16 = 0x3000;
pub const GIT_INDEX_ENTRY_STAGESHIFT: u16 = 12;

#[repr(C)]
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct git_index_time {
pub seconds: i32,
pub nanoseconds: u32,
Expand Down
1 change: 1 addition & 0 deletions src/index.rs
Expand Up @@ -54,6 +54,7 @@ pub type IndexMatchedPath<'a> = dyn FnMut(&Path, &[u8]) -> i32 + 'a;
/// All fields of an entry are public for modification and inspection. This is
/// also how a new index entry is created.
#[allow(missing_docs)]
#[derive(Debug)]
pub struct IndexEntry {
pub ctime: IndexTime,
pub mtime: IndexTime,
Expand Down
4 changes: 2 additions & 2 deletions src/time.rs
Expand Up @@ -6,13 +6,13 @@ use crate::raw;
use crate::util::Binding;

/// Time in a signature
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct Time {
raw: raw::git_time,
}

/// Time structure used in a git index entry.
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct IndexTime {
raw: raw::git_index_time,
}
Expand Down