[core] Improve assert failure message for id epoch mismatches. (#7871)

This commit is contained in:
Jim Blandy authored and GitHub committed 2025-07-02 09:33:55 +02:00
1 parent 92cda27b41
commit 2f890eb9b2
1 file changed
+1 -1
+1 -1
View File
@@ -96,7 +96,7 @@ where
let (index, epoch) = id.unzip();
match mem::replace(&mut self.map[index as usize], Element::Vacant) {
Element::Occupied(value, storage_epoch) => {
assert_eq!(epoch, storage_epoch);
assert_eq!(epoch, storage_epoch, "id epoch mismatch");
value
}
Element::Vacant => panic!("Cannot remove a vacant resource"),