diff --git a/src/lib.rs b/src/lib.rs index 3d2e49e..0f0e8a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -117,9 +117,11 @@ pub enum Error { Surface(wgpu::SurfaceError), /// User-defined error from custom render function #[error("User-defined error.")] - UserDefined(#[from] Box), + UserDefined(#[from] DynError), } +type DynError = Box; + impl<'win, W: HasRawWindowHandle> SurfaceTexture<'win, W> { /// Create a logical texture for a window surface. /// @@ -357,7 +359,7 @@ impl Pixels { &mut wgpu::CommandEncoder, &wgpu::TextureView, &PixelsContext, - ) -> Result<(), Box>, + ) -> Result<(), DynError>, { let frame = self .context