Make LayoutCanvasWebGLRenderingContextHelpers methods take self

This commit is contained in:
Anthony Ramine 2020-03-29 17:25:59 +02:00
parent 301acdc309
commit d87444cb1f
2 changed files with 3 additions and 3 deletions

View file

@ -3886,7 +3886,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> { impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> {
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource { unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource {
let this = &*self.unsafe_get(); let this = &*self.unsafe_get();
(*this.base.to_layout().unsafe_get()).layout_handle() (*this.base.to_layout().unsafe_get()).layout_handle()
} }

View file

@ -4447,12 +4447,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
pub trait LayoutCanvasWebGLRenderingContextHelpers { pub trait LayoutCanvasWebGLRenderingContextHelpers {
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource; unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource;
} }
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGLRenderingContext> { impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGLRenderingContext> {
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource { unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource {
(*self.unsafe_get()).layout_handle() (*self.unsafe_get()).layout_handle()
} }
} }