From b3c483f48c352fd18199e87e154422d614a5f294 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Mon, 11 Mar 2024 16:46:40 +0100 Subject: [PATCH] x --- .github/workflows/ci.yml | 1 + results.nim | 35 ++++++----------------------------- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3da8008..6908df0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - test-* pull_request: workflow_dispatch: inputs: diff --git a/results.nim b/results.nim index 13a221c..513cb58 100644 --- a/results.nim +++ b/results.nim @@ -300,14 +300,8 @@ type ## https://github.com/nim-lang/Nim/issues/13799 - type issues ## https://github.com/nim-lang/Nim/issues/8745 - genericReset slow ## https://github.com/nim-lang/Nim/issues/13879 - double-zero-init slow - ## https://github.com/nim-lang/Nim/issues/14318 - generic error raises pragma + ## https://github.com/nim-lang/Nim/issues/14318 - generic error raises pragma (fixed in 1.6.14+) - # TODO https://github.com/nim-lang/Nim/issues/20699 - # case oResultPrivate: bool - # of false: - # eResultPrivate: E - # of true: - # vResultPrivate: T # TODO ResultPrivate works around # * https://github.com/nim-lang/Nim/issues/3770 @@ -315,28 +309,11 @@ type # # Do not use these fields directly in your code, they're not meant to be # public! - when T is void: - when E is void: - oResultPrivate*: bool - else: - case oResultPrivate*: bool - of false: - eResultPrivate*: E - of true: - discard - else: - when E is void: - case oResultPrivate*: bool - of false: - discard - of true: - vResultPrivate*: T - else: - case oResultPrivate*: bool - of false: - eResultPrivate*: E - of true: - vResultPrivate*: T + case oResultPrivate*: bool + of false: + eResultPrivate*: E + of true: + vResultPrivate*: T Opt*[T] = Result[T, void]