From 8f2563b5f72b3df6211d369efdd8ffe4898a9081 Mon Sep 17 00:00:00 2001 From: Yang Zhou Date: Thu, 1 Aug 2024 17:08:19 -0400 Subject: [PATCH] clean clippy --- src/main.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6f3b0eb2..77bf96de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,4 @@ -extern crate nalgebra as na; -extern crate rand; -extern crate rerun; - -use na::{Matrix3, Rotation3, UnitQuaternion, Vector3}; +use nalgebra::{Matrix3, Rotation3, UnitQuaternion, Vector3}; use rand_distr::{Distribution, Normal}; struct Quadrotor { position: Vector3, @@ -95,7 +91,7 @@ impl Quadrotor { } } -struct IMU { +struct Imu { accel_bias: Vector3, gyro_bias: Vector3, accel_noise_std: f32, @@ -103,7 +99,7 @@ struct IMU { bias_instability: f32, } -impl IMU { +impl Imu { pub fn new() -> Self { Self { accel_bias: Vector3::zeros(), @@ -650,7 +646,7 @@ fn log_data( fn main() { let mut quad = Quadrotor::new(); let mut controller = PIDController::new(); - let mut imu = IMU::new(); + let mut imu = Imu::new(); let rec = rerun::RecordingStreamBuilder::new("quadrotor_simulation") .connect() .unwrap();