From 59d02e45c7fc4f508f576418ee6ff03b91d727b8 Mon Sep 17 00:00:00 2001 From: Jos van den Oever Date: Fri, 4 Aug 2017 22:33:51 +0200 Subject: [PATCH] Fix off by one bug --- common-rust/src/implementation.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common-rust/src/implementation.rs b/common-rust/src/implementation.rs index 2ef0c9c..03fac04 100644 --- a/common-rust/src/implementation.rs +++ b/common-rust/src/implementation.rs @@ -51,7 +51,6 @@ impl Item for DirEntry { } fn retrieve(&self, parents: Vec<&DirEntry>) -> Vec { let path: PathBuf = parents.into_iter().map(|e|&e.name).collect(); -println!("{}", path.to_string_lossy()); let mut v = Vec::new(); if let Ok(it) = read_dir(path) { for i in it.filter_map(|v|v.ok()) { @@ -120,8 +119,8 @@ impl RGeneralItemModel { children: None, data: d }; - row += 1; children.push(self.entries.len() + row); + row += 1; new_entries.push(e); } }