diff --git a/crates/graph/src/lib.rs b/crates/graph/src/lib.rs index 7afa962..ff7070d 100644 --- a/crates/graph/src/lib.rs +++ b/crates/graph/src/lib.rs @@ -36,7 +36,7 @@ pub trait Synchronicity: 'static { fn make_update_result<'a>() -> Self::UpdateResult<'a>; } -pub enum Synchronous {} +pub struct Synchronous; impl Synchronicity for Synchronous { type UpdateFn = Box) -> ()>; @@ -53,7 +53,7 @@ impl Synchronicity for Synchronous { fn make_update_result<'a>() -> Self::UpdateResult<'a> {} } -pub enum Asynchronous {} +pub struct Asynchronous; impl Synchronicity for Asynchronous { type UpdateFn = @@ -480,7 +480,7 @@ impl Node for ConstNode { fn visit_inputs(&self, _visitor: &mut dyn FnMut(NodeIndex) -> ()) {} - fn update(&mut self) -> ::UpdateResult<'_> { + fn update(&mut self) -> S::UpdateResult<'_> { unreachable!() } @@ -526,7 +526,7 @@ impl Node for RuleNode self.rule.visit_inputs(&mut InputIndexVisitor(visitor)); } - fn update(&mut self) -> ::UpdateResult<'_> { + fn update(&mut self) -> S::UpdateResult<'_> { let new_value = self.rule.evaluate(); self.valid = true; *self.value.borrow_mut() = Some(new_value);