Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bytecodealliance/wit-bindgen
/ EnumError
Function
EnumError
tests/runtime/results/leaf.go:17–23 ·
view source on GitHub ↗
(x float32)
Source
from the content-addressed store, hash-verified
15
}
16
17
func
EnumError(x float32) Result[float32, E] {
18
if
x == 0.0 {
19
return
Err[float32, E](EA)
20
}
else
{
21
return
Ok[float32, E](x)
22
}
23
}
24
25
func
RecordError(x float32) Result[float32, E2] {
26
if
x == 0.0 {
Callers
2
EnumError
Method · 0.70
Run
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected