From a0a055cc4ca415bdc3e5db04a454897669181660 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 28 Oct 2022 21:52:52 +0300 Subject: [PATCH] ci: fix failures after c6158e4 --- vlib/v/tests/results_multi_return_test.v | 4 ++-- vlib/v/tests/string_optional_none_test.v | 2 +- vlib/vweb/parse.v | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vlib/v/tests/results_multi_return_test.v b/vlib/v/tests/results_multi_return_test.v index 64096f5eb5..f8b5a2ed06 100644 --- a/vlib/v/tests/results_multi_return_test.v +++ b/vlib/v/tests/results_multi_return_test.v @@ -16,9 +16,9 @@ fn foo() ?string { } fn bar() !(string, int) { - a := foo() or { return Err{ + a := foo() or { return IError(Err{ msg: 'error test' - } } + }) } return a, 1 } diff --git a/vlib/v/tests/string_optional_none_test.v b/vlib/v/tests/string_optional_none_test.v index e785fc42c1..b381ff1254 100644 --- a/vlib/v/tests/string_optional_none_test.v +++ b/vlib/v/tests/string_optional_none_test.v @@ -12,7 +12,7 @@ fn (err MyError) code() int { } fn foo() int|none|IError { - return MyError{} + return IError(MyError{}) } fn test_string_optional_none() { diff --git a/vlib/vweb/parse.v b/vlib/vweb/parse.v index 3e6e43ef75..aa9662ab17 100644 --- a/vlib/vweb/parse.v +++ b/vlib/vweb/parse.v @@ -24,7 +24,7 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string) { } if attr.starts_with('/') { if path != '' { - return http.MultiplePathAttributesError{} + return IError(http.MultiplePathAttributesError{}) } path = attr x.delete(i) @@ -33,9 +33,9 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string) { i++ } if x.len > 0 { - return http.UnexpectedExtraAttributeError{ + return IError(http.UnexpectedExtraAttributeError{ attributes: x - } + }) } if methods.len == 0 { methods = [http.Method.get]