Skip to content

Commit 645df8b

Browse files
committed
hate: cargo fmt
1 parent 41d8592 commit 645df8b

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

hate/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ fn window_to_screen(context: &Context, x: f32, y: f32) -> Point {
110110
let h = context.win_size.h as f32;
111111
let aspect_ratio = w / h;
112112
Point(Vector2 {
113-
x: (2.0 * (x/dpi) / w - 1.0) * aspect_ratio,
114-
y: 1.0 - 2.0 * (y/dpi) / h,
113+
x: (2.0 * (x / dpi) / w - 1.0) * aspect_ratio,
114+
y: 1.0 - 2.0 * (y / dpi) / h,
115115
})
116116
}
117117

hate/src/fs.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,11 @@ pub fn load<P: AsRef<Path>>(path: P) -> Vec<u8> {
2727
let fullpath = &Path::new("assets").join(&path);
2828
let mut file = match File::open(&fullpath) {
2929
Ok(file) => file,
30-
Err(err) => {
31-
panic!("Can`t open file '{}' ({})", fullpath.display(), err)
32-
}
30+
Err(err) => panic!("Can`t open file '{}' ({})", fullpath.display(), err),
3331
};
3432
match file.read_to_end(&mut buf) {
3533
Ok(_) => buf,
36-
Err(err) => {
37-
panic!("Can`t read file '{}' ({})", fullpath.display(), err)
38-
}
34+
Err(err) => panic!("Can`t read file '{}' ({})", fullpath.display(), err),
3935
}
4036
}
4137

0 commit comments

Comments
 (0)