From 64416d417b86090e359e644225e61393d2b3574c Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Fri, 27 May 2022 16:03:30 +0200 Subject: [PATCH] all: fix new compiler warnings --- jay-config/src/_private/client.rs | 2 +- src/render/gl/texture.rs | 2 +- src/utils/windows.rs | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/jay-config/src/_private/client.rs b/jay-config/src/_private/client.rs index 59286e51..dbcd1bac 100644 --- a/jay-config/src/_private/client.rs +++ b/jay-config/src/_private/client.rs @@ -71,7 +71,7 @@ unsafe fn with_client T>(data: *const u8, f: F) -> T { self.cell.set(self.val); } } - CLIENT.with(|cell| unsafe { + CLIENT.with(|cell| { let client = data as *const Client; Rc::increment_strong_count(client); let client = Rc::from_raw(client); diff --git a/src/render/gl/texture.rs b/src/render/gl/texture.rs index 5d94bf9b..7f75d8f3 100644 --- a/src/render/gl/texture.rs +++ b/src/render/gl/texture.rs @@ -68,7 +68,7 @@ impl GlTexture { #[allow(dead_code)] pub unsafe fn to_framebuffer(self: &Rc) -> Result, RenderError> { - self.ctx.with_current(|| unsafe { + self.ctx.with_current(|| { let mut fbo = 0; glGenFramebuffers(1, &mut fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); diff --git a/src/utils/windows.rs b/src/utils/windows.rs index f80a3708..b4d51ddf 100644 --- a/src/utils/windows.rs +++ b/src/utils/windows.rs @@ -11,10 +11,7 @@ pub trait WindowsExt { } impl WindowsExt for [T] { - type Windows<'a, const N: usize> - where - T: 'a, - = WindowsIter<'a, T, N>; + type Windows<'a, const N: usize> = WindowsIter<'a, T, N> where T: 'a; fn array_windows_ext<'a, const N: usize>(&'a self) -> Self::Windows<'a, N> { WindowsIter { slice: self }