This commit is contained in:
Ajinkya Kulkarni 2024-12-04 19:45:23 +01:00
parent 3b6971095c
commit cac16b1e7c

View file

@ -31,7 +31,6 @@ async fn get_fmspc_list() -> Vec<Fmspc> {
.text()
.await
.expect("could not read https response");
println!("{body}");
let fmspc_data: Vec<Value> = serde_json::from_str(&body).expect("could not convert to JSON");
let mut fmspc_list: Vec<Fmspc> = Vec::new();
for item in fmspc_data.iter() {
@ -50,6 +49,7 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> {
let fmspc_list = get_fmspc_list().await;
for fmspc in fmspc_list {
let tcbinfo = get_tcbinfo(fmspc.clone(), "standard".to_string()).await;
println!("{tcbinfo:?}");
let store_entry = &store[&fmspc];
if *store_entry != tcbinfo {
println!("updating local TCBInfo for FMSPC: {fmspc}");