diff options
author | qkzk <qu3nt1n@gmail.com> | 2022-12-30 21:19:38 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2022-12-30 21:19:38 +0100 |
commit | 6403a6d69fde23c6e3a0c761b693f42b83420417 (patch) | |
tree | 74baf8e8b2ad4c06409bd1961991463683ad9aa5 /src/visited.rs | |
parent | d2e750a9741bdc2b8cca5ff8bf7124c25c65c121 (diff) |
refresh view also refresh users cachecache-users
Diffstat (limited to 'src/visited.rs')
-rw-r--r-- | src/visited.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/visited.rs b/src/visited.rs index 0832f77..a42099b 100644 --- a/src/visited.rs +++ b/src/visited.rs @@ -19,8 +19,9 @@ impl History { /// Add a new path in the stack, without duplicates, and select the last /// one. pub fn push(&mut self, path: &std::path::Path) { - if !self.content.contains(&path.to_path_buf()) { - self.content.push(path.to_path_buf()); + let path = path.to_path_buf(); + if !self.content.contains(&path) { + self.content.push(path); self.index = self.len() - 1 } } |