use std::fmt;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct GitOid {
hex: String,
}
impl GitOid {
pub fn from_hex(hex: impl Into<String>) -> Self {
Self { hex: hex.into() }
}
pub fn as_str(&self) -> &str {
&self.hex
}
}
impl fmt::Display for GitOid {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.hex)
}
}