can now see dummy node data

This commit is contained in:
Matthew Liu
2023-07-19 16:08:50 -07:00
parent b7c61f0856
commit bb2d0cf341
2 changed files with 8 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ use petgraph::stable_graph::{NodeIndex, StableGraph};
use petgraph::visit::{EdgeRef, IntoEdgeReferences, IntoNodeReferences};
use petgraph::Graph;
use radix_trie::Trie;
use serde::{Deserialize, Serialize};
use crate::{Operation, Render};

View File

@@ -212,8 +212,13 @@ pub unsafe fn run_program_unchecked<E: Evaluator + Sync + Send>(
.get_mut(session_name)
.unwrap()
.unwrap_bfv_session_mut();
let node_val = get_data(data, node_index.index());
session.program_data[node_index.index()] = Arc::into_inner(node_val.unwrap().clone());
let node_val = get_data(data, node_index.index());
match Arc::try_unwrap(node_val.unwrap().clone()) {
Ok(val) => session.program_data[node_index.index()] = Some(val),
Err(arc) => {
session.program_data[node_index.index()] = Some((*arc).clone());
}
}
}
Ok(())