Helper function for converting a Rust result to a C error code. This will print an error indicating some information regarding the failure.
(result: impl Into<Result<T>>)
| 412 | /// |
| 413 | /// This will print an error indicating some information regarding the failure. |
| 414 | fn to_exit_code<T>(result: impl Into<Result<T>>) -> ExitCode { |
| 415 | match result.into() { |
| 416 | Ok(_) => OK, |
| 417 | Err(error) => { |
| 418 | eprintln!("{error:?}"); |
| 419 | ERR |
| 420 | } |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | /// This structure contains the actual Rust implementation of the state required |
| 425 | /// to manage the Wasmtime engine between calls. |
no outgoing calls
no test coverage detected