about summary refs log tree commit diff
path: root/src/entities/raws.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-08-25T17·25-0400
committerGriffin Smith <root@gws.fyi>2019-08-25T17·25-0400
commitfb0d1b3e66251aa56a3df1d05fd4b82b33380a31 (patch)
tree367edbe5f504a3eb8130e5e0a8dd695fbbc65684 /src/entities/raws.rs
parente2d2f011c6373894b3cdcfbdb98fbc783504561a (diff)
Wipe Rust project
Sorry rust, but you're just not fun to write
Diffstat (limited to 'src/entities/raws.rs')
-rw-r--r--src/entities/raws.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/entities/raws.rs b/src/entities/raws.rs
deleted file mode 100644
index 061e29a84037..000000000000
--- a/src/entities/raws.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-pub use crate::entities::raw_types::{CreatureType, EntityRaw, ItemType};
-use std::collections::HashMap;
-
-static_cfg! {
-    static ref RAWS: Vec<EntityRaw<'static>> = cfg_dir("src/entities/raws");
-}
-
-lazy_static! {
-    static ref RAWS_BY_NAME: HashMap<&'static str, &'static EntityRaw<'static>> = {
-        let mut hm = HashMap::new();
-        for er in RAWS.iter() {
-            if hm.contains_key(er.name()) {
-                panic!("Duplicate entity: {}", er.name())
-            }
-
-            hm.insert(er.name(), er);
-        }
-        hm
-    };
-}
-
-pub fn raw(name: &'static str) -> &'static EntityRaw<'static> {
-    RAWS_BY_NAME
-        .get(name)
-        .copied()
-        .unwrap_or_else(|| panic!("Raw not found: {}", name))
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn test_raws() {
-        RAWS_BY_NAME.keys();
-        assert_eq!(raw("noodles").name(), "noodles");
-    }
-}