diff --git a/integration_tests/feature-store/simulator/Cargo.toml b/integration_tests/feature-store/simulator/Cargo.toml index 1fd9609ba2d1a..f0a82f9867ecb 100644 --- a/integration_tests/feature-store/simulator/Cargo.toml +++ b/integration_tests/feature-store/simulator/Cargo.toml @@ -20,6 +20,3 @@ prost = "0.10" serde = { version = "1", features = ["derive"] } futures = "0.3.0" csv = "1.2.2" - -[lints] -workspace = true diff --git a/integration_tests/feature-store/simulator/rust-toolchain b/integration_tests/feature-store/simulator/rust-toolchain index 35bda38a1dcfb..ebc0b6c285a4e 100644 --- a/integration_tests/feature-store/simulator/rust-toolchain +++ b/integration_tests/feature-store/simulator/rust-toolchain @@ -1 +1,2 @@ -nightly-2022-06-20 +[toolchain] +channel = "nightly-2023-09-09" diff --git a/integration_tests/feature-store/simulator/src/entities.rs b/integration_tests/feature-store/simulator/src/entities.rs index 114a1e5c1ee0f..623bc93434cb2 100644 --- a/integration_tests/feature-store/simulator/src/entities.rs +++ b/integration_tests/feature-store/simulator/src/entities.rs @@ -60,7 +60,7 @@ impl User { Ok(ActionHistory { userid: self.userid.clone(), - changenum: changenum, + changenum, event_type: event_type.to_string(), timestamp, }) @@ -93,5 +93,5 @@ pub fn parse_user_metadata() -> Result, ()> { let users = read_users_json(Path::new(&*generator_path).join("users.json")).unwrap(); - return Ok(users); + Ok(users) } diff --git a/integration_tests/feature-store/simulator/src/entities_taxi.rs b/integration_tests/feature-store/simulator/src/entities_taxi.rs index 8ef9e1f358e4b..b5800f707d0e0 100644 --- a/integration_tests/feature-store/simulator/src/entities_taxi.rs +++ b/integration_tests/feature-store/simulator/src/entities_taxi.rs @@ -101,7 +101,7 @@ impl TaxiFeature { mta_tax: self.mta_tax, tip_amount: self.tip_amount, tolls_amount: self.tolls_amount, - ehail_fee: self.ehail_fee.unwrap_or_else(|| 0.0), + ehail_fee: self.ehail_fee.unwrap_or(0.0), improvement_surcharge: self.improvement_surcharge, total_amount: self.total_amount, payment_type: self.payment_type, diff --git a/integration_tests/feature-store/simulator/src/simulation.rs b/integration_tests/feature-store/simulator/src/simulation.rs index 96f3c31921a5e..5475138d6d697 100644 --- a/integration_tests/feature-store/simulator/src/simulation.rs +++ b/integration_tests/feature-store/simulator/src/simulation.rs @@ -4,7 +4,6 @@ use std::thread::sleep; use std::time::Duration; use futures::future::join_all; -use rand; use rand::Rng; use tokio::sync::Mutex; use tonic::transport::Channel; @@ -15,7 +14,7 @@ use crate::{entities, entities_taxi}; fn get_delay_mills(delay_val: f64) -> u64 { let turbulence = - rand::thread_rng().gen_range((delay_val * 0.6) as f64, (delay_val * 1.1) as f64) as f64; + rand::thread_rng().gen_range(delay_val * 0.6, delay_val * 1.1); (turbulence * 10000.0) as u64 } @@ -33,7 +32,7 @@ pub async fn main_loop(simulator_type: String) { } } -async fn mock_taxi(client: Arc>>) -> () { +async fn mock_taxi(client: Arc>>) { let (offline_features, online_features) = entities_taxi::parse_taxi_metadata(); println!("Write training data len is {:?}", offline_features.len()); let mut threads = vec![]; @@ -87,7 +86,7 @@ async fn mock_taxi(client: Arc>>) -> () { } #[allow(dead_code)] -async fn mock_user_mfa(client: Arc>>) -> () { +async fn mock_user_mfa(client: Arc>>) { let users = entities::parse_user_metadata().unwrap(); let mut threads = vec![]; for user in users {