wiggle: revamp error type conversions

This commit is contained in:
Pat Hickey
2020-03-27 18:27:17 -07:00
parent 167a040ea5
commit 3e97e5f1ae
14 changed files with 76 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
use proptest::prelude::*;
use std::convert::TryFrom;
use wiggle::{GuestError, GuestMemory};
use wiggle::GuestMemory;
use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
wiggle::from_witx!({
@@ -8,7 +8,7 @@ wiggle::from_witx!({
ctx: WasiCtx,
});
impl_errno!(types::Errno);
impl_errno!(types::Errno, types::GuestErrorConversion);
impl<'a> ints::Ints for WasiCtx<'a> {
fn cookie_cutter(&self, init_cookie: types::Cookie) -> Result<types::Bool, types::Errno> {