* Implement fmt::Display for enums `wasi_common` relies on `strerror` to nicely format error messages. `strerror` is autoimplemented in `wig`. I thought it might be useful to provide a Rust-idiomatic alternative which boils down to autoimplementing `fmt::Display` for all enums. * Implement fmt::Display for flags * Implement fmt::Display for ints
14 lines
307 B
Plaintext
14 lines
307 B
Plaintext
(typename $errno
|
|
(enum u32
|
|
;;; Success
|
|
$ok
|
|
;;; Invalid argument
|
|
$invalid_arg
|
|
;;; I really don't want to
|
|
$dont_want_to
|
|
;;; I am physically unable to
|
|
$physically_unable
|
|
;;; Well, that's a picket line alright!
|
|
$picket_line))
|
|
|