From 7b46045737696328f4bd10197559374ff786e8f1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 24 Apr 2024 06:42:21 +0100 Subject: [PATCH] feat: impl Deref for GitDir --- src/server/config/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server/config/mod.rs b/src/server/config/mod.rs index a1c2179f..74a2141e 100644 --- a/src/server/config/mod.rs +++ b/src/server/config/mod.rs @@ -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())