From 6677434ca0c6acd19f89bd66d4997f589541cfdb Mon Sep 17 00:00:00 2001 From: JMARyA Date: Mon, 7 Oct 2024 21:02:23 +0200 Subject: [PATCH] fix --- src/db.rs | 2 +- src/json_store.rs | 2 +- src/main.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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;