diff --git a/Cargo.lock b/Cargo.lock index 37da6c2e..3886f07f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3241,7 +3241,7 @@ dependencies = [ [[package]] name = "trustfall" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "csv", @@ -3260,7 +3260,7 @@ dependencies = [ [[package]] name = "trustfall_core" -version = "0.7.0" +version = "0.7.1" dependencies = [ "async-graphql-parser", "async-graphql-value", diff --git a/trustfall/Cargo.toml b/trustfall/Cargo.toml index 9de3f27a..d9422c53 100644 --- a/trustfall/Cargo.toml +++ b/trustfall/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trustfall" -version = "0.7.0" +version = "0.7.1" license = "Apache-2.0" description = "The trustfall query engine, empowering you to query everything." repository = "https://github.com/obi1kenobi/trustfall" @@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"] [dependencies] anyhow = { workspace = true } -trustfall_core = { version = "=0.7.0", path = "../trustfall_core" } +trustfall_core = { version = "=0.7.1", path = "../trustfall_core" } trustfall_derive = { version = "=0.3.1", path = "../trustfall_derive" } [dev-dependencies] # including examples dependencies diff --git a/trustfall_core/Cargo.toml b/trustfall_core/Cargo.toml index 15f5d099..705ed4d7 100644 --- a/trustfall_core/Cargo.toml +++ b/trustfall_core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trustfall_core" -version = "0.7.0" +version = "0.7.1" license = "Apache-2.0" description = "The trustfall query engine, empowering you to query everything." repository = "https://github.com/obi1kenobi/trustfall" diff --git a/trustfall_core/src/interpreter/hints/dynamic.rs b/trustfall_core/src/interpreter/hints/dynamic.rs index ad3f2b7d..5ac27408 100644 --- a/trustfall_core/src/interpreter/hints/dynamic.rs +++ b/trustfall_core/src/interpreter/hints/dynamic.rs @@ -238,11 +238,14 @@ impl<'a> DynamicallyResolvedValue<'a> { self, adapter: &AdapterT, contexts: ContextIterator<'vertex, V>, - mut neighbor_resolver: impl FnMut(&V, CandidateValue) -> VertexIterator<'vertex, AdapterT::Vertex> + mut neighbor_resolver: impl FnMut( + &AdapterT::Vertex, + CandidateValue, + ) -> VertexIterator<'vertex, AdapterT::Vertex> + 'vertex, ) -> ContextOutcomeIterator<'vertex, V, VertexIterator<'vertex, AdapterT::Vertex>> { Box::new(self.resolve(adapter, contexts).map(move |(ctx, candidate)| { - let neighbors = match ctx.active_vertex.as_ref() { + let neighbors = match ctx.active_vertex.as_ref().and_then(AsVertex::as_vertex) { Some(vertex) => neighbor_resolver(vertex, candidate), None => Box::new(std::iter::empty()), };