clippy: fix if_not_else warning 'breaking' the build. Swap blocks and change to "==".

This commit is contained in:
Matthias Krüger 2017-11-29 14:42:16 +01:00 committed by Joe Wilm
parent 2c443425b0
commit b5571da0f3
1 changed files with 3 additions and 3 deletions

View File

@ -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)))
}
}
}