Bugfix: The StoreEntry should know the _new_ StoreId

When moving a entry in the store, we also should tell the StoreEntry
the new id.
This commit is contained in:
Matthias Beyer 2016-10-07 21:15:50 +02:00
parent c72291159e
commit 485d280236

View file

@ -724,7 +724,10 @@ impl Store {
// Should therefor never fail
assert!(hsmap
.remove(&old_id)
.and_then(|entry| hsmap.insert(new_id.clone(), entry)).is_none())
.and_then(|mut entry| {
entry.id = new_id.clone();
hsmap.insert(new_id.clone(), entry)
}).is_none())
}
}