diff options
Diffstat (limited to 'src/entities/entity.rs')
-rw-r--r-- | src/entities/entity.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/entities/entity.rs b/src/entities/entity.rs index 0043a83ecd54..e43175931b68 100644 --- a/src/entities/entity.rs +++ b/src/entities/entity.rs @@ -13,7 +13,7 @@ pub trait Identified<ID>: Debug { fn id(&self) -> ID { self.opt_id() - .expect(format!("Entity ({:?}) is not in the game", self).as_str()) + .unwrap_or_else(|| panic!("Entity ({:?}) is not in the game", self)) } } |