Guest User

Untitled

a guest
Jun 8th, 2018
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for i in 0..inputs.len() {
  2.       let mut out_data: Vec<&Option<Value>> = [].to_vec();
  3.       let input = &inputs[i];
  4.       let connections = &input["connections"].as_array().unwrap_or(&empty_arr);
  5.      
  6.  
  7.       for i2 in 0..connections.len() {
  8.         let c = &connections[i2];
  9.         let nid = &c["node"].as_u64().expect("Invalid connection node ID") as &u64;
  10.         let nn = &nodes.unwrap()[*nid as usize]; // TODO rename
  11.         let out = self.back_process(&nn);
  12.         let out_index = &c["output"]
  13.           .as_u64()
  14.           .expect("Invalid connection output index") as &u64;
  15.         let val = &out[*out_index as usize];
  16.         out_data.push(val);
  17.       };
  18.     }
RAW Paste Data