diff options
author | Matthias Krüger <matthias.krueger@famsik.de> | 2017-11-29 14:42:16 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-03 12:50:40 -0800 |
commit | b5571da0f36613f4e91fbee2210459201dd58b0f (patch) | |
tree | b612b63c0ba14bcc78b619889b5a438611c597de | |
parent | 2c443425b019abbd6a422265f9e8eb1179f90e51 (diff) | |
download | alacritty-b5571da0f36613f4e91fbee2210459201dd58b0f.tar.gz alacritty-b5571da0f36613f4e91fbee2210459201dd58b0f.zip |
clippy: fix if_not_else warning 'breaking' the build. Swap blocks and change to "==".
-rw-r--r-- | src/renderer/mod.rs | 6 |
1 files 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))) } } } |