From 6b1e799d6b02d36c4f73ece7f44f2fc4f4163e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sat, 8 Feb 2025 12:01:30 +0100 Subject: [PATCH] Remove a source of unwrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- crates/plaixt/src/trustfall_plaixt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/plaixt/src/trustfall_plaixt.rs b/crates/plaixt/src/trustfall_plaixt.rs index 4c27f8d..422962b 100644 --- a/crates/plaixt/src/trustfall_plaixt.rs +++ b/crates/plaixt/src/trustfall_plaixt.rs @@ -254,7 +254,7 @@ impl<'v> Adapter<'v> for TrustfallMultiAdapter { contexts .clone() .into_iter() - .map(|v| v.map(&mut |v: V| v.into_vertex().unwrap())), + .map(|v| v.flat_map(&mut |v: V| v.into_vertex())), ), &Arc::from(type_name), property_name, @@ -295,7 +295,7 @@ impl<'v> Adapter<'v> for TrustfallMultiAdapter { contexts .clone() .into_iter() - .map(|v| v.map(&mut |v: V| v.into_vertex().unwrap())), + .map(|v| v.flat_map(&mut |v: V| v.into_vertex())), ), &Arc::from(type_name), edge_name, @@ -338,7 +338,7 @@ impl<'v> Adapter<'v> for TrustfallMultiAdapter { contexts .clone() .into_iter() - .map(|v| v.map(&mut |v: V| v.into_vertex().unwrap())), + .map(|v| v.flat_map(&mut |v: V| v.into_vertex())), ), type_name, &Arc::from(coerce_to_type),