From bd49ce76555149df3eb3866d2e9db3ef507fa636 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Fri, 27 Nov 2020 22:40:27 +0100 Subject: [PATCH] Fixing (Bool | Nil) union in the from_cbor. --- src/cbor/from_cbor.cr | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cbor/from_cbor.cr b/src/cbor/from_cbor.cr index 8aa080b..864c6a7 100644 --- a/src/cbor/from_cbor.cr +++ b/src/cbor/from_cbor.cr @@ -218,7 +218,6 @@ end def Union.new(decoder : CBOR::Decoder) {% begin %} case decoder.current_token - {% if T.includes? Nil || T.includes? Bool %} when CBOR::Token::SimpleValueT # This value could be either a boolean or nil. value = decoder.read_simple_value @@ -234,7 +233,6 @@ def Union.new(decoder : CBOR::Decoder) else raise "value is neither Bool or Nil" end - {% end %} {% if T.includes? String %} when CBOR::Token::StringT return decoder.read_string