summaryrefslogtreecommitdiffstats
path: root/src/io
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-06-05 11:20:17 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-06-05 11:20:17 -0400
commitbabf6e62b0f6fea99cedd5680b057437beb9251e (patch)
treecbc36226fc425fa1de328a95e6919af2f39ea83e /src/io
parenta31f9714f81f8801b803356ff467d4a7ad78e34d (diff)
fmt, clippy and make more fields private
Diffstat (limited to 'src/io')
-rw-r--r--src/io/dirlist.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/io/dirlist.rs b/src/io/dirlist.rs
index 8ed8939..0ecd333 100644
--- a/src/io/dirlist.rs
+++ b/src/io/dirlist.rs
@@ -7,8 +7,8 @@ use crate::window::JoshutoPageState;
#[derive(Debug)]
pub struct JoshutoDirList {
pub index: Option<usize>,
- pub path: path::PathBuf,
- pub outdated: bool,
+ path: path::PathBuf,
+ outdated: bool,
pub metadata: JoshutoMetadata,
pub contents: Vec<JoshutoDirEntry>,
pub pagestate: JoshutoPageState,
@@ -45,6 +45,10 @@ impl JoshutoDirList {
self.outdated
}
+ pub fn file_path(&self) -> &path::PathBuf {
+ &self.path
+ }
+
pub fn update_contents(
&mut self,
sort_option: &sort::SortOption,