Fix clippy and enable clippy on CI

This commit is contained in:
Sébastien Crozet
2024-01-27 16:49:53 +01:00
committed by Sébastien Crozet
parent aef873f20e
commit da92e5c283
81 changed files with 420 additions and 468 deletions

View File

@@ -1,3 +1,5 @@
#![allow(clippy::unnecessary_cast)] // Casts are needed for switching between f32/f64.
use crate::{
physics::{PhysicsEvents, PhysicsState},
TestbedGraphics,
@@ -22,6 +24,12 @@ pub struct RunState {
pub time: f32,
}
impl Default for RunState {
fn default() -> Self {
Self::new()
}
}
impl RunState {
#[cfg(feature = "parallel")]
pub fn new() -> Self {
@@ -33,7 +41,7 @@ impl RunState {
.unwrap();
Self {
thread_pool: thread_pool,
thread_pool,
num_threads,
timestep_id: 0,
time: 0.0,