mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
clippy: Fix remaining warnings in gfx
for MacOS (#31669)
This commit is contained in:
parent
cb3ae70340
commit
a8791ddcbc
9 changed files with 66 additions and 69 deletions
|
@ -90,22 +90,23 @@ impl RenderingContext {
|
|||
Ok(RenderingContext(Rc::new(data)))
|
||||
}
|
||||
|
||||
pub fn create_surface_texture(
|
||||
&self,
|
||||
surface: Surface,
|
||||
) -> Result<SurfaceTexture, (Error, Surface)> {
|
||||
pub fn create_surface_texture(&self, surface: Surface) -> Result<SurfaceTexture, Error> {
|
||||
let device = &self.0.device.borrow();
|
||||
let context = &mut self.0.context.borrow_mut();
|
||||
device.create_surface_texture(context, surface)
|
||||
device
|
||||
.create_surface_texture(context, surface)
|
||||
.map_err(|(error, _)| error)
|
||||
}
|
||||
|
||||
pub fn destroy_surface_texture(
|
||||
&self,
|
||||
surface_texture: SurfaceTexture,
|
||||
) -> Result<Surface, (Error, SurfaceTexture)> {
|
||||
) -> Result<Surface, Error> {
|
||||
let device = &self.0.device.borrow();
|
||||
let context = &mut self.0.context.borrow_mut();
|
||||
device.destroy_surface_texture(context, surface_texture)
|
||||
device
|
||||
.destroy_surface_texture(context, surface_texture)
|
||||
.map_err(|(error, _)| error)
|
||||
}
|
||||
|
||||
pub fn make_gl_context_current(&self) -> Result<(), Error> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue