Skip to content

Commit

Permalink
into GraphError
Browse files Browse the repository at this point in the history
  • Loading branch information
schell committed Mar 31, 2024
1 parent 8cca885 commit 2956d51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/moongraph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "moongraph"
version = "0.4.1"
version = "0.4.2"
edition = "2021"
description = "Schedules and runs DAGs accessing shared resources. 🌙"
repository = "https://github.com/schell/moongraph"
Expand Down
5 changes: 3 additions & 2 deletions crates/moongraph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ pub trait IsGraphNode<Input, Output> {
impl<
Input: Edges + Any + Send + Sync,
Output: NodeResults + Any + Send + Sync,
F: FnMut(Input) -> Result<Output, GraphError> + Send + Sync + 'static,
F: FnMut(Input) -> Result<Output, E> + Send + Sync + 'static,
E: Into<GraphError>,
> IsGraphNode<Input, Output> for F
{
fn into_node(mut self) -> Node<Function, TypeKey> {
Expand All @@ -379,7 +380,7 @@ impl<
let input = *resources.downcast::<Input>().unwrap();
match (self)(input) {
Ok(creates) => Ok(Box::new(creates)),
Err(e) => Err(e),
Err(e) => Err(e.into()),
}
});
Node::new(Function {
Expand Down

0 comments on commit 2956d51

Please sign in to comment.