passing all tests
This commit is contained in:
@ -76,8 +76,11 @@ impl Database {
|
||||
|
||||
if let Some(arr) = val.get("relations").and_then(|v| v.as_array()) {
|
||||
for item in arr {
|
||||
if let Ok(def) = serde_json::from_value::<Relation>(item.clone()) {
|
||||
db.relations.insert(def.constraint.clone(), def);
|
||||
match serde_json::from_value::<Relation>(item.clone()) {
|
||||
Ok(def) => {
|
||||
db.relations.insert(def.constraint.clone(), def);
|
||||
}
|
||||
Err(e) => println!("DATABASE RELATION PARSE FAILED: {:?}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user