/// Restore a set of local variables from a temporary holder
Restore a set of local variables from a temporary holder
Restore a set of local variables from a temporary holder
pub fn restore_local_values(&self, data: Vec<(Name, Option<Value>)>) {
        let mut vars = self.variables.lock().unwrap();
        for (name, value) in data {
            if let Some(value) = value {
                vars.insert(name, value);
            } else {
                vars.remove(&name);
            }
        }
    }
pub fn restore_local_values ( & self , data : Vec < ( Name , Option < Value > ) > ) { let mut vars = self . variables . lock ( ) . unwrap ( ) ; for ( name , value ) in data { if let Some ( value ) = value { vars . insert ( name , value ) ; } else { vars . remove ( & name ) ; } } }
Restore a set of local variables from a temporary holder
Restore a set of local variables from a temporary holder
&self
data
Vec<(Name, Option<Value>)>