delete GuestErrorConversion from docs, tests
This commit is contained in:
@@ -27,10 +27,6 @@ witx_literal: "
|
||||
errors: { errno => RichError },
|
||||
});
|
||||
|
||||
// The impl of GuestErrorConversion works just like in every other test where
|
||||
// we have a single error type with witx `$errno` with the success called `$ok`
|
||||
impl_errno!(types::Errno, types::GuestErrorConversion);
|
||||
|
||||
/// When the `errors` mapping in witx is non-empty, we need to impl the
|
||||
/// types::UserErrorConversion trait that wiggle generates from that mapping.
|
||||
impl<'a> types::UserErrorConversion for WasiCtx<'a> {
|
||||
|
||||
@@ -347,18 +347,11 @@ impl<'a> WasiCtx<'a> {
|
||||
// with these errors. We just push them to vecs.
|
||||
#[macro_export]
|
||||
macro_rules! impl_errno {
|
||||
( $errno:ty, $convert:path ) => {
|
||||
( $errno:ty ) => {
|
||||
impl wiggle::GuestErrorType for $errno {
|
||||
fn success() -> $errno {
|
||||
<$errno>::Ok
|
||||
}
|
||||
}
|
||||
impl<'a> $convert for WasiCtx<'a> {
|
||||
fn into_errno(&self, e: wiggle::GuestError) -> $errno {
|
||||
eprintln!("GuestError: {:?}", e);
|
||||
self.guest_errors.borrow_mut().push(e);
|
||||
<$errno>::InvalidArg
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user