Now passing WindowBuilder to implwin::Window::new

This commit is contained in:
Tomaka17 2014-08-02 10:42:17 +02:00
parent 5dda167021
commit 49b0a20170
4 changed files with 23 additions and 31 deletions

View file

@ -62,12 +62,7 @@ impl WindowBuilder {
/// Error should be very rare and only occur in case of permission denied, incompatible system,
/// out of memory, etc.
pub fn build(self) -> Result<Window, String> {
let win = try!(winimpl::Window::new(Some(self.dimensions),
self.title.as_slice(), self.monitor));
Ok(Window{
window: win,
})
winimpl::Window::new(self).map(|w| Window { window: w })
}
}