wiggle-using crates: delete GuestErrorConversion

This commit is contained in:
Pat Hickey
2021-03-24 10:39:06 -07:00
parent 1c4af27f2d
commit e6c7e00a52
4 changed files with 0 additions and 32 deletions

View File

@@ -10,16 +10,6 @@ wiggle::from_witx!({
use types::NnErrno;
/// Wiggle generates code that performs some input validation on the arguments passed in by users of
/// wasi-nn. Here we convert the validation error into one (or more, eventually) of the error
/// variants defined in the witx.
impl types::GuestErrorConversion for WasiNnCtx {
fn into_nn_errno(&self, e: wiggle::GuestError) -> NnErrno {
eprintln!("Guest error: {:?}", e);
NnErrno::InvalidArgument
}
}
impl<'a> types::UserErrorConversion for WasiNnCtx {
fn nn_errno_from_wasi_nn_error(&self, e: WasiNnError) -> Result<NnErrno, wiggle::Trap> {
eprintln!("Host error: {:?}", e);