Skip to content

Commit

Permalink
reference the latest clippy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrh committed Aug 24, 2020
1 parent eaa01c5 commit 9d1851b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/sdl2/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ macro_rules! impl_raw_accessors(
impl $t {
#[inline]
// can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub const unsafe fn raw(&self) -> $raw { self.raw }
}
Expand Down
4 changes: 2 additions & 2 deletions src/sdl2/rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ impl Rect {

/// Returns the underlying C Rect.
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn raw(&self) -> *const sys::SDL_Rect {
&self.raw
Expand Down Expand Up @@ -742,7 +742,7 @@ impl Point {
slice.as_ptr() as *const sys::SDL_Point
}
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn raw(&self) -> *const sys::SDL_Point {
&self.raw
Expand Down
10 changes: 5 additions & 5 deletions src/sdl2/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl<T> RendererContext<T> {

/// Gets the raw pointer to the SDL_Renderer
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn raw(&self) -> *mut sys::SDL_Renderer {
self.raw
Expand Down Expand Up @@ -788,7 +788,7 @@ fn ll_create_texture(context: *mut sys::SDL_Renderer,
/// Texture-creating methods for the renderer
impl<T> TextureCreator<T> {
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn raw(&self) -> *mut sys::SDL_Renderer {
self.context.raw()
Expand Down Expand Up @@ -929,7 +929,7 @@ impl<T> TextureCreator<T> {
/// Drawing methods
impl<T: RenderTarget> Canvas<T> {
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn raw(&self) -> *mut sys::SDL_Renderer {
self.context.raw()
Expand Down Expand Up @@ -2158,7 +2158,7 @@ impl<'r> Texture<'r> {

#[inline]
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub const fn raw(&self) -> *mut sys::SDL_Texture {
self.raw
Expand Down Expand Up @@ -2341,7 +2341,7 @@ impl<> Texture<> {

#[inline]
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub const fn raw(&self) -> *mut sys::SDL_Texture {
self.raw
Expand Down
2 changes: 1 addition & 1 deletion src/sdl2/rwops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct RWops<'a> {

impl<'a> RWops<'a> {
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub unsafe fn raw(&self) -> *mut sys::SDL_RWops { self.raw }

Expand Down
2 changes: 1 addition & 1 deletion src/sdl2/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl SurfaceRef {

#[inline]
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn raw(&self) -> *mut sys::SDL_Surface {
self as *const SurfaceRef as *mut SurfaceRef as *mut () as *mut sys::SDL_Surface
Expand Down
2 changes: 1 addition & 1 deletion src/sdl2/ttf/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ pub fn internal_load_font_at_index<'ttf,P: AsRef<Path>>(path: P, index: u32, pts
impl<'ttf,'r> Font<'ttf,'r> {
/// Returns the underlying C font object.
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
unsafe fn raw(&self) -> *mut ttf::TTF_Font {
self.raw
Expand Down
2 changes: 1 addition & 1 deletion src/sdl2/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ impl From<Window> for CanvasBuilder {
impl Window {
#[inline]
// this can prevent introducing UB until
// https://github.com/rust-lang/rust-clippy/issues/3992 is fixed
// https://github.com/rust-lang/rust-clippy/issues/5953 is fixed
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn raw(&self) -> *mut sys::SDL_Window { self.context.raw }

Expand Down

0 comments on commit 9d1851b

Please sign in to comment.