Allow for adding variables in hot-reloading

This commit is contained in:
elkowar 2020-10-14 00:00:30 +02:00
parent 01da512231
commit 2f9a6304b4

View file

@ -89,9 +89,6 @@ impl EwwState {
/// Update the value of a variable, running all registered
/// [StateChangeHandler]s.
pub fn update_variable(&mut self, key: VarName, value: PrimitiveValue) -> Result<()> {
if !self.variables_state.contains_key(&key) {
bail!("Tried to set unknown variable '{}'", key);
}
self.variables_state.insert(key.clone(), value);
let handlers = self