mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Return none from depot get if stale id used
This commit is contained in:
parent
69891f0b70
commit
91a647e35f
@ -94,7 +94,7 @@ impl<T> Depot<T> {
|
||||
if entry.gen == id.gen {
|
||||
entry.item.as_ref()
|
||||
} else {
|
||||
panic!("Stale ID used to access depot entry");
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
@ -106,7 +106,7 @@ impl<T> Depot<T> {
|
||||
if entry.gen == id.gen {
|
||||
entry.item.as_mut()
|
||||
} else {
|
||||
panic!("Stale ID used to access depot entry");
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
Loading…
Reference in New Issue
Block a user