Rust format

This commit is contained in:
Daniel Collin 2015-12-08 23:08:52 +01:00
parent 0b2911ca30
commit e89cb04189
2 changed files with 13 additions and 5 deletions

View file

@ -12,7 +12,12 @@ fn main() {
let mut buffer: [u32; WIDTH * HEIGHT] = [0; WIDTH * HEIGHT];
let mut window = Window::new("Noise Test - Press ESC to exit", WIDTH, HEIGHT, Scale::X1, Vsync::No).unwrap();
let mut window = Window::new("Noise Test - Press ESC to exit",
WIDTH,
HEIGHT,
Scale::X1,
Vsync::No)
.unwrap();
while window.update(&buffer) {
for i in buffer.iter_mut() {

View file

@ -9,8 +9,6 @@ use Scale;
use Vsync;
use Key;
//use Keys;
use std::ffi::CString;
use std::ptr;
use std::os::windows::ffi::OsStrExt;
@ -261,7 +259,12 @@ impl Window {
}
}
pub fn new(name: &str, width: usize, height: usize, scale: Scale, vsync: Vsync) -> Result<Window, &str> {
pub fn new(name: &str,
width: usize,
height: usize,
scale: Scale,
vsync: Vsync)
-> Result<Window, &str> {
unsafe {
let handle = Self::open_window(name, width, height, scale, vsync);