Skip to content

Commit 6114244

Browse files
authored
Fix resolve_with() API and release v0.7.1 after yanking 0.7. (#516)
1 parent 521a64f commit 6114244

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

trustfall/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trustfall"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
license = "Apache-2.0"
55
description = "The trustfall query engine, empowering you to query everything."
66
repository = "https://github.com/obi1kenobi/trustfall"
@@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"]
1616

1717
[dependencies]
1818
anyhow = { workspace = true }
19-
trustfall_core = { version = "=0.7.0", path = "../trustfall_core" }
19+
trustfall_core = { version = "=0.7.1", path = "../trustfall_core" }
2020
trustfall_derive = { version = "=0.3.1", path = "../trustfall_derive" }
2121

2222
[dev-dependencies] # including examples dependencies

trustfall_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trustfall_core"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
license = "Apache-2.0"
55
description = "The trustfall query engine, empowering you to query everything."
66
repository = "https://github.com/obi1kenobi/trustfall"

trustfall_core/src/interpreter/hints/dynamic.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,14 @@ impl<'a> DynamicallyResolvedValue<'a> {
238238
self,
239239
adapter: &AdapterT,
240240
contexts: ContextIterator<'vertex, V>,
241-
mut neighbor_resolver: impl FnMut(&V, CandidateValue<FieldValue>) -> VertexIterator<'vertex, AdapterT::Vertex>
241+
mut neighbor_resolver: impl FnMut(
242+
&AdapterT::Vertex,
243+
CandidateValue<FieldValue>,
244+
) -> VertexIterator<'vertex, AdapterT::Vertex>
242245
+ 'vertex,
243246
) -> ContextOutcomeIterator<'vertex, V, VertexIterator<'vertex, AdapterT::Vertex>> {
244247
Box::new(self.resolve(adapter, contexts).map(move |(ctx, candidate)| {
245-
let neighbors = match ctx.active_vertex.as_ref() {
248+
let neighbors = match ctx.active_vertex.as_ref().and_then(AsVertex::as_vertex) {
246249
Some(vertex) => neighbor_resolver(vertex, candidate),
247250
None => Box::new(std::iter::empty()),
248251
};

0 commit comments

Comments
 (0)