feat: impl Deref for GitDir

This commit is contained in:
Paul Campbell 2024-04-24 06:42:21 +01:00
parent 60af21d07e
commit 7b46045737

View file

@ -416,6 +416,13 @@ impl GitDir {
&self.0
}
}
impl Deref for GitDir {
type Target = PathBuf;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl std::fmt::Display for GitDir {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", &self.0.display())