forked from kemitix/git-next
feat: impl Deref for GitDir
This commit is contained in:
parent
60af21d07e
commit
7b46045737
1 changed files with 7 additions and 0 deletions
|
@ -416,6 +416,13 @@ impl GitDir {
|
||||||
&self.0
|
&self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl Deref for GitDir {
|
||||||
|
type Target = PathBuf;
|
||||||
|
|
||||||
|
fn deref(&self) -> &Self::Target {
|
||||||
|
&self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
impl std::fmt::Display for GitDir {
|
impl std::fmt::Display for GitDir {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "{}", &self.0.display())
|
write!(f, "{}", &self.0.display())
|
||||||
|
|
Loading…
Reference in a new issue