Skip to content

Commit

Permalink
hate: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkriff committed Dec 1, 2017
1 parent 41d8592 commit 645df8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions hate/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ fn window_to_screen(context: &Context, x: f32, y: f32) -> Point {
let h = context.win_size.h as f32;
let aspect_ratio = w / h;
Point(Vector2 {
x: (2.0 * (x/dpi) / w - 1.0) * aspect_ratio,
y: 1.0 - 2.0 * (y/dpi) / h,
x: (2.0 * (x / dpi) / w - 1.0) * aspect_ratio,
y: 1.0 - 2.0 * (y / dpi) / h,
})
}

Expand Down
8 changes: 2 additions & 6 deletions hate/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ pub fn load<P: AsRef<Path>>(path: P) -> Vec<u8> {
let fullpath = &Path::new("assets").join(&path);
let mut file = match File::open(&fullpath) {
Ok(file) => file,
Err(err) => {
panic!("Can`t open file '{}' ({})", fullpath.display(), err)
}
Err(err) => panic!("Can`t open file '{}' ({})", fullpath.display(), err),
};
match file.read_to_end(&mut buf) {
Ok(_) => buf,
Err(err) => {
panic!("Can`t read file '{}' ({})", fullpath.display(), err)
}
Err(err) => panic!("Can`t read file '{}' ({})", fullpath.display(), err),
}
}

Expand Down

0 comments on commit 645df8b

Please sign in to comment.