From 5b3490c8275f78cf08d17297f70130370162d53f Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Sun, 21 Jan 2024 07:16:00 -0500 Subject: [PATCH] non-throwing -> throwing conversion --- Sources/RangeState/HybridValueProvider.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/RangeState/HybridValueProvider.swift b/Sources/RangeState/HybridValueProvider.swift index b778636..2b5291f 100644 --- a/Sources/RangeState/HybridValueProvider.swift +++ b/Sources/RangeState/HybridValueProvider.swift @@ -58,6 +58,14 @@ extension HybridValueProvider { asyncValue: { transform(await self.async($0)) } ) } + + /// Convert to a `HybridThrowingValueProvider`. + public var throwing: HybridThrowingValueProvider { + .init( + syncValue: self.syncValueProvider, + asyncValue: self.asyncValueProvider + ) + } } extension HybridThrowingValueProvider {