From b5571da0f36613f4e91fbee2210459201dd58b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 29 Nov 2017 14:42:16 +0100 Subject: [PATCH] clippy: fix if_not_else warning 'breaking' the build. Swap blocks and change to "==". --- src/renderer/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index bb025875..0b8dbd13 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -1078,10 +1078,10 @@ impl ShaderProgram { let mut success: GLint = 0; gl::GetProgramiv(program, gl::LINK_STATUS, &mut success); - if success != (gl::TRUE as GLint) { - Err(ShaderCreationError::Link(get_program_info_log(program))) - } else { + if success == (gl::TRUE as GLint) { Ok(program) + } else { + Err(ShaderCreationError::Link(get_program_info_log(program))) } } }