From 3d1fa4036f0890e1a3c42fbaef07bb67f9d74280 Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Fri, 26 Apr 2024 12:32:35 -0700 Subject: [PATCH] Rename to clarify try_into target type With type hints enabled, `hex` shows up as a `BoostedHex` going into a function that expects `BoostedHex`. Renaming to `hex_proto` will hopefully clear up the need for the type casting. --- boost_manager/src/activator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boost_manager/src/activator.rs b/boost_manager/src/activator.rs index 7d8f3868a..1dbc9e981 100644 --- a/boost_manager/src/activator.rs +++ b/boost_manager/src/activator.rs @@ -114,9 +114,9 @@ where while let Some(msg) = reward_shares.try_next().await? { let share = MobileRewardShare::decode(msg)?; if let Some(MobileReward::RadioReward(r)) = share.reward { - for hex in r.boosted_hexes.into_iter() { - process_boosted_hex(txn, manifest_time, &boosted_hexes, &hex.try_into()?) - .await? + for hex_proto in r.boosted_hexes.into_iter() { + let boosted_hex = hex_proto.try_into()?; + process_boosted_hex(txn, manifest_time, &boosted_hexes, &boosted_hex).await? } } }