mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-04-10 17:31:51 +00:00
Make all fields of Dir private
This commit is contained in:
parent
da9d1f77d9
commit
e835fe8fe3
@ -8,8 +8,8 @@ use file::File;
|
||||
/// check the existence of surrounding files, then highlight themselves
|
||||
/// accordingly. (See `File#get_source_files`)
|
||||
pub struct Dir {
|
||||
pub contents: Vec<Path>,
|
||||
pub path: Path,
|
||||
contents: Vec<Path>,
|
||||
path: Path,
|
||||
}
|
||||
|
||||
impl Dir {
|
||||
@ -42,4 +42,9 @@ impl Dir {
|
||||
pub fn contains(&self, path: &Path) -> bool {
|
||||
self.contents.contains(path)
|
||||
}
|
||||
|
||||
/// Append a path onto the path specified by this directory.
|
||||
pub fn join(&self, child: Path) -> Path {
|
||||
self.path.join(child)
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ impl<'a> File<'a> {
|
||||
|
||||
if let Ok(path) = fs::readlink(&self.path) {
|
||||
let target_path = match self.dir {
|
||||
Some(dir) => dir.path.join(path),
|
||||
Some(dir) => dir.join(path),
|
||||
None => path,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user