about summary refs log tree commit diff
path: root/src/entities/entity.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-07-29T15·46-0400
committerGriffin Smith <root@gws.fyi>2019-08-03T16·41-0400
commit7138d9a0b627b64f31558f0f4820dec7e55fdee4 (patch)
treea6ea851cdd647cf4cd881dfa62f761b6fdf43cb8 /src/entities/entity.rs
parent9db5fad2f900732d59f9714ac4517952d26506d7 (diff)
Add clippy to circleCI and fix all lints
Diffstat (limited to 'src/entities/entity.rs')
-rw-r--r--src/entities/entity.rs2
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))
     }
 }