diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-04 16:55:36 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-04 16:59:39 -0400 |
commit | 97a1b5a9ad52f1d706b02ab6c7cd019da9a124b9 (patch) | |
tree | 2f407ff91aaa6595626e1904430fb0ba44f6d630 /src/history.rs | |
parent | fd4bd6f79ec8051c91f69543fc20d5e8d6607f13 (diff) |
change pub fields to private and rename structs to io
Diffstat (limited to 'src/history.rs')
-rw-r--r-- | src/history.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/history.rs b/src/history.rs index cccb396..38974d1 100644 --- a/src/history.rs +++ b/src/history.rs @@ -1,8 +1,8 @@ use std::collections::{hash_map::Entry, HashMap}; use std::path::{Path, PathBuf}; +use crate::io::JoshutoDirList; use crate::sort; -use crate::structs::JoshutoDirList; pub trait DirectoryHistory { fn populate_to_root(&mut self, pathbuf: &PathBuf, sort_option: &sort::SortOption); @@ -31,7 +31,7 @@ impl DirectoryHistory for JoshutoHistory { match JoshutoDirList::new(curr.to_path_buf().clone(), sort_option) { Ok(mut s) => { let index = s.contents.iter().enumerate().find_map(|(i, dir)| { - if dir.path == ancestor { + if dir.file_path() == ancestor { Some(i) } else { None |