aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/window
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-10-30 08:14:09 +0100
committerTomaka17 <pierre.krieger1708@gmail.com>2014-10-30 08:14:09 +0100
commit7de3d55e7138fa0d70d18429b733d0ca5bdc2e5b (patch)
treea094bd6d07815547e9c2133f5a65c8b7649dbf71 /src/x11/window
parent367d488ccd194c2dba78c600eff94189e338851d (diff)
downloadglutin-7de3d55e7138fa0d70d18429b733d0ca5bdc2e5b.tar.gz
glutin-7de3d55e7138fa0d70d18429b733d0ca5bdc2e5b.zip
fail! -> panic!
Diffstat (limited to 'src/x11/window')
-rw-r--r--src/x11/window/mod.rs2
-rw-r--r--src/x11/window/monitor.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index 2f00438..26d5497 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -510,7 +510,7 @@ impl Window {
pub unsafe fn make_current(&self) {
let res = ffi::glx::MakeCurrent(self.display, self.window, self.context);
if res == 0 {
- fail!("glx::MakeCurrent failed");
+ panic!("glx::MakeCurrent failed");
}
}
diff --git a/src/x11/window/monitor.rs b/src/x11/window/monitor.rs
index 013b48b..f62a8ef 100644
--- a/src/x11/window/monitor.rs
+++ b/src/x11/window/monitor.rs
@@ -9,7 +9,7 @@ pub fn get_available_monitors() -> Vec<MonitorID> {
let nb_monitors = unsafe {
let display = ffi::XOpenDisplay(ptr::null());
if display.is_null() {
- fail!("get_available_monitors failed");
+ panic!("get_available_monitors failed");
}
let nb_monitors = ffi::XScreenCount(display);
ffi::XCloseDisplay(display);
@@ -26,7 +26,7 @@ pub fn get_primary_monitor() -> MonitorID {
let primary_monitor = unsafe {
let display = ffi::XOpenDisplay(ptr::null());
if display.is_null() {
- fail!("get_available_monitors failed");
+ panic!("get_available_monitors failed");
}
let primary_monitor = ffi::XDefaultScreen(display);
ffi::XCloseDisplay(display);