We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e9728a commit 5b80379Copy full SHA for 5b80379
1 file changed
src/eval/test/eval_test.zig
@@ -2135,11 +2135,12 @@ test "encode: Str.encode with local format type" {
2135
try runExpectListI64(
2136
\\{
2137
\\ Utf8Format := {}.{
2138
- \\ encode_str : Utf8Format, Str -> List(U8)
2139
- \\ encode_str = |_fmt, s| Str.to_utf8(s)
+ \\ encode_str : Utf8Format, Str -> Try(List(U8), [])
+ \\ encode_str = |_fmt, s| Ok(Str.to_utf8(s))
2140
\\ }
2141
\\ fmt = Utf8Format
2142
- \\ bytes = Str.encode("hi", fmt)
+ \\ result = Str.encode("hi", fmt)
2143
+ \\ bytes = result?
2144
\\ List.map(bytes, |b| U8.to_i64(b))
2145
\\}
2146
, &[_]i64{ 104, 105 }, .no_trace);
0 commit comments