diff --git a/Cargo.toml b/Cargo.toml index b7069c5..103b756 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Kotauskas "] edition = "2018" name = "thin_trait_object" -version = "1.0.0" +version = "1.0.1" documentation = "https://docs.rs/thin_trait_object/*/thin_trait_object" license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index e054249..3b93cf4 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ unsafe { eater_of_foo(foo.into_raw() as *mut c_void); } // Acquire ownership of a different implementation from the C side. -let foo = unsafe { BoxedFoo::from_raw(creator_of_foo()) }; +let foo = unsafe { BoxedFoo::from_raw(creator_of_foo() as *mut ()) }; foo.say_hello(); ``` The C side would do: @@ -219,7 +219,7 @@ trait B: A { self.a(); // Redirect to the method from the A trait implementation } } -impl A for BoxedB { +impl A for BoxedB<'_> { fn a(&self) { // Redirect to the hidden thunk, which will use the actual implementation of the method self._thunk_a();