diff --git a/src/db.rs b/src/db.rs index c45aa4d..5c441a5 100644 --- a/src/db.rs +++ b/src/db.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use crate::item::Item; /// Item database -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ItemDB { index: HashMap, } diff --git a/src/json_store.rs b/src/json_store.rs index ad2fd24..c4b792e 100644 --- a/src/json_store.rs +++ b/src/json_store.rs @@ -5,7 +5,7 @@ use std::{ use serde::Deserialize; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct JSONStore { documents: HashMap, } diff --git a/src/main.rs b/src/main.rs index c7bd59f..a14eed9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -99,8 +99,8 @@ async fn rocket() -> _ { .expect("error creating CORS options"); let config = config::get_config(); - let itemdb = get_itemdb!(); - let locations = get_locations!(); + let itemdb = get_itemdb!().clone(); + let locations = get_locations!().clone(); let flows: JSONStore = JSONStore::new("./flows"); integrity::verify_integrity(&config, &flows, &locations, &itemdb).await;