git-next/crates/git/src/commit.rs

21 lines
547 B
Rust
Raw Normal View History

#[derive(Clone, Debug, PartialEq, Eq, derive_more::Constructor, derive_more::Display)]
2024-05-14 16:28:17 +01:00
#[display("{}", sha)]
pub struct Commit {
sha: Sha,
message: Message,
}
impl Commit {
pub const fn sha(&self) -> &Sha {
&self.sha
}
pub const fn message(&self) -> &Message {
&self.message
}
}
#[derive(Clone, Debug, PartialEq, Eq, derive_more::Constructor, derive_more::Display)]
pub struct Sha(String);
#[derive(Clone, Debug, PartialEq, Eq, derive_more::Constructor, derive_more::Display)]
pub struct Message(String);