From d223df869cc928769ac848665bc35d3bf8b29adf Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Fri, 1 Nov 2024 20:49:00 -0700 Subject: [PATCH] Stop `Assembly::realize` from reacting to itself Previously, `realize` both tracked and updated the element vectors, so calling it in a reactive context could start a feedback loop. --- app-proto/src/assembly.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app-proto/src/assembly.rs b/app-proto/src/assembly.rs index 78228cc..b119d5b 100644 --- a/app-proto/src/assembly.rs +++ b/app-proto/src/assembly.rs @@ -161,7 +161,7 @@ impl Assembly { for (_, elt) in elts { let index = elt.index; gram_to_be.push_sym(index, index, 1.0); - guess_to_be.set_column(index, &elt.representation.get_clone()); + guess_to_be.set_column(index, &elt.representation.get_clone_untracked()); } (gram_to_be, guess_to_be) @@ -203,7 +203,7 @@ impl Assembly { if success { // read out the solution - for (_, elt) in self.elements.get_clone() { + for (_, elt) in self.elements.get_clone_untracked() { elt.representation.update( |rep| rep.set_column(0, &config.column(elt.index)) );