item id fix
This commit is contained in:
parent
7de6d6bf7b
commit
5090b85c60
2 changed files with 7 additions and 3 deletions
|
@ -30,7 +30,7 @@ impl ItemDB {
|
|||
.documents
|
||||
.iter()
|
||||
.map(Item::new) // <-- todo : performance?
|
||||
.find(|x| x.id() == item)
|
||||
.find(|x| x._id == item)
|
||||
}
|
||||
|
||||
/// Get all items
|
||||
|
@ -38,7 +38,7 @@ impl ItemDB {
|
|||
let mut ret = vec![];
|
||||
for item in &self.index.documents {
|
||||
let item = Item::new(item);
|
||||
ret.push(item.name);
|
||||
ret.push(item._id.clone());
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue