fix(clippy): make clippy = host libs + riscv programs (shared PROGRAMS); libkos alloc spinlock (was unlocked across threads); keystore Account; gpu Rect; factory Entry; Default impls, let-chains, div_ceil, iter loops
This commit is contained in:
@@ -44,6 +44,12 @@ pub struct Snake {
|
||||
rng_state: u32,
|
||||
}
|
||||
|
||||
impl Default for Snake {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Snake {
|
||||
pub fn new() -> Self {
|
||||
let start = Position { x: GRID_WIDTH / 2, y: GRID_HEIGHT / 2 };
|
||||
|
||||
@@ -61,8 +61,7 @@ fn main() {
|
||||
|
||||
loop {
|
||||
let count = renderer::render(&snake, &mut commands);
|
||||
for i in 0..count {
|
||||
let cmd = &commands[i];
|
||||
for cmd in &commands[..count] {
|
||||
draw_rect(cmd.x, cmd.y, cmd.w, cmd.h, cmd.color);
|
||||
}
|
||||
flush();
|
||||
|
||||
Reference in New Issue
Block a user