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");