refactor
This commit is contained in:
parent
02966c0605
commit
fb6a96ff55
6 changed files with 15 additions and 37 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue