From 35b03cffad07f65b2cdfd09c1be6836e69ee5a90 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 22 Jul 2023 01:41:07 -0700 Subject: [PATCH] lint --- web3_proxy/src/config.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web3_proxy/src/config.rs b/web3_proxy/src/config.rs index 3988bfc3..7386fca1 100644 --- a/web3_proxy/src/config.rs +++ b/web3_proxy/src/config.rs @@ -335,6 +335,7 @@ mod tests { #[test] fn expected_app_defaults() { + // a is from serde let a: AppConfig = serde_json::from_value(json!({ "chain_id": 1, })) @@ -342,10 +343,12 @@ mod tests { assert_eq!(a.min_synced_rpcs, 1); - let mut b: AppConfig = Default::default(); - - // influxdb_id is randomized - b.influxdb_id = a.influxdb_id.clone(); + // b is from Default + let mut b: AppConfig = AppConfig { + // influxdb_id is randomized, so we clone it + influxdb_id: a.influxdb_id.clone(), + ..Default::default() + }; assert_eq!(b.min_synced_rpcs, 1);