aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32/mod.rs
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-11-05 16:42:18 +0100
committerTomaka17 <pierre.krieger1708@gmail.com>2014-11-05 16:42:18 +0100
commit584bb3e7df751d55aad189eacd85b1cd6c5aa5c5 (patch)
tree91711433533faa6b44f62eb752d54c0a39129e12 /src/win32/mod.rs
parent7ce851dad9102c28ee2fd372ed9fd62e73364da9 (diff)
downloadglutin-584bb3e7df751d55aad189eacd85b1cd6c5aa5c5.tar.gz
glutin-584bb3e7df751d55aad189eacd85b1cd6c5aa5c5.zip
Use a proper error type for window creation
Diffstat (limited to 'src/win32/mod.rs')
-rw-r--r--src/win32/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index facfb6d..282b0bb 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -1,7 +1,7 @@
use std::sync::atomic::AtomicBool;
use std::ptr;
use libc;
-use Event;
+use {CreationError, Event};
#[cfg(feature = "window")]
use WindowBuilder;
@@ -23,7 +23,7 @@ pub struct HeadlessContext(Window);
#[cfg(feature = "headless")]
impl HeadlessContext {
/// See the docs in the crate root file.
- pub fn new(builder: HeadlessRendererBuilder) -> Result<HeadlessContext, String> {
+ pub fn new(builder: HeadlessRendererBuilder) -> Result<HeadlessContext, CreationError> {
let HeadlessRendererBuilder { dimensions, gl_version } = builder;
init::new_window(Some(dimensions), "".to_string(), None, gl_version, false, true)
.map(|w| HeadlessContext(w))
@@ -67,7 +67,7 @@ pub struct Window {
#[cfg(feature = "window")]
impl Window {
/// See the docs in the crate root file.
- pub fn new(builder: WindowBuilder) -> Result<Window, String> {
+ pub fn new(builder: WindowBuilder) -> Result<Window, CreationError> {
let WindowBuilder { dimensions, title, monitor, gl_version, vsync, visible } = builder;
init::new_window(dimensions, title, monitor, gl_version, vsync, !visible)
}