diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-10-07 21:15:50 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-10-07 21:18:49 +0200 |
commit | 485d2802367338892ae4f774b7a39038ec0068b7 (patch) | |
tree | 726eb8246d3ac58d3658e83f32b33b2a42fa2f2d /libimagstore | |
parent | c72291159e5da3bd0e19f294dd1fb79a6f17eff0 (diff) |
Bugfix: The StoreEntry should know the _new_ StoreId
When moving a entry in the store, we also should tell the StoreEntry
the new id.
Diffstat (limited to 'libimagstore')
-rw-r--r-- | libimagstore/src/store.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 35e42d17..242fe10a 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -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()) } } |