Rework DynAnyNode design to work with the borrow stack (#796)

This commit is contained in:
TrueDoctor
2022-10-15 03:02:58 +02:00
committed by GitHub
parent 99d92ef887
commit 06acd45a81
8 changed files with 198 additions and 80 deletions

View File

@@ -111,7 +111,7 @@ impl<'a> IntoIterator for &'a Image {
pub fn file_node<'n, P: AsRef<Path> + 'n>() -> impl Node<P, Output = Result<Vec<u8>, Error>> {
let fs = ValueNode(StdFs).clone();
let fs = ConsNode(fs);
let fs = ConsNode(fs, PhantomData);
let file: ComposeNode<_, _, P> = fs.then(FileNode(PhantomData));
file.then(FlatMapResultNode::new(BufferNode))