From fdf2d60b35c782b3bfe086800d088be3fd89ad34 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Thu, 18 Jan 2024 18:18:14 +0100 Subject: [PATCH] MorphismBase: fix deadlock --- lib-nested-core/src/repr_tree/morphism.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib-nested-core/src/repr_tree/morphism.rs b/lib-nested-core/src/repr_tree/morphism.rs index b7cc3bc..689cffc 100644 --- a/lib-nested-core/src/repr_tree/morphism.rs +++ b/lib-nested-core/src/repr_tree/morphism.rs @@ -80,7 +80,8 @@ impl MorphismBase { repr_tree: Arc>, target_type: &TypeTerm ) { - if let Some((m, σ)) = self.find_morphism( repr_tree.read().unwrap().get_type(), target_type ) { + let t = repr_tree.read().unwrap().get_type().clone(); + if let Some((m, σ)) = self.find_morphism( &t, target_type ) { (m.repr_tree_op)( repr_tree.clone(), &σ ); } else { eprintln!("could not find morphism");