From 41e1fdff88f55cac1d61b968d0baaed4a48009e7 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 26 Nov 2021 11:20:10 +0100 Subject: doc: use more educative example for #[convert] --- tests/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/tests.rs b/tests/tests.rs index aa5e996..41ed98c 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -306,13 +306,13 @@ struct SuperError; trait Cache {} #[dynamize::dynamize] trait Client { - type Error: Into; + type Error: std::error::Error; fn get(&self, url: String) -> Result, Self::Error>; } #[dynamize::dynamize] #[dynamized(Client)] -#[convert = |x: ::Error| -> SuperError {x.into()}] +#[convert = |x: ::Error| -> Box {Box::new(x) as _}] trait ClientWithCache: Client { fn get_with_cache( &self, -- cgit v1.2.3