cargo clippy --fix

Elnu 9 months ago
parent 74e162c579
commit 92889532d7

@ -23,7 +23,7 @@ pub fn texture(name: &str) -> String {
}
fn get_level(lines: u32) -> u32 {
return std::cmp::min(lines / LINES_PER_LEVEL, 15);
std::cmp::min(lines / LINES_PER_LEVEL, 15)
}
fn get_update_interval(level: u32) -> u32 {
@ -53,7 +53,7 @@ fn handle_resize_events(code: Key, current_scale: &mut u32, render_window: &mut
render_window.set_size(Vector2u::new(WINDOW_WIDTH, WINDOW_HEIGHT) * new_current_scale);
let mut file = std::fs::OpenOptions::new()
.write(true)
.open(&scale_file_path)
.open(scale_file_path)
.unwrap();
file.write_all(new_current_scale.to_string().as_bytes()).unwrap();
file.flush().unwrap();

@ -29,7 +29,7 @@ impl<'a> Block<'a> {
if !cell {
continue;
}
let mut rotated = Vector2i::new(x as i32, y as i32);
let mut rotated = Vector2i::new(x, y);
if self.block_type.rotate {
let center_x = row.len() as i32 / 2;
let center_y = self.block_type.grid.len() as i32 / 2;

Loading…
Cancel
Save