From 92f2812acfa9aeedb8478616416cbdd8b9a3637d Mon Sep 17 00:00:00 2001 From: Ari Seyhun Date: Tue, 23 Apr 2024 15:34:36 +0800 Subject: [PATCH] feat: impl from `Signal` and `WriteSignal` for `Model` (#179) --- thaw_utils/src/signals/model.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/thaw_utils/src/signals/model.rs b/thaw_utils/src/signals/model.rs index c1bed24..87f6356 100644 --- a/thaw_utils/src/signals/model.rs +++ b/thaw_utils/src/signals/model.rs @@ -132,6 +132,16 @@ impl From> for Model { } } +impl From<(Signal, WriteSignal)> for Model { + fn from((read, write): (Signal, WriteSignal)) -> Self { + Self { + read, + write, + on_write: None, + } + } +} + impl From<(ReadSignal, WriteSignal)> for Model { fn from((read, write): (ReadSignal, WriteSignal)) -> Self { Self {