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:
parent
c72291159e
commit
485d280236
1 changed files with 4 additions and 1 deletions
|
@ -724,7 +724,10 @@ impl Store {
|
||||||
// Should therefor never fail
|
// Should therefor never fail
|
||||||
assert!(hsmap
|
assert!(hsmap
|
||||||
.remove(&old_id)
|
.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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue