MCPcopy Create free account
hub / github.com/d0iasm/saba / update_variable

Method update_variable

core/src/renderer/js/runtime.rs:130–139  ·  view source on GitHub ↗
(&mut self, name: String, value: Option<RuntimeValue>)

Source from the content-addressed store, hash-verified

128 }
129
130 fn update_variable(&mut self, name: String, value: Option<RuntimeValue>) {
131 for i in 0..self.variables.len() {
132 // If find a varialbe, remove the old entry and add new entry.
133 if self.variables[i].0 == name {
134 self.variables.remove(i);
135 self.variables.push((name, value));
136 return;
137 }
138 }
139 }
140}
141
142#[derive(Debug, Clone, PartialEq, Eq)]

Callers 1

evalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected