This commit is contained in:
JMARyA 2024-09-12 11:54:52 +02:00
parent 02966c0605
commit fb6a96ff55
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
6 changed files with 15 additions and 37 deletions

View file

@ -1,5 +1,3 @@
use std::ops::{Deref, DerefMut};
use flow::FlowInfo;
use json_store::JSONStore;
use location::Location;
@ -52,13 +50,13 @@ async fn rocket() -> _ {
let itemdb = db::ItemDB::new("./itemdb").await;
let mut locations: JSONStore<Location> = JSONStore::new("./locations");
for location in locations.deref_mut() {
for location in &mut *locations {
location.1.add(location.0).await;
}
let mut flows: JSONStore<FlowInfo> = JSONStore::new("./flows");
for flow in flows.deref_mut() {
for flow in &mut *flows {
flow.1.add(flow.0).await;
}