diff options
Diffstat (limited to 'src/repository')
-rw-r--r-- | src/repository/fs.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/repository/fs.rs b/src/repository/fs.rs index a9a1e65..26570ce 100644 --- a/src/repository/fs.rs +++ b/src/repository/fs.rs @@ -70,6 +70,13 @@ impl PathComponent { fn is_pkg_toml(&self) -> bool { std::matches!(self, PathComponent::PkgToml) } + + fn dir_name(&self) -> Option<&str> { + match self { + PathComponent::PkgToml => None, + PathComponent::DirName(dn) => Some(dn) + } + } } |