From 42827db3bc978f48ec8261defb892e66fd50aaa8 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 30 Oct 2014 00:24:45 -0400 Subject: [PATCH] fail -> panic --- src/gl_back_end.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gl_back_end.rs b/src/gl_back_end.rs index 3ce3fec..13fe35a 100644 --- a/src/gl_back_end.rs +++ b/src/gl_back_end.rs @@ -134,7 +134,7 @@ void main() fn pick_120_150(glsl: glsl::GLSL, for_120: T, for_150: T) -> T { match glsl { - glsl::GLSL_1_10 => fail!("GLSL 1.10 not supported"), + glsl::GLSL_1_10 => panic!("GLSL 1.10 not supported"), glsl::GLSL_1_20 | glsl::GLSL_1_30 | glsl::GLSL_1_40 => for_120, @@ -169,14 +169,14 @@ impl XYRGBA { pick_120_150(glsl, VERTEX_SHADER_XY_RGBA_120, VERTEX_SHADER_XY_RGBA_150_CORE) ) { Ok(id) => id, - Err(s) => fail!("compile_shader: {}", s) + Err(s) => panic!("compile_shader: {}", s) }; let fragment_shader = match compile_shader( gl::FRAGMENT_SHADER, // shader type pick_120_150(glsl, FRAGMENT_SHADER_XY_RGBA_120, FRAGMENT_SHADER_XY_RGBA_150_CORE) ) { Ok(id) => id, - Err(s) => fail!("compile_shader: {}", s) + Err(s) => panic!("compile_shader: {}", s) }; let program = gl::CreateProgram(); @@ -243,14 +243,14 @@ impl XYRGBAUV { pick_120_150(glsl, VERTEX_SHADER_XY_RGBA_UV_120, VERTEX_SHADER_XY_RGBA_UV_150_CORE) ) { Ok(id) => id, - Err(s) => fail!("compile_shader: {}", s) + Err(s) => panic!("compile_shader: {}", s) }; let fragment_shader = match compile_shader( gl::FRAGMENT_SHADER, // shader type pick_120_150(glsl, FRAGMENT_SHADER_XY_RGBA_UV_120, FRAGMENT_SHADER_XY_RGBA_UV_150_CORE) ) { Ok(id) => id, - Err(s) => fail!("compile_shader: {}", s) + Err(s) => panic!("compile_shader: {}", s) }; let program = gl::CreateProgram();