Fix clippy warnings

This commit is contained in:
Matthias Krüger 2020-05-01 21:28:43 +02:00 committed by GitHub
parent 7901b454ee
commit 6b45780f3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 13 deletions

View File

@ -777,7 +777,7 @@ impl QuadRenderer {
if let Ok(Msg::ShaderReload) = self.rx.try_recv() {
self.reload_shaders(props);
}
while let Ok(_) = self.rx.try_recv() {}
while self.rx.try_recv().is_ok() {}
unsafe {
gl::UseProgram(self.program.id);

View File

@ -345,13 +345,6 @@ impl Window {
}
pub fn set_fullscreen(&mut self, fullscreen: bool) {
#[cfg(macos)]
{
if self.window().simple_fullscreen() {
return;
}
}
if fullscreen {
let current_monitor = self.window().current_monitor();
self.window().set_fullscreen(Some(Fullscreen::Borderless(current_monitor)));
@ -362,10 +355,6 @@ impl Window {
#[cfg(target_os = "macos")]
pub fn set_simple_fullscreen(&mut self, simple_fullscreen: bool) {
if self.window().fullscreen().is_some() {
return;
}
self.window().set_simple_fullscreen(simple_fullscreen);
}

View File

@ -2667,7 +2667,6 @@ mod benches {
use std::fs;
use std::mem;
use std::path::Path;
use crate::clipboard::Clipboard;
use crate::config::MockConfig;