From f99bf190bcf508179226ee09f36d2ab5b7cd7a39 Mon Sep 17 00:00:00 2001 From: Dan Spencer Date: Thu, 29 Jan 2015 21:10:34 -0700 Subject: [PATCH] copy() and copy_ex() should take a `&Texture` `&mut Texture` could imply that the texture gets modified by the two methods, when they really don't. (they at least don't have exterior mutability) --- src/sdl2/render.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdl2/render.rs b/src/sdl2/render.rs index 15d5564a..42082115 100644 --- a/src/sdl2/render.rs +++ b/src/sdl2/render.rs @@ -430,7 +430,7 @@ impl RenderDrawer { } } - pub fn copy(&mut self, texture: &mut Texture, src: Option, dst: Option) { + pub fn copy(&mut self, texture: &Texture, src: Option, dst: Option) { let ret = unsafe { ll::SDL_RenderCopy( self.raw, @@ -451,7 +451,7 @@ impl RenderDrawer { } } - pub fn copy_ex(&mut self, texture: &mut Texture, src: Option, dst: Option, angle: f64, center: Option, (flip_horizontal, flip_vertical): (bool, bool)) { + pub fn copy_ex(&mut self, texture: &Texture, src: Option, dst: Option, angle: f64, center: Option, (flip_horizontal, flip_vertical): (bool, bool)) { let flip = match (flip_horizontal, flip_vertical) { (false, false) => ll::SDL_FLIP_NONE, (true, false) => ll::SDL_FLIP_HORIZONTAL,